32#ifdef GTSAM_TANGENT_PREINTEGRATION
33typedef TangentPreintegration PreintegrationType;
35typedef ManifoldPreintegration PreintegrationType;
85 preintMeasCov_.setZero();
96 preintMeasCov_.setZero();
106 preintMeasCov_(preintMeasCov) {
114 void print(
const std::string& s =
"Preintegrated Measurements:")
const override;
120 void resetIntegration()
override;
128 void integrateMeasurement(
const Vector3& measuredAcc,
129 const Vector3& measuredOmega,
const double dt)
override;
132 void integrateMeasurements(
const Matrix& measuredAccs,
const Matrix& measuredOmegas,
138#ifdef GTSAM_TANGENT_PREINTEGRATION
145 friend class boost::serialization::access;
146 template<
class ARCHIVE>
147 void serialize(ARCHIVE & ar,
const unsigned int ) {
148 namespace bs = ::boost::serialization;
150 ar & BOOST_SERIALIZATION_NVP(preintMeasCov_);
167 imuBias::ConstantBias> {
179#if !defined(_MSC_VER) && __GNUC__ == 4 && __GNUC_MINOR__ > 5
180 typedef typename boost::shared_ptr<ImuFactor> shared_ptr;
205 gtsam::NonlinearFactor::shared_ptr clone()
const override;
209 GTSAM_EXPORT
friend std::ostream& operator<<(std::ostream& os,
const ImuFactor&);
211 DefaultKeyFormatter)
const override;
212 bool equals(
const NonlinearFactor& expected,
double tol = 1e-9)
const override;
224 Vector evaluateError(
const Pose3& pose_i,
const Vector3& vel_i,
225 const Pose3& pose_j,
const Vector3& vel_j,
227 boost::none, boost::optional<Matrix&> H2 = boost::none,
228 boost::optional<Matrix&> H3 = boost::none, boost::optional<Matrix&> H4 =
229 boost::none, boost::optional<Matrix&> H5 = boost::none)
const override;
231#ifdef GTSAM_TANGENT_PREINTEGRATION
238 static shared_ptr Merge(
const shared_ptr& f01,
const shared_ptr& f12);
243 friend class boost::serialization::access;
244 template<
class ARCHIVE>
245 void serialize(ARCHIVE & ar,
const unsigned int ) {
246 ar & boost::serialization::make_nvp(
"NoiseModelFactor5",
247 boost::serialization::base_object<Base>(*
this));
248 ar & BOOST_SERIALIZATION_NVP(_PIM_);
283 gtsam::NonlinearFactor::shared_ptr clone()
const override;
287 GTSAM_EXPORT
friend std::ostream& operator<<(std::ostream& os,
const ImuFactor2&);
289 DefaultKeyFormatter)
const override;
290 bool equals(
const NonlinearFactor& expected,
double tol = 1e-9)
const override;
304 boost::optional<Matrix&> H1 = boost::none,
305 boost::optional<Matrix&> H2 = boost::none,
306 boost::optional<Matrix&> H3 = boost::none)
const override;
311 friend class boost::serialization::access;
312 template<
class ARCHIVE>
313 void serialize(ARCHIVE & ar,
const unsigned int ) {
314 ar & boost::serialization::make_nvp(
"NoiseModelFactor3",
315 boost::serialization::base_object<Base>(*
this));
316 ar & BOOST_SERIALIZATION_NVP(_PIM_);
Non-linear factor base classes.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
std::string serialize(const T &input)
serializes to a string
Definition: serialization.h:112
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:155
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:69
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
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Template to create a binary predicate.
Definition: Testable.h:111
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:151
This is the base class for all factor types.
Definition: Factor.h:56
Definition: ImuFactor.h:71
~PreintegratedImuMeasurements() override
Virtual destructor.
Definition: ImuFactor.h:110
PreintegratedImuMeasurements(const boost::shared_ptr< PreintegrationParams > &p, const imuBias::ConstantBias &biasHat=imuBias::ConstantBias())
Constructor, initializes the class with no measurements.
Definition: ImuFactor.h:93
PreintegratedImuMeasurements(const PreintegrationType &base, const Matrix9 &preintMeasCov)
Construct preintegrated directly from members: base class and preintMeasCov.
Definition: ImuFactor.h:104
PreintegratedImuMeasurements()
Default constructor for serialization and wrappers.
Definition: ImuFactor.h:84
Matrix preintMeasCov() const
Return pre-integrated measurement covariance.
Definition: ImuFactor.h:136
Matrix9 preintMeasCov_
COVARIANCE OF: [PreintROTATION PreintPOSITION PreintVELOCITY].
Definition: ImuFactor.h:78
Definition: ImuFactor.h:167
const PreintegratedImuMeasurements & preintegratedMeasurements() const
Access the preintegrated measurements.
Definition: ImuFactor.h:217
ImuFactor()
Default constructor - only use for serialization.
Definition: ImuFactor.h:186
boost::shared_ptr< ImuFactor > shared_ptr
Shorthand for a smart pointer to a factor.
Definition: ImuFactor.h:182
Definition: ImuFactor.h:257
ImuFactor2()
Default constructor - only use for serialization.
Definition: ImuFactor.h:268
const PreintegratedImuMeasurements & preintegratedMeasurements() const
Access the preintegrated measurements.
Definition: ImuFactor.h:295
IMU pre-integration on NavSatet manifold.
Definition: ManifoldPreintegration.h:33
Navigation state: Pose (rotation, translation) + velocity NOTE(frank): it does not make sense to make...
Definition: NavState.h:34
A convenient base class for creating your own NoiseModelFactor with 3 variables.
Definition: NonlinearFactor.h:444
A convenient base class for creating your own NoiseModelFactor with 5 variables.
Definition: NonlinearFactor.h:602