41 boost::optional<Vector3> omega_coriolis)
42 : gyroscopeCovariance(gyroscope_covariance) {
44 omegaCoriolis.reset(omega_coriolis.get());
47 virtual ~PreintegratedRotationParams() {}
49 virtual void print(
const std::string& s)
const;
50 virtual bool equals(
const PreintegratedRotationParams& other,
double tol=1e-9)
const;
52 void setGyroscopeCovariance(
const Matrix3& cov) { gyroscopeCovariance = cov; }
53 void setOmegaCoriolis(
const Vector3& omega) { omegaCoriolis.reset(omega); }
54 void setBodyPSensor(
const Pose3& pose) { body_P_sensor.reset(pose); }
56 const Matrix3& getGyroscopeCovariance()
const {
return gyroscopeCovariance; }
57 boost::optional<Vector3> getOmegaCoriolis()
const {
return omegaCoriolis; }
58 boost::optional<Pose3> getBodyPSensor()
const {
return body_P_sensor; }
62 friend class boost::serialization::access;
63 template<
class ARCHIVE>
64 void serialize(ARCHIVE & ar,
const unsigned int ) {
65 namespace bs = ::boost::serialization;
66 ar & BOOST_SERIALIZATION_NVP(gyroscopeCovariance);
67 ar & BOOST_SERIALIZATION_NVP(body_P_sensor);
70 bool omegaCoriolisFlag = omegaCoriolis.is_initialized();
71 ar & boost::serialization::make_nvp(
"omegaCoriolisFlag", omegaCoriolisFlag);
72 if (omegaCoriolisFlag) {
73 ar & BOOST_SERIALIZATION_NVP(*omegaCoriolis);
77#ifdef GTSAM_USE_QUATERNIONS
95 boost::shared_ptr<Params>
p_;
115 double deltaTij,
const Rot3& deltaRij,
116 const Matrix3& delRdelBiasOmega)
117 : p_(p), deltaTij_(deltaTij), deltaRij_(deltaRij), delRdelBiasOmega_(delRdelBiasOmega) {}
125 void resetIntegration();
129 return p_ == other.
p_;
135 const boost::shared_ptr<Params>& params()
const {
138 const double& deltaTij()
const {
141 const Rot3& deltaRij()
const {
144 const Matrix3& delRdelBiasOmega()
const {
145 return delRdelBiasOmega_;
151 void print(
const std::string& s)
const;
152 bool equals(
const PreintegratedRotation& other,
double tol)
const;
161 Rot3 incrementalRotation(
const Vector3& measuredOmega,
const Vector3& biasHat,
double deltaT,
162 OptionalJacobian<3, 3> D_incrR_integratedOmega)
const;
166 void integrateMeasurement(
const Vector3& measuredOmega,
const Vector3& biasHat,
double deltaT,
167 OptionalJacobian<3, 3> D_incrR_integratedOmega = boost::none,
168 OptionalJacobian<3, 3> F = boost::none);
171 Rot3 biascorrectedDeltaRij(
const Vector3& biasOmegaIncr,
172 OptionalJacobian<3, 3> H = boost::none)
const;
175 Vector3 integrateCoriolis(
const Rot3& rot_i)
const;
181 friend class boost::serialization::access;
182 template <
class ARCHIVE>
183 void serialize(ARCHIVE& ar,
const unsigned int ) {
184 ar& BOOST_SERIALIZATION_NVP(p_);
185 ar& BOOST_SERIALIZATION_NVP(deltaTij_);
186 ar& BOOST_SERIALIZATION_NVP(deltaRij_);
187 ar& BOOST_SERIALIZATION_NVP(delRdelBiasOmega_);
190#ifdef GTSAM_USE_QUATERNIONS
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition: types.h:277
typedef and functions to augment Eigen's MatrixXd
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
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:151
Parameters for pre-integration: Usage: Create just a single Params and pass a shared pointer to the c...
Definition: PreintegratedRotation.h:31
boost::optional< Pose3 > body_P_sensor
The pose of the sensor in the body frame.
Definition: PreintegratedRotation.h:36
boost::optional< Vector3 > omegaCoriolis
Coriolis constant.
Definition: PreintegratedRotation.h:35
Matrix3 gyroscopeCovariance
Continuous-time "Covariance" of gyroscope measurements The units for stddev are σ = rad/s/√Hz.
Definition: PreintegratedRotation.h:34
PreintegratedRotation is the base class for all PreintegratedMeasurements classes (in AHRSFactor,...
Definition: PreintegratedRotation.h:89
Matrix3 delRdelBiasOmega_
Jacobian of preintegrated rotation w.r.t. angular rate bias.
Definition: PreintegratedRotation.h:99
boost::shared_ptr< Params > p_
Parameters.
Definition: PreintegratedRotation.h:95
PreintegratedRotation(const boost::shared_ptr< Params > &p, double deltaTij, const Rot3 &deltaRij, const Matrix3 &delRdelBiasOmega)
Explicit initialization of all class members.
Definition: PreintegratedRotation.h:114
PreintegratedRotation(const boost::shared_ptr< Params > &p)
Default constructor, resets integration to zero.
Definition: PreintegratedRotation.h:109
double deltaTij_
Time interval from i to j.
Definition: PreintegratedRotation.h:97
bool matchesParamsWith(const PreintegratedRotation &other) const
check parameters equality: checks whether shared pointer points to same Params object.
Definition: PreintegratedRotation.h:128
PreintegratedRotation()
Default constructor for serialization.
Definition: PreintegratedRotation.h:102
Rot3 deltaRij_
Preintegrated relative orientation (in frame i)
Definition: PreintegratedRotation.h:98