Namespace sym¶
-
namespace sym
Typedefs
-
template<typename Scalar>
using AllCamTypes = std::tuple<ATANCameraCal<Scalar>, DoubleSphereCameraCal<Scalar>, EquirectangularCameraCal<Scalar>, LinearCameraCal<Scalar>, PolynomialCameraCal<Scalar>, SphericalCameraCal<Scalar>, OrthographicCameraCal<Scalar>>
-
template<typename Scalar>
using AllGeoTypes = std::tuple<Rot2<Scalar>, Rot3<Scalar>, Pose2<Scalar>, Pose3<Scalar>, Unit3<Scalar>>
-
using ATANCameraCald = ATANCameraCal<double>
-
using ATANCameraCalf = ATANCameraCal<float>
-
using DoubleSphereCameraCald = DoubleSphereCameraCal<double>
-
using DoubleSphereCameraCalf = DoubleSphereCameraCal<float>
-
using EquirectangularCameraCald = EquirectangularCameraCal<double>
-
using EquirectangularCameraCalf = EquirectangularCameraCal<float>
-
using LinearCameraCald = LinearCameraCal<double>¶
-
using LinearCameraCalf = LinearCameraCal<float>¶
-
using OrthographicCameraCald = OrthographicCameraCal<double>¶
-
using OrthographicCameraCalf = OrthographicCameraCal<float>¶
-
using PolynomialCameraCald = PolynomialCameraCal<double>¶
-
using PolynomialCameraCalf = PolynomialCameraCal<float>¶
-
using SphericalCameraCald = SphericalCameraCal<double>¶
-
using SphericalCameraCalf = SphericalCameraCal<float>¶
-
using Unit3d = Unit3<double>
-
using Unit3f = Unit3<float>
Functions
-
std::ostream &operator<<(std::ostream &os, const ATANCameraCald &a)
-
std::ostream &operator<<(std::ostream &os, const ATANCameraCalf &a)
-
std::ostream &operator<<(std::ostream &os, const DoubleSphereCameraCald &a)
-
std::ostream &operator<<(std::ostream &os, const DoubleSphereCameraCalf &a)
-
std::ostream &operator<<(std::ostream &os, const EquirectangularCameraCald &a)
-
std::ostream &operator<<(std::ostream &os, const EquirectangularCameraCalf &a)
-
template<typename Scalar>
void AtanReprojectionDelta(const sym::Pose3<Scalar> &source_pose, const sym::ATANCameraCal<Scalar> &source_calibration, const sym::Pose3<Scalar> &target_pose, const sym::ATANCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 2, 1> &source_pixel, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const reprojection_delta = nullptr, Scalar *const is_valid = nullptr) Reprojects the landmark into the target camera and returns the delta from the correspondence to the reprojection.
The landmark is specified as a pixel in the source camera and an inverse range; this means the landmark is fixed in the source camera and always has residual 0 there (this 0 residual is not returned, only the residual in the target camera is returned).
Args: source_pose: The pose of the source camera source_calibration: The source camera calibration target_pose: The pose of the target camera target_calibration: The target camera calibration source_inverse_range: The inverse range of the landmark in the source camera source_pixel: The location of the landmark in the source camera target_pixel: The location of the correspondence in the target camera epsilon: Small positive value camera_model_class: The subclass of CameraCal to use as the camera model
Outputs: res: 2dof pixel reprojection error valid: is valid projection or not
-
template<typename Scalar>
void BetweenFactorAtanCameraCal(const sym::ATANCameraCal<Scalar> &a, const sym::ATANCameraCal<Scalar> &b, const sym::ATANCameraCal<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 5, 5> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 5, 1> *const res = nullptr, Eigen::Matrix<Scalar, 5, 10> *const jacobian = nullptr, Eigen::Matrix<Scalar, 10, 10> *const hessian = nullptr, Eigen::Matrix<Scalar, 10, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (5x10) jacobian of res wrt args a (5), b (5) hessian: (10x10) Gauss-Newton hessian for args a (5), b (5) rhs: (10x1) Gauss-Newton rhs for args a (5), b (5)
-
template<typename Scalar>
void BetweenFactorDoubleSphereCameraCal(const sym::DoubleSphereCameraCal<Scalar> &a, const sym::DoubleSphereCameraCal<Scalar> &b, const sym::DoubleSphereCameraCal<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 6, 6> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 6, 1> *const res = nullptr, Eigen::Matrix<Scalar, 6, 12> *const jacobian = nullptr, Eigen::Matrix<Scalar, 12, 12> *const hessian = nullptr, Eigen::Matrix<Scalar, 12, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (6x12) jacobian of res wrt args a (6), b (6) hessian: (12x12) Gauss-Newton hessian for args a (6), b (6) rhs: (12x1) Gauss-Newton rhs for args a (6), b (6)
-
template<typename Scalar>
void BetweenFactorEquirectangularCameraCal(const sym::EquirectangularCameraCal<Scalar> &a, const sym::EquirectangularCameraCal<Scalar> &b, const sym::EquirectangularCameraCal<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 4, 4> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 4, 1> *const res = nullptr, Eigen::Matrix<Scalar, 4, 8> *const jacobian = nullptr, Eigen::Matrix<Scalar, 8, 8> *const hessian = nullptr, Eigen::Matrix<Scalar, 8, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (4x8) jacobian of res wrt args a (4), b (4) hessian: (8x8) Gauss-Newton hessian for args a (4), b (4) rhs: (8x1) Gauss-Newton rhs for args a (4), b (4)
-
template<typename Scalar>
void BetweenFactorLinearCameraCal(const sym::LinearCameraCal<Scalar> &a, const sym::LinearCameraCal<Scalar> &b, const sym::LinearCameraCal<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 4, 4> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 4, 1> *const res = nullptr, Eigen::Matrix<Scalar, 4, 8> *const jacobian = nullptr, Eigen::Matrix<Scalar, 8, 8> *const hessian = nullptr, Eigen::Matrix<Scalar, 8, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (4x8) jacobian of res wrt args a (4), b (4) hessian: (8x8) Gauss-Newton hessian for args a (4), b (4) rhs: (8x1) Gauss-Newton rhs for args a (4), b (4)
-
template<typename Scalar>
void BetweenFactorMatrix31(const Eigen::Matrix<Scalar, 3, 1> &a, const Eigen::Matrix<Scalar, 3, 1> &b, const Eigen::Matrix<Scalar, 3, 1> &a_T_b, const Eigen::Matrix<Scalar, 3, 3> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 3, 1> *const res = nullptr, Eigen::Matrix<Scalar, 3, 6> *const jacobian = nullptr, Eigen::Matrix<Scalar, 6, 6> *const hessian = nullptr, Eigen::Matrix<Scalar, 6, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (3x6) jacobian of res wrt args a (3), b (3) hessian: (6x6) Gauss-Newton hessian for args a (3), b (3) rhs: (6x1) Gauss-Newton rhs for args a (3), b (3)
-
template<typename Scalar>
void BetweenFactorOrthographicCameraCal(const sym::OrthographicCameraCal<Scalar> &a, const sym::OrthographicCameraCal<Scalar> &b, const sym::OrthographicCameraCal<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 4, 4> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 4, 1> *const res = nullptr, Eigen::Matrix<Scalar, 4, 8> *const jacobian = nullptr, Eigen::Matrix<Scalar, 8, 8> *const hessian = nullptr, Eigen::Matrix<Scalar, 8, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (4x8) jacobian of res wrt args a (4), b (4) hessian: (8x8) Gauss-Newton hessian for args a (4), b (4) rhs: (8x1) Gauss-Newton rhs for args a (4), b (4)
-
template<typename Scalar>
void BetweenFactorPolynomialCameraCal(const sym::PolynomialCameraCal<Scalar> &a, const sym::PolynomialCameraCal<Scalar> &b, const sym::PolynomialCameraCal<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 8, 8> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 8, 1> *const res = nullptr, Eigen::Matrix<Scalar, 8, 16> *const jacobian = nullptr, Eigen::Matrix<Scalar, 16, 16> *const hessian = nullptr, Eigen::Matrix<Scalar, 16, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (8x16) jacobian of res wrt args a (8), b (8) hessian: (16x16) Gauss-Newton hessian for args a (8), b (8) rhs: (16x1) Gauss-Newton rhs for args a (8), b (8)
-
template<typename Scalar>
void BetweenFactorPose2(const sym::Pose2<Scalar> &a, const sym::Pose2<Scalar> &b, const sym::Pose2<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 3, 3> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 3, 1> *const res = nullptr, Eigen::Matrix<Scalar, 3, 6> *const jacobian = nullptr, Eigen::Matrix<Scalar, 6, 6> *const hessian = nullptr, Eigen::Matrix<Scalar, 6, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (3x6) jacobian of res wrt args a (3), b (3) hessian: (6x6) Gauss-Newton hessian for args a (3), b (3) rhs: (6x1) Gauss-Newton rhs for args a (3), b (3)
-
template<typename Scalar>
void BetweenFactorPose3(const sym::Pose3<Scalar> &a, const sym::Pose3<Scalar> &b, const sym::Pose3<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 6, 6> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 6, 1> *const res = nullptr, Eigen::Matrix<Scalar, 6, 12> *const jacobian = nullptr, Eigen::Matrix<Scalar, 12, 12> *const hessian = nullptr, Eigen::Matrix<Scalar, 12, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (6x12) jacobian of res wrt args a (6), b (6) hessian: (12x12) Gauss-Newton hessian for args a (6), b (6) rhs: (12x1) Gauss-Newton rhs for args a (6), b (6)
-
template<typename Scalar>
void BetweenFactorPose3Position(const sym::Pose3<Scalar> &a, const sym::Pose3<Scalar> &b, const Eigen::Matrix<Scalar, 3, 1> &a_t_b, const Eigen::Matrix<Scalar, 3, 3> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 3, 1> *const res = nullptr, Eigen::Matrix<Scalar, 3, 12> *const jacobian = nullptr, Eigen::Matrix<Scalar, 12, 12> *const hessian = nullptr, Eigen::Matrix<Scalar, 12, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_t_b.
In vector space terms that would be: (b - a) - a_t_b
In lie group terms: local_coordinates(a_t_b, between(a, b)) to_tangent(compose(inverse(a_t_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (3x12) jacobian of res wrt args a (6), b (6) hessian: (12x12) Gauss-Newton hessian for args a (6), b (6) rhs: (12x1) Gauss-Newton rhs for args a (6), b (6)
-
template<typename Scalar>
void BetweenFactorPose3Rotation(const sym::Pose3<Scalar> &a, const sym::Pose3<Scalar> &b, const sym::Rot3<Scalar> &a_R_b, const Eigen::Matrix<Scalar, 3, 3> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 3, 1> *const res = nullptr, Eigen::Matrix<Scalar, 3, 12> *const jacobian = nullptr, Eigen::Matrix<Scalar, 12, 12> *const hessian = nullptr, Eigen::Matrix<Scalar, 12, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_R_b.
In vector space terms that would be: (b - a) - a_R_b
In lie group terms: local_coordinates(a_R_b, between(a, b)) to_tangent(compose(inverse(a_R_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (3x12) jacobian of res wrt args a (6), b (6) hessian: (12x12) Gauss-Newton hessian for args a (6), b (6) rhs: (12x1) Gauss-Newton rhs for args a (6), b (6)
-
template<typename Scalar>
void BetweenFactorPose3TranslationNorm(const sym::Pose3<Scalar> &a, const sym::Pose3<Scalar> &b, const Scalar translation_norm, const Eigen::Matrix<Scalar, 1, 1> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 1, 1> *const res = nullptr, Eigen::Matrix<Scalar, 1, 12> *const jacobian = nullptr, Eigen::Matrix<Scalar, 12, 12> *const hessian = nullptr, Eigen::Matrix<Scalar, 12, 1> *const rhs = nullptr) Residual that penalizes the difference between translation_norm and (a.t - b.t).norm().
Args: sqrt_info: Square root information matrix to whiten residual. In this one dimensional case this is just 1/sigma. jacobian: (1x12) jacobian of res wrt args a (6), b (6) hessian: (12x12) Gauss-Newton hessian for args a (6), b (6) rhs: (12x1) Gauss-Newton rhs for args a (6), b (6)
-
template<typename Scalar>
void BetweenFactorRot2(const sym::Rot2<Scalar> &a, const sym::Rot2<Scalar> &b, const sym::Rot2<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 1, 1> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 1, 1> *const res = nullptr, Eigen::Matrix<Scalar, 1, 2> *const jacobian = nullptr, Eigen::Matrix<Scalar, 2, 2> *const hessian = nullptr, Eigen::Matrix<Scalar, 2, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (1x2) jacobian of res wrt args a (1), b (1) hessian: (2x2) Gauss-Newton hessian for args a (1), b (1) rhs: (2x1) Gauss-Newton rhs for args a (1), b (1)
-
template<typename Scalar>
void BetweenFactorRot3(const sym::Rot3<Scalar> &a, const sym::Rot3<Scalar> &b, const sym::Rot3<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 3, 3> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 3, 1> *const res = nullptr, Eigen::Matrix<Scalar, 3, 6> *const jacobian = nullptr, Eigen::Matrix<Scalar, 6, 6> *const hessian = nullptr, Eigen::Matrix<Scalar, 6, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (3x6) jacobian of res wrt args a (3), b (3) hessian: (6x6) Gauss-Newton hessian for args a (3), b (3) rhs: (6x1) Gauss-Newton rhs for args a (3), b (3)
-
template<typename Scalar>
void BetweenFactorSphericalCameraCal(const sym::SphericalCameraCal<Scalar> &a, const sym::SphericalCameraCal<Scalar> &b, const sym::SphericalCameraCal<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 11, 11> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 11, 1> *const res = nullptr, Eigen::Matrix<Scalar, 11, 22> *const jacobian = nullptr, Eigen::Matrix<Scalar, 22, 22> *const hessian = nullptr, Eigen::Matrix<Scalar, 22, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (11x22) jacobian of res wrt args a (11), b (11) hessian: (22x22) Gauss-Newton hessian for args a (11), b (11) rhs: (22x1) Gauss-Newton rhs for args a (11), b (11)
-
template<typename Scalar>
void BetweenFactorUnit3(const sym::Unit3<Scalar> &a, const sym::Unit3<Scalar> &b, const sym::Unit3<Scalar> &a_T_b, const Eigen::Matrix<Scalar, 2, 2> &sqrt_info, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const res = nullptr, Eigen::Matrix<Scalar, 2, 4> *const jacobian = nullptr, Eigen::Matrix<Scalar, 4, 4> *const hessian = nullptr, Eigen::Matrix<Scalar, 4, 1> *const rhs = nullptr) Residual that penalizes the difference between between(a, b) and a_T_b.
In vector space terms that would be: (b - a) - a_T_b
In lie group terms: local_coordinates(a_T_b, between(a, b)) to_tangent(compose(inverse(a_T_b), compose(inverse(a), b)))
Args: sqrt_info: Square root information matrix to whiten residual. This can be computed from a covariance matrix as the cholesky decomposition of the inverse. In the case of a diagonal it will contain 1/sigma values. Must match the tangent dim. jacobian: (2x4) jacobian of res wrt args a (2), b (2) hessian: (4x4) Gauss-Newton hessian for args a (2), b (2) rhs: (4x1) Gauss-Newton rhs for args a (2), b (2)
-
template<typename Scalar>
void DoubleSphereReprojectionDelta(const sym::Pose3<Scalar> &source_pose, const sym::DoubleSphereCameraCal<Scalar> &source_calibration, const sym::Pose3<Scalar> &target_pose, const sym::DoubleSphereCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 2, 1> &source_pixel, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const reprojection_delta = nullptr, Scalar *const is_valid = nullptr) Reprojects the landmark into the target camera and returns the delta from the correspondence to the reprojection.
The landmark is specified as a pixel in the source camera and an inverse range; this means the landmark is fixed in the source camera and always has residual 0 there (this 0 residual is not returned, only the residual in the target camera is returned).
Args: source_pose: The pose of the source camera source_calibration: The source camera calibration target_pose: The pose of the target camera target_calibration: The target camera calibration source_inverse_range: The inverse range of the landmark in the source camera source_pixel: The location of the landmark in the source camera target_pixel: The location of the correspondence in the target camera epsilon: Small positive value camera_model_class: The subclass of CameraCal to use as the camera model
Outputs: res: 2dof pixel reprojection error valid: is valid projection or not
-
template<typename Scalar>
void EquirectangularReprojectionDelta(const sym::Pose3<Scalar> &source_pose, const sym::EquirectangularCameraCal<Scalar> &source_calibration, const sym::Pose3<Scalar> &target_pose, const sym::EquirectangularCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 2, 1> &source_pixel, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const reprojection_delta = nullptr, Scalar *const is_valid = nullptr) Reprojects the landmark into the target camera and returns the delta from the correspondence to the reprojection.
The landmark is specified as a pixel in the source camera and an inverse range; this means the landmark is fixed in the source camera and always has residual 0 there (this 0 residual is not returned, only the residual in the target camera is returned).
Args: source_pose: The pose of the source camera source_calibration: The source camera calibration target_pose: The pose of the target camera target_calibration: The target camera calibration source_inverse_range: The inverse range of the landmark in the source camera source_pixel: The location of the landmark in the source camera target_pixel: The location of the correspondence in the target camera epsilon: Small positive value camera_model_class: The subclass of CameraCal to use as the camera model
Outputs: res: 2dof pixel reprojection error valid: is valid projection or not
-
template<typename Scalar>
void ImuManifoldPreintegrationUpdate(const sym::Rot3<Scalar> &DR, const Eigen::Matrix<Scalar, 3, 1> &Dv, const Eigen::Matrix<Scalar, 3, 1> &Dp, const Eigen::Matrix<Scalar, 9, 9> &covariance, const Eigen::Matrix<Scalar, 3, 3> &DR_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 1> &accel_bias, const Eigen::Matrix<Scalar, 3, 1> &gyro_bias, const Eigen::Matrix<Scalar, 3, 1> &accel_cov_diagonal, const Eigen::Matrix<Scalar, 3, 1> &gyro_cov_diagonal, const Eigen::Matrix<Scalar, 3, 1> &accel_measurement, const Eigen::Matrix<Scalar, 3, 1> &gyro_measurement, const Scalar dt, const Scalar epsilon, sym::Rot3<Scalar> *const new_DR = nullptr, Eigen::Matrix<Scalar, 3, 1> *const new_Dv = nullptr, Eigen::Matrix<Scalar, 3, 1> *const new_Dp = nullptr, Eigen::Matrix<Scalar, 9, 9> *const new_covariance = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_DR_D_gyro_bias = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_Dv_D_accel_bias = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_Dv_D_gyro_bias = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_Dp_D_accel_bias = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_Dp_D_gyro_bias = nullptr) An internal helper function to update a set of preintegrated IMU measurements with a new pair of gyroscope and accelerometer measurements. Returns the updated preintegrated measurements.
NOTE: If you are interested in this function, you should likely be using the
IntegrateMeasurement
method of thePreintegratedImuMeasurements
class located insymforce/slam/imu_preintegration/preintegrated_imu_measurements.h
.When integrating the first measurement, DR should be the identity, Dv, Dp, covariance, and the derivatives w.r.t. to bias should all be 0.
Args: DR: Preintegrated change in orientation Dv: Preintegrated change in velocity Dp: Preintegrated change in position covariance: Covariance [DR, Dv, Dp] in local coordinates of mean DR_D_gyro_bias: Derivative of DR w.r.t. gyro_bias Dv_D_accel_bias: Derivative of Dv w.r.t. accel_bias Dv_D_gyro_bias: Derivative of Dv w.r.t. gyro_bias Dp_D_accel_bias: Derivative of Dp w.r.t. accel_bias Dp_D_gyro_bias: Derivative of Dp w.r.t. gyro_bias accel_bias: Initial guess for the accelerometer measurement bias gyro_bias: Initial guess for the gyroscope measurement bias accel_cov_diagonal: The diagonal of the covariance of the accelerometer measurement gyro_cov_diagonal: The diagonal of the covariance of the gyroscope measurement accel_measurement: The accelerometer measurement gyro_measurement: The gyroscope measurement dt: The time between the new measurements and the last epsilon: epsilon for numerical stability
Returns: T.Tuple[sf.Rot3, sf.V3, sf.V3, sf.M99, sf.M33, sf.M33, sf.M33, sf.M33, sf.M33]: new_DR, new_Dv, new_Dp, new_covariance, new_DR_D_gyro_bias, new_Dv_D_accel_bias, new_Dv_D_gyro_bias, new_Dp_D_accel_bias new_Dp_D_gyro_bias,
-
template<typename Scalar>
void ImuManifoldPreintegrationUpdateAutoDerivative(const sym::Rot3<Scalar> &DR, const Eigen::Matrix<Scalar, 3, 1> &Dv, const Eigen::Matrix<Scalar, 3, 1> &Dp, const Eigen::Matrix<Scalar, 9, 9> &covariance, const Eigen::Matrix<Scalar, 3, 3> &DR_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 1> &accel_bias, const Eigen::Matrix<Scalar, 3, 1> &gyro_bias, const Eigen::Matrix<Scalar, 3, 1> &accel_cov_diagonal, const Eigen::Matrix<Scalar, 3, 1> &gyro_cov_diagonal, const Eigen::Matrix<Scalar, 3, 1> &accel_measurement, const Eigen::Matrix<Scalar, 3, 1> &gyro_measurement, const Scalar dt, const Scalar epsilon, sym::Rot3<Scalar> *const new_DR = nullptr, Eigen::Matrix<Scalar, 3, 1> *const new_Dv = nullptr, Eigen::Matrix<Scalar, 3, 1> *const new_Dp = nullptr, Eigen::Matrix<Scalar, 9, 9> *const new_covariance = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_DR_D_gyro_bias = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_Dv_D_accel_bias = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_Dv_D_gyro_bias = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_Dp_D_accel_bias = nullptr, Eigen::Matrix<Scalar, 3, 3> *const new_Dp_D_gyro_bias = nullptr) Alternative to ImuManifoldPreintegrationUpdate that uses auto-derivatives. Exists only to help verify correctness of ImuManifoldPreintegrationUpdate. Should have the same output. Since this function is more expensive, there is no reason to use it instead.
An internal helper function to update a set of preintegrated IMU measurements with a new pair of gyroscope and accelerometer measurements. Returns the updated preintegrated measurements.
NOTE: If you are interested in this function, you should likely be using the
IntegrateMeasurement
method of thePreintegratedImuMeasurements
class located insymforce/slam/imu_preintegration/preintegrated_imu_measurements.h
.When integrating the first measurement, DR should be the identity, Dv, Dp, covariance, and the derivatives w.r.t. to bias should all be 0.
Args: DR: Preintegrated change in orientation Dv: Preintegrated change in velocity Dp: Preintegrated change in position covariance: Covariance [DR, Dv, Dp] in local coordinates of mean DR_D_gyro_bias: Derivative of DR w.r.t. gyro_bias Dv_D_accel_bias: Derivative of Dv w.r.t. accel_bias Dv_D_gyro_bias: Derivative of Dv w.r.t. gyro_bias Dp_D_accel_bias: Derivative of Dp w.r.t. accel_bias Dp_D_gyro_bias: Derivative of Dp w.r.t. gyro_bias accel_bias: Initial guess for the accelerometer measurement bias gyro_bias: Initial guess for the gyroscope measurement bias accel_cov_diagonal: The diagonal of the covariance of the accelerometer measurement gyro_cov_diagonal: The diagonal of the covariance of the gyroscope measurement accel_measurement: The accelerometer measurement gyro_measurement: The gyroscope measurement dt: The time between the new measurements and the last epsilon: epsilon for numerical stability
Returns: T.Tuple[sf.Rot3, sf.V3, sf.V3, sf.M99, sf.M33, sf.M33, sf.M33, sf.M33, sf.M33]: new_DR, new_Dv, new_Dp, new_covariance, new_DR_D_gyro_bias, new_Dv_D_accel_bias, new_Dv_D_gyro_bias, new_Dp_D_accel_bias new_Dp_D_gyro_bias,
-
template<typename Scalar>
void InternalImuFactor(const sym::Pose3<Scalar> &pose_i, const Eigen::Matrix<Scalar, 3, 1> &vel_i, const sym::Pose3<Scalar> &pose_j, const Eigen::Matrix<Scalar, 3, 1> &vel_j, const Eigen::Matrix<Scalar, 3, 1> &accel_bias_i, const Eigen::Matrix<Scalar, 3, 1> &gyro_bias_i, const sym::Rot3<Scalar> &DR, const Eigen::Matrix<Scalar, 3, 1> &Dv, const Eigen::Matrix<Scalar, 3, 1> &Dp, const Eigen::Matrix<Scalar, 9, 9> &sqrt_info, const Eigen::Matrix<Scalar, 3, 3> &DR_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 1> &accel_bias_hat, const Eigen::Matrix<Scalar, 3, 1> &gyro_bias_hat, const Eigen::Matrix<Scalar, 3, 1> &gravity, const Scalar dt, const Scalar epsilon, Eigen::Matrix<Scalar, 9, 1> *const res = nullptr, Eigen::Matrix<Scalar, 9, 24> *const jacobian = nullptr, Eigen::Matrix<Scalar, 24, 24> *const hessian = nullptr, Eigen::Matrix<Scalar, 24, 1> *const rhs = nullptr) An internal helper function to linearize the difference between the orientation, velocity, and position at one time step and those of another time step. The expected difference is calculated from the preintegrated IMU measurements between those time steps.
NOTE: If you are looking for a residual for an IMU factor, do not use this. Instead use the one found in
symforce/slam/imu_preintegration/imu_factor.h
.Time step i is the time of the first IMU measurement of the interval. Time step j is the time after the last IMU measurement of the interval.
Assumes sqrt_info is lower triangular and only reads the lower triangle.
Args: pose_i: Pose at time step i (world_T_body) vel_i: Velocity at time step i (world frame) pose_j: Pose at time step j (world_T_body) vel_j: Velocity at time step j (world frame) accel_bias_i: The accelerometer bias between timesteps i and j gyro_bias_i: The gyroscope bias between timesteps i and j DR: Preintegrated estimate for pose_i.R.inverse() * pose_j.R Dv: Preintegrated estimate for vel_j - vel_i in the body frame at timestep i Dp: Preintegrated estimate for position change (before velocity and gravity corrections) in the body frame at timestep i::
sqrt_info: sqrt info matrix of DR(‘s tangent space), Dv, Dp DR_D_gyro_bias: Derivative of DR w.r.t. gyro_bias evaluated at gyro_bias_hat Dv_D_accel_bias: Derivative of Dv w.r.t. accel_bias evaluated at accel_bias_hat Dv_D_gyro_bias: Derivative of Dv w.r.t. gyro_bias evaluated at gyro_bias_hat Dp_D_accel_bias: Derivative of Dp w.r.t. accel_bias evaluated at accel_bias_hat Dp_D_gyro_bias: Derivative of Dp w.r.t. gyro_bias evaluated at gyro_bias_hat accel_bias_hat: The accelerometer bias used during preintegration gyro_bias_hat: The gyroscope bias used during preintegration gravity: Acceleration due to gravity (in the same frame as pose_x and vel_x), i.e., the vector which when added to the accelerometer measurements gives the true acceleration (up to bias and noise) of the IMU. dt: The time between timestep i and j: t_j - t_i epsilon: epsilon used for numerical stabilityR_i^T (p_j - p_i - v_i Delta t - 1/2 g Delta t^2), where R_i = pose_i.R, p_i = pose_i.t, p_j = pose_j.t, and v_i = vel_i
Outputs: res: 9dof product residual between the orientations, then velocities, then positions. jacobian: (9x24) jacobian of res wrt args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3) hessian: (24x24) Gauss-Newton hessian for args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3) rhs: (24x1) Gauss-Newton rhs for args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3)
-
template<typename Scalar>
void InternalImuUnitGravityFactor(const sym::Pose3<Scalar> &pose_i, const Eigen::Matrix<Scalar, 3, 1> &vel_i, const sym::Pose3<Scalar> &pose_j, const Eigen::Matrix<Scalar, 3, 1> &vel_j, const Eigen::Matrix<Scalar, 3, 1> &accel_bias_i, const Eigen::Matrix<Scalar, 3, 1> &gyro_bias_i, const sym::Rot3<Scalar> &DR, const Eigen::Matrix<Scalar, 3, 1> &Dv, const Eigen::Matrix<Scalar, 3, 1> &Dp, const Eigen::Matrix<Scalar, 9, 9> &sqrt_info, const Eigen::Matrix<Scalar, 3, 3> &DR_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 1> &accel_bias_hat, const Eigen::Matrix<Scalar, 3, 1> &gyro_bias_hat, const sym::Unit3<Scalar> &gravity_direction, const Scalar gravity_norm, const Scalar dt, const Scalar epsilon, Eigen::Matrix<Scalar, 9, 1> *const res = nullptr, Eigen::Matrix<Scalar, 9, 26> *const jacobian = nullptr, Eigen::Matrix<Scalar, 26, 26> *const hessian = nullptr, Eigen::Matrix<Scalar, 26, 1> *const rhs = nullptr) This function was autogenerated from a symbolic function. Do not modify by hand.
Symbolic function: internal_imu_unit_gravity_residual
Args: pose_i: Pose3 vel_i: Matrix31 pose_j: Pose3 vel_j: Matrix31 accel_bias_i: Matrix31 gyro_bias_i: Matrix31 DR: Rot3 Dv: Matrix31 Dp: Matrix31 sqrt_info: Matrix99 DR_D_gyro_bias: Matrix33 Dv_D_accel_bias: Matrix33 Dv_D_gyro_bias: Matrix33 Dp_D_accel_bias: Matrix33 Dp_D_gyro_bias: Matrix33 accel_bias_hat: Matrix31 gyro_bias_hat: Matrix31 gravity_direction: Unit3 gravity_norm: Scalar dt: Scalar epsilon: Scalar
Outputs: res: Matrix91 jacobian: (9x26) jacobian of res wrt args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3), gravity_direction (2) hessian: (26x26) Gauss-Newton hessian for args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3), gravity_direction (2) rhs: (26x1) Gauss-Newton rhs for args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3), gravity_direction (2)
-
template<typename Scalar>
void InternalImuWithGravityFactor(const sym::Pose3<Scalar> &pose_i, const Eigen::Matrix<Scalar, 3, 1> &vel_i, const sym::Pose3<Scalar> &pose_j, const Eigen::Matrix<Scalar, 3, 1> &vel_j, const Eigen::Matrix<Scalar, 3, 1> &accel_bias_i, const Eigen::Matrix<Scalar, 3, 1> &gyro_bias_i, const sym::Rot3<Scalar> &DR, const Eigen::Matrix<Scalar, 3, 1> &Dv, const Eigen::Matrix<Scalar, 3, 1> &Dp, const Eigen::Matrix<Scalar, 9, 9> &sqrt_info, const Eigen::Matrix<Scalar, 3, 3> &DR_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dv_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_accel_bias, const Eigen::Matrix<Scalar, 3, 3> &Dp_D_gyro_bias, const Eigen::Matrix<Scalar, 3, 1> &accel_bias_hat, const Eigen::Matrix<Scalar, 3, 1> &gyro_bias_hat, const Eigen::Matrix<Scalar, 3, 1> &gravity, const Scalar dt, const Scalar epsilon, Eigen::Matrix<Scalar, 9, 1> *const res = nullptr, Eigen::Matrix<Scalar, 9, 27> *const jacobian = nullptr, Eigen::Matrix<Scalar, 27, 27> *const hessian = nullptr, Eigen::Matrix<Scalar, 27, 1> *const rhs = nullptr) An internal helper function to linearize the difference between the orientation, velocity, and position at one time step and those of another time step. The expected difference is calculated from the preintegrated IMU measurements between those time steps.
NOTE: If you are looking for a residual for an IMU factor, do not use this. Instead use the one found in
symforce/slam/imu_preintegration/imu_factor.h
.Time step i is the time of the first IMU measurement of the interval. Time step j is the time after the last IMU measurement of the interval.
Assumes sqrt_info is lower triangular and only reads the lower triangle.
Args: pose_i: Pose at time step i (world_T_body) vel_i: Velocity at time step i (world frame) pose_j: Pose at time step j (world_T_body) vel_j: Velocity at time step j (world frame) accel_bias_i: The accelerometer bias between timesteps i and j gyro_bias_i: The gyroscope bias between timesteps i and j DR: Preintegrated estimate for pose_i.R.inverse() * pose_j.R Dv: Preintegrated estimate for vel_j - vel_i in the body frame at timestep i Dp: Preintegrated estimate for position change (before velocity and gravity corrections) in the body frame at timestep i::
sqrt_info: sqrt info matrix of DR(‘s tangent space), Dv, Dp DR_D_gyro_bias: Derivative of DR w.r.t. gyro_bias evaluated at gyro_bias_hat Dv_D_accel_bias: Derivative of Dv w.r.t. accel_bias evaluated at accel_bias_hat Dv_D_gyro_bias: Derivative of Dv w.r.t. gyro_bias evaluated at gyro_bias_hat Dp_D_accel_bias: Derivative of Dp w.r.t. accel_bias evaluated at accel_bias_hat Dp_D_gyro_bias: Derivative of Dp w.r.t. gyro_bias evaluated at gyro_bias_hat accel_bias_hat: The accelerometer bias used during preintegration gyro_bias_hat: The gyroscope bias used during preintegration gravity: Acceleration due to gravity (in the same frame as pose_x and vel_x), i.e., the vector which when added to the accelerometer measurements gives the true acceleration (up to bias and noise) of the IMU. dt: The time between timestep i and j: t_j - t_i epsilon: epsilon used for numerical stabilityR_i^T (p_j - p_i - v_i Delta t - 1/2 g Delta t^2), where R_i = pose_i.R, p_i = pose_i.t, p_j = pose_j.t, and v_i = vel_i
Outputs: res: 9dof product residual between the orientations, then velocities, then positions. jacobian: (9x27) jacobian of res wrt args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3), gravity (3) hessian: (27x27) Gauss-Newton hessian for args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3), gravity (3) rhs: (27x1) Gauss-Newton rhs for args pose_i (6), vel_i (3), pose_j (6), vel_j (3), accel_bias_i (3), gyro_bias_i (3), gravity (3)
-
template<typename Scalar>
void RollForwardState(const sym::Pose3<Scalar> &pose_i, const Eigen::Matrix<Scalar, 3, 1> &vel_i, const sym::Rot3<Scalar> &DR, const Eigen::Matrix<Scalar, 3, 1> &Dv, const Eigen::Matrix<Scalar, 3, 1> &Dp, const Eigen::Matrix<Scalar, 3, 1> &gravity, const Scalar dt, sym::Pose3<Scalar> *const res0 = nullptr, Eigen::Matrix<Scalar, 3, 1> *const res1 = nullptr)¶ Roll forward the given state by the given preintegrated measurements
This returns the pose_j and vel_j that give 0 residual
Args: pose_i: Pose at time step i (world_T_body) vel_i: Velocity at time step i (world frame) DR: Preintegrated estimate for pose_i.R.inverse() * pose_j.R Dv: Preintegrated estimate for vel_j - vel_i in the body frame at timestep i Dp: Preintegrated estimate for position change (before velocity and gravity gravity: Acceleration due to gravity (in the same frame as pose_x and vel_x), i.e., the vector which when added to the accelerometer measurements gives the true acceleration (up to bias and noise) of the IMU. dt: The time between timestep i and j: t_j - t_i
Returns: T.Tuple[sf.Pose3, sf.V3]: pose_j, vel_j
-
template<typename Scalar>
void InverseRangeLandmarkAtanGncFactor(const sym::Pose3<Scalar> &source_pose, const sym::ATANCameraCal<Scalar> &source_calibration, const sym::Pose3<Scalar> &target_pose, const sym::ATANCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 2, 1> &source_pixel, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar weight, const Scalar gnc_mu, const Scalar gnc_scale, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const res = nullptr, Eigen::Matrix<Scalar, 2, 13> *const jacobian = nullptr, Eigen::Matrix<Scalar, 13, 13> *const hessian = nullptr, Eigen::Matrix<Scalar, 13, 1> *const rhs = nullptr) Return the 2dof residual of reprojecting the landmark into the target camera and comparing against the correspondence in the target camera.
The landmark is specified as a pixel in the source camera and an inverse range; this means the landmark is fixed in the source camera and always has residual 0 there (this 0 residual is not returned, only the residual in the target camera is returned).
The norm of the residual is whitened using the :class:
BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
. Whitening each component of the reprojection error separately would result in rejecting individual components as outliers. Instead, we minimize the whitened norm of the full reprojection error for each point. See :meth:ScalarNoiseModel.whiten_norm <symforce.opt.noise_models.ScalarNoiseModel.whiten_norm>
for more information on this, and :class:BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
for more information on the noise model.Args: source_pose: The pose of the source camera source_calibration: The source camera calibration target_pose: The pose of the target camera target_calibration: The target camera calibration source_inverse_range: The inverse range of the landmark in the source camera source_pixel: The location of the landmark in the source camera target_pixel: The location of the correspondence in the target camera weight: The weight of the factor gnc_mu: The mu convexity parameter for the :class:
BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
gnc_scale: The scale parameter for the :class:BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
epsilon: Small positive valueOutputs: res: 2dof residual of the reprojection jacobian: (2x13) jacobian of res wrt args source_pose (6), target_pose (6), source_inverse_range (1) hessian: (13x13) Gauss-Newton hessian for args source_pose (6), target_pose (6), source_inverse_range (1) rhs: (13x1) Gauss-Newton rhs for args source_pose (6), target_pose (6), source_inverse_range (1)
-
template<typename Scalar>
void InverseRangeLandmarkDoubleSphereGncFactor(const sym::Pose3<Scalar> &source_pose, const sym::DoubleSphereCameraCal<Scalar> &source_calibration, const sym::Pose3<Scalar> &target_pose, const sym::DoubleSphereCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 2, 1> &source_pixel, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar weight, const Scalar gnc_mu, const Scalar gnc_scale, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const res = nullptr, Eigen::Matrix<Scalar, 2, 13> *const jacobian = nullptr, Eigen::Matrix<Scalar, 13, 13> *const hessian = nullptr, Eigen::Matrix<Scalar, 13, 1> *const rhs = nullptr) Return the 2dof residual of reprojecting the landmark into the target camera and comparing against the correspondence in the target camera.
The landmark is specified as a pixel in the source camera and an inverse range; this means the landmark is fixed in the source camera and always has residual 0 there (this 0 residual is not returned, only the residual in the target camera is returned).
The norm of the residual is whitened using the :class:
BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
. Whitening each component of the reprojection error separately would result in rejecting individual components as outliers. Instead, we minimize the whitened norm of the full reprojection error for each point. See :meth:ScalarNoiseModel.whiten_norm <symforce.opt.noise_models.ScalarNoiseModel.whiten_norm>
for more information on this, and :class:BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
for more information on the noise model.Args: source_pose: The pose of the source camera source_calibration: The source camera calibration target_pose: The pose of the target camera target_calibration: The target camera calibration source_inverse_range: The inverse range of the landmark in the source camera source_pixel: The location of the landmark in the source camera target_pixel: The location of the correspondence in the target camera weight: The weight of the factor gnc_mu: The mu convexity parameter for the :class:
BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
gnc_scale: The scale parameter for the :class:BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
epsilon: Small positive valueOutputs: res: 2dof residual of the reprojection jacobian: (2x13) jacobian of res wrt args source_pose (6), target_pose (6), source_inverse_range (1) hessian: (13x13) Gauss-Newton hessian for args source_pose (6), target_pose (6), source_inverse_range (1) rhs: (13x1) Gauss-Newton rhs for args source_pose (6), target_pose (6), source_inverse_range (1)
-
template<typename Scalar>
void InverseRangeLandmarkEquirectangularGncFactor(const sym::Pose3<Scalar> &source_pose, const sym::EquirectangularCameraCal<Scalar> &source_calibration, const sym::Pose3<Scalar> &target_pose, const sym::EquirectangularCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 2, 1> &source_pixel, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar weight, const Scalar gnc_mu, const Scalar gnc_scale, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const res = nullptr, Eigen::Matrix<Scalar, 2, 13> *const jacobian = nullptr, Eigen::Matrix<Scalar, 13, 13> *const hessian = nullptr, Eigen::Matrix<Scalar, 13, 1> *const rhs = nullptr)¶ Return the 2dof residual of reprojecting the landmark into the target camera and comparing against the correspondence in the target camera.
The landmark is specified as a pixel in the source camera and an inverse range; this means the landmark is fixed in the source camera and always has residual 0 there (this 0 residual is not returned, only the residual in the target camera is returned).
The norm of the residual is whitened using the :class:
BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
. Whitening each component of the reprojection error separately would result in rejecting individual components as outliers. Instead, we minimize the whitened norm of the full reprojection error for each point. See :meth:ScalarNoiseModel.whiten_norm <symforce.opt.noise_models.ScalarNoiseModel.whiten_norm>
for more information on this, and :class:BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
for more information on the noise model.Args: source_pose: The pose of the source camera source_calibration: The source camera calibration target_pose: The pose of the target camera target_calibration: The target camera calibration source_inverse_range: The inverse range of the landmark in the source camera source_pixel: The location of the landmark in the source camera target_pixel: The location of the correspondence in the target camera weight: The weight of the factor gnc_mu: The mu convexity parameter for the :class:
BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
gnc_scale: The scale parameter for the :class:BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
epsilon: Small positive valueOutputs: res: 2dof residual of the reprojection jacobian: (2x13) jacobian of res wrt args source_pose (6), target_pose (6), source_inverse_range (1) hessian: (13x13) Gauss-Newton hessian for args source_pose (6), target_pose (6), source_inverse_range (1) rhs: (13x1) Gauss-Newton rhs for args source_pose (6), target_pose (6), source_inverse_range (1)
-
template<typename Scalar>
void InverseRangeLandmarkLinearGncFactor(const sym::Pose3<Scalar> &source_pose, const sym::LinearCameraCal<Scalar> &source_calibration, const sym::Pose3<Scalar> &target_pose, const sym::LinearCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 2, 1> &source_pixel, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar weight, const Scalar gnc_mu, const Scalar gnc_scale, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const res = nullptr, Eigen::Matrix<Scalar, 2, 13> *const jacobian = nullptr, Eigen::Matrix<Scalar, 13, 13> *const hessian = nullptr, Eigen::Matrix<Scalar, 13, 1> *const rhs = nullptr)¶ Return the 2dof residual of reprojecting the landmark into the target camera and comparing against the correspondence in the target camera.
The landmark is specified as a pixel in the source camera and an inverse range; this means the landmark is fixed in the source camera and always has residual 0 there (this 0 residual is not returned, only the residual in the target camera is returned).
The norm of the residual is whitened using the :class:
BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
. Whitening each component of the reprojection error separately would result in rejecting individual components as outliers. Instead, we minimize the whitened norm of the full reprojection error for each point. See :meth:ScalarNoiseModel.whiten_norm <symforce.opt.noise_models.ScalarNoiseModel.whiten_norm>
for more information on this, and :class:BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
for more information on the noise model.Args: source_pose: The pose of the source camera source_calibration: The source camera calibration target_pose: The pose of the target camera target_calibration: The target camera calibration source_inverse_range: The inverse range of the landmark in the source camera source_pixel: The location of the landmark in the source camera target_pixel: The location of the correspondence in the target camera weight: The weight of the factor gnc_mu: The mu convexity parameter for the :class:
BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
gnc_scale: The scale parameter for the :class:BarronNoiseModel <symforce.opt.noise_models.BarronNoiseModel>
epsilon: Small positive valueOutputs: res: 2dof residual of the reprojection jacobian: (2x13) jacobian of res wrt args source_pose (6), target_pose (6), source_inverse_range (1) hessian: (13x13) Gauss-Newton hessian for args source_pose (6), target_pose (6), source_inverse_range (1) rhs: (13x1) Gauss-Newton rhs for args source_pose (6), target_pose (6), source_inverse_range (1)
-
template<typename Scalar>
void InverseRangeLandmarkOrthographicGncFactor(const sym::Pose3<Scalar> &source_pose, const sym::Pose3<Scalar> &target_pose, const sym::OrthographicCameraCal<Scalar> &target_calibration, const Scalar source_inverse_range, const Eigen::Matrix<Scalar, 3, 1> &p_camera_source, const Eigen::Matrix<Scalar, 2, 1> &target_pixel, const Scalar weight, const Scalar gnc_mu, const Scalar gnc_scale, const Scalar epsilon, Eigen::Matrix<Scalar, 2, 1> *const res = nullptr, Eigen::Matrix<Scalar, 2, 13> *const jacobian
-
template<typename Scalar>