gtsam
Loading...
Searching...
No Matches
TangentPreintegration.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4 * Atlanta, Georgia 30332-0415
5 * All Rights Reserved
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8 * See LICENSE for the license information
9
10 * -------------------------------------------------------------------------- */
11
17
18#pragma once
19
21
22namespace gtsam {
23
28class GTSAM_EXPORT TangentPreintegration : public PreintegrationBase {
29 protected:
30
38
41 resetIntegration();
42 }
43
44public:
47
53 TangentPreintegration(const std::shared_ptr<Params>& p,
55
58 }
59
61
65 void resetIntegration() override;
66
68
71 Vector3 deltaPij() const override { return preintegrated_.segment<3>(3); }
72 Vector3 deltaVij() const override { return preintegrated_.tail<3>(); }
73 Rot3 deltaRij() const override { return Rot3::Expmap(theta()); }
74 Vector3 so3TangentAt(double t) const override;
75 NavState deltaXij() const override {
76 return internal::navStateComponentWiseRetract(NavState(), preintegrated_);
77 }
78
79 const Vector9& preintegrated() const { return preintegrated_; }
80 Vector3 theta() const { return preintegrated_.head<3>(); }
81 const Matrix93& preintegrated_H_biasAcc() const { return preintegrated_H_biasAcc_; }
82 const Matrix93& preintegrated_H_biasOmega() const { return preintegrated_H_biasOmega_; }
83
86 bool equals(const TangentPreintegration& other, double tol) const;
88
91
92 // Update integrated vector on tangent manifold preintegrated with acceleration
93 // Static, functional version.
94 static Vector9 UpdatePreintegrated(const Vector3& a_body,
95 const Vector3& w_body, const double dt,
96 const Vector9& preintegrated,
97 OptionalJacobian<9, 9> A = {},
98 OptionalJacobian<9, 3> B = {},
99 OptionalJacobian<9, 3> C = {});
100
105 void update(const Vector3& measuredAcc, const Vector3& measuredOmega,
106 const double dt, Matrix9* A, Matrix93* B, Matrix93* C) override;
107
111 Vector9 biasCorrectedDelta(const imuBias::ConstantBias& bias_i,
112 OptionalJacobian<9, 6> H = {}) const override;
113
114 // Compose the two pre-integrated 9D-vectors zeta01 and zeta02, with derivatives
115 static Vector9 Compose(const Vector9& zeta01, const Vector9& zeta12,
116 double deltaT12,
117 OptionalJacobian<9, 9> H1 = {},
118 OptionalJacobian<9, 9> H2 = {});
119
122 void mergeWith(const TangentPreintegration& pim, Matrix9* H1, Matrix9* H2);
124
126 virtual std::shared_ptr<TangentPreintegration> clone() const {
127 return std::shared_ptr<TangentPreintegration>();
128 }
129
131
132private:
133#if GTSAM_ENABLE_BOOST_SERIALIZATION
135 friend class boost::serialization::access;
136 template<class ARCHIVE>
137 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
138 namespace bs = ::boost::serialization;
139 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(PreintegrationBase);
140 ar & BOOST_SERIALIZATION_NVP(preintegrated_);
141 ar & BOOST_SERIALIZATION_NVP(preintegrated_H_biasAcc_);
142 ar & BOOST_SERIALIZATION_NVP(preintegrated_H_biasOmega_);
143 }
144#endif
145};
146
147}
Global functions in a separate testing namespace.
Definition chartTesting.h:28
Definition ImuBias.h:34
PreintegrationBase is the base class for PreintegratedMeasurements (in ImuFactor) and CombinedPreinte...
Definition PreintegrationBase.h:45
PreintegrationBase()
Default constructor for serialization.
Definition PreintegrationBase.h:63
Integrate on the 9D tangent space of the NavState manifold.
Definition TangentPreintegration.h:28
Matrix93 preintegrated_H_biasOmega_
Jacobian of preintegrated_ w.r.t. angular rate bias.
Definition TangentPreintegration.h:37
~TangentPreintegration() override
Virtual destructor.
Definition TangentPreintegration.h:57
Vector9 preintegrated_
Preintegrated navigation state, as a 9D vector on tangent space at frame i Order is: theta,...
Definition TangentPreintegration.h:35
TangentPreintegration()
Default constructor for serialization.
Definition TangentPreintegration.h:40
virtual std::shared_ptr< TangentPreintegration > clone() const
Dummy clone for MATLAB.
Definition TangentPreintegration.h:126
Matrix93 preintegrated_H_biasAcc_
Jacobian of preintegrated_ w.r.t. acceleration bias.
Definition TangentPreintegration.h:36