47 Base(model, i, j), measured_(measured) {
78 Base(model, b1, i, b2, j), measured_(measured) {
86 if (H1 || H2 || H3 || H4) {
88 Matrix D_pose_g_base1, D_pose_g_pose;
89 Pose2 pose_g = base1.
compose(pose, D_pose_g_base1, D_pose_g_pose);
90 Matrix D_point_g_base2, D_point_g_point;
93 Matrix D_e_pose_g, D_e_point_g;
96 *H1 = D_e_pose_g * D_pose_g_base1;
98 *H2 = D_e_pose_g * D_pose_g_pose;
100 *H3 = D_e_point_g * D_point_g_base2;
102 *H4 = D_e_point_g * D_point_g_point;
134 Base(model, b1, i, b2, j), measured_(measured) {
142 if (H1 || H2 || H3 || H4) {
144 Matrix D_pose1_g_base1, D_pose1_g_pose1;
145 Pose2 pose1_g = base1.
compose(pose1, D_pose1_g_base1, D_pose1_g_pose1);
146 Matrix D_pose2_g_base2, D_pose2_g_pose2;
147 Pose2 pose2_g = base2.
compose(pose2, D_pose2_g_base2, D_pose2_g_pose2);
148 Matrix D_e_pose1_g, D_e_pose2_g;
149 Pose2 d = pose1_g.
between(pose2_g, D_e_pose1_g, D_e_pose2_g);
151 *H1 = D_e_pose1_g * D_pose1_g_base1;
153 *H2 = D_e_pose1_g * D_pose1_g_pose1;
155 *H3 = D_e_pose2_g * D_pose2_g_base2;
157 *H4 = D_e_pose2_g * D_pose2_g_pose2;
Vector evaluateError(const Pose2 &pose, const Point2 &point, OptionalMatrixType H1, OptionalMatrixType H2) const override
Evaluate measurement error h(x)-z.
GTSAM_EXPORT Point2 transformFrom(const Point2 &point, OptionalJacobian< 2, 3 > Dpose={}, OptionalJacobian< 2, 2 > Dpoint={}) const
NoiseModelFactorN< Pose2, Point2 > Base
noiseModel::Diagonal::shared_ptr model
NoiseModelFactorN< Pose2, Pose2, Pose2, Pose2 > Base
virtual Vector evaluateError(const ValueTypes &... x, OptionalMatrixTypeT< ValueTypes >... H) const=0
std::shared_ptr< This > shared_ptr
Vector evaluateError(const Pose2 &base1, const Pose2 &pose1, const Pose2 &base2, const Pose2 &pose2, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3, OptionalMatrixType H4) const override
Evaluate measurement error h(x)-z.
std::shared_ptr< This > shared_ptr
Point2 measured_
the measurement
TangentVector localCoordinates(const Class &g) const
localCoordinates as required by manifold concept: finds tangent vector between *this and g ...
Matrix * OptionalMatrixType
Class compose(const Class &g) const
NoiseModelFactorN< Pose2, Pose2, Pose2, Point2 > Base
static const Pose3 pose1(Rot3(), Point3(0, 1, 0.5))
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
OdometryFactorBase(Key b1, Key i, Key b2, Key j, const Pose2 &measured, const SharedNoiseModel &model)
Constructor.
Non-linear factor base classes.
Class between(const Class &g) const
std::shared_ptr< This > shared_ptr
DeltaFactorBase(Key b1, Key i, Key b2, Key j, const Point2 &measured, const SharedNoiseModel &model)
Constructor.
Vector evaluateError(const Pose2 &base1, const Pose2 &pose, const Pose2 &base2, const Point2 &point, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3, OptionalMatrixType H4) const override
Evaluate measurement error h(x)-z.
GTSAM_EXPORT Point2 transformTo(const Point2 &point, OptionalJacobian< 2, 3 > Dpose={}, OptionalJacobian< 2, 2 > Dpoint={}) const
DeltaFactor(Key i, Key j, const Point2 &measured, const SharedNoiseModel &model)
Constructor.
std::uint64_t Key
Integer nonlinear key type.
Pose2 measured_
the measurement
noiseModel::Base::shared_ptr SharedNoiseModel
Point2 measured_
the measurement