38template <
class PIM = Pre
integratedCombinedMeasurements,
class GRAVITY = Unit3>
41 imuBias::ConstantBias, imuBias::ConstantBias,
51 double gravityMagnitude_;
84 preintegratedMeasurements.residualCovariance()),
85 pose_i, vel_i, pose_j, vel_j, bias_i, bias_j, gravity),
86 pim_(preintegratedMeasurements),
87 gravityMagnitude_(internal::resolveGravityMagnitude<GRAVITY>(
88 "CombinedImuFactorWithGravityT", preintegratedMeasurements,
91 ~CombinedImuFactorWithGravityT()
override {}
94 gtsam::NonlinearFactor::shared_ptr
clone()
const override {
95 return std::make_shared<This>(*
this);
115 const Pose3& pose_j,
const Vector3& vel_j,
124#if GTSAM_ENABLE_BOOST_SERIALIZATION
126 friend class boost::serialization::access;
127 template <
class ARCHIVE>
128 void serialize(ARCHIVE& ar,
const unsigned int ) {
130 ar& boost::serialization::make_nvp(
131 "NoiseModelFactor7", boost::serialization::base_object<Base>(*
this));
132 ar& BOOST_SERIALIZATION_NVP(pim_);
133 ar& BOOST_SERIALIZATION_NVP(gravityMagnitude_);
150template <
class PIM,
class GRAVITY>
151GTSAM_EXPORT std::ostream& operator<<(
154template <
class PIM,
class GRAVITY>
156 :
public Testable<CombinedImuFactorWithGravityT<PIM, GRAVITY>> {};
Global functions in a separate testing namespace.
Definition chartTesting.h:28
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition Key.cpp:30
CombinedImuFactorWithGravityT< PreintegratedCombinedMeasurements, Unit3 > CombinedImuFactorWithGravityDirection
CombinedImuFactor variant optimizing the gravity direction (Unit3) with a fixed, known magnitude; see...
Definition CombinedImuFactorWithGravity.h:141
Matrix * OptionalMatrixType
This typedef will be used everywhere boost::optional<Matrix&> reference was used previously.
Definition NonlinearFactor.h:57
NoiseModelFactorT< Vector, ValueTypes... > NoiseModelFactorN
Noise model factor with N value types and dynamic-sized error vector.
Definition NoiseModelFactorN.h:561
CombinedImuFactorWithGravityT< PreintegratedCombinedMeasurements, Point3 > CombinedImuFactorWithGravityVector
CombinedImuFactor variant optimizing the free gravity vector (Point3); see ImuFactorWithGravityVector...
Definition CombinedImuFactorWithGravity.h:146
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:43
All noise models live in the noiseModel namespace.
Definition LossFunctions.cpp:33
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:152
A 3D pose (R,t) : (Rot3,Point3).
Definition Pose3.h:42
CombinedImuFactorWithGravityT is CombinedImuFactorT with an additional GRAVITY variable,...
Definition CombinedImuFactorWithGravity.h:42
CombinedImuFactorWithGravityT(Key pose_i, Key vel_i, Key pose_j, Key vel_j, Key bias_i, Key bias_j, Key gravity, const PIM &preintegratedMeasurements, std::optional< double > gravityMagnitude={})
Constructor.
Definition CombinedImuFactorWithGravity.h:79
gtsam::NonlinearFactor::shared_ptr clone() const override
Definition CombinedImuFactorWithGravity.h:94
CombinedImuFactorWithGravityT()
Default constructor - only use for serialization.
Definition CombinedImuFactorWithGravity.h:61
Vector evaluateError(const Pose3 &pose_i, const Vector3 &vel_i, const Pose3 &pose_j, const Vector3 &vel_j, const imuBias::ConstantBias &bias_i, const imuBias::ConstantBias &bias_j, const GRAVITY &gravity, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3, OptionalMatrixType H4, OptionalMatrixType H5, OptionalMatrixType H6, OptionalMatrixType H7) const override
implement functions needed to derive from Factor
Definition CombinedImuFactorWithGravity.cpp:66
std::shared_ptr< This > shared_ptr
Definition CombinedImuFactorWithGravity.h:58
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print
Definition CombinedImuFactorWithGravity.cpp:44
const PIM & preintegratedMeasurements() const
Definition CombinedImuFactorWithGravity.h:106
double gravityMagnitude() const
Definition CombinedImuFactorWithGravity.h:109
bool equals(const NonlinearFactor &expected, double tol=1e-9) const override
Check if two factors are equal.
Definition CombinedImuFactorWithGravity.cpp:56
virtual Vector evaluateError(const ValueTypes &... x, OptionalMatrixTypeT< ValueTypes >... H) const=0
Nonlinear factor base class.
Definition NonlinearFactor.h:70
Gaussian implements the mathematical model |R*x|^2 = |y|^2 with R'*R=inv(Sigma) where y = whiten(x) =...
Definition NoiseModel.h:192