53 const Vector3& biasHat) :
68 const boost::shared_ptr<Params>& p,
69 const Vector3& bias_hat,
72 const Matrix3& delRdelBiasOmega,
73 const Matrix3& preint_meas_cov) :
76 preintMeasCov_(preint_meas_cov) {}
78 Params& p()
const {
return *boost::static_pointer_cast<Params>(p_);}
79 const Vector3& biasHat()
const {
return biasHat_; }
80 const Matrix3& preintMeasCov()
const {
return preintMeasCov_; }
83 void print(
const std::string& s =
"Preintegrated Measurements: ")
const;
86 bool equals(
const PreintegratedAhrsMeasurements&,
double tol = 1e-9)
const;
89 void resetIntegration();
96 void integrateMeasurement(
const Vector3& measuredOmega,
double deltaT);
100 Vector3 predict(
const Vector3& bias, OptionalJacobian<3,3> H = boost::none)
const;
104 static Vector DeltaAngles(
const Vector& msr_gyro_t,
const double msr_dt,
105 const Vector3& delta_angles);
109 const Matrix3& measuredOmegaCovariance)
112 p_->gyroscopeCovariance = measuredOmegaCovariance;
119 friend class boost::serialization::access;
120 template<
class ARCHIVE>
121 void serialize(ARCHIVE & ar,
const unsigned int ) {
123 ar & BOOST_SERIALIZATION_NVP(p_);
124 ar & BOOST_SERIALIZATION_NVP(biasHat_);
141#if !defined(_MSC_VER) && __GNUC__ == 4 && __GNUC_MINOR__ > 5
142 typedef typename boost::shared_ptr<AHRSFactor> shared_ptr;
161 gtsam::NonlinearFactor::shared_ptr clone()
const override;
165 DefaultKeyFormatter)
const override;
178 Vector evaluateError(
const Rot3& rot_i,
const Rot3& rot_j,
179 const Vector3& bias, boost::optional<Matrix&> H1 = boost::none,
180 boost::optional<Matrix&> H2 = boost::none, boost::optional<Matrix&> H3 =
181 boost::none)
const override;
186 const Rot3& rot_i,
const Vector3& bias,
195 const Vector3& omegaCoriolis,
196 const boost::optional<Pose3>& body_P_sensor = boost::none);
199 static Rot3 predict(
const Rot3& rot_i,
const Vector3& bias,
201 const Vector3& omegaCoriolis,
202 const boost::optional<Pose3>& body_P_sensor = boost::none);
207 friend class boost::serialization::access;
208 template<
class ARCHIVE>
209 void serialize(ARCHIVE & ar,
const unsigned int ) {
211 & boost::serialization::make_nvp(
"NoiseModelFactor3",
212 boost::serialization::base_object<Base>(*
this));
213 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
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > make_shared(Args &&... args)
Add our own make_shared as a layer of wrapping on boost::make_shared This solves the problem with the...
Definition: make_shared.h:57
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
Template to create a binary predicate.
Definition: Testable.h:111
This is the base class for all factor types.
Definition: Factor.h:56
PreintegratedAHRSMeasurements accumulates (integrates) the Gyroscope measurements (rotation rates) an...
Definition: AHRSFactor.h:34
Vector3 biasHat_
Angular rate bias values used during preintegration.
Definition: AHRSFactor.h:38
PreintegratedAhrsMeasurements(const Vector3 &biasHat, const Matrix3 &measuredOmegaCovariance)
Definition: AHRSFactor.h:108
PreintegratedAhrsMeasurements(const boost::shared_ptr< Params > &p, const Vector3 &biasHat)
Default constructor, initialize with no measurements.
Definition: AHRSFactor.h:52
Matrix3 preintMeasCov_
Covariance matrix of the preintegrated measurements (first-order propagation from measurementCovarian...
Definition: AHRSFactor.h:39
PreintegratedAhrsMeasurements(const boost::shared_ptr< Params > &p, const Vector3 &bias_hat, double deltaTij, const Rot3 &deltaRij, const Matrix3 &delRdelBiasOmega, const Matrix3 &preint_meas_cov)
Non-Default constructor, initialize with measurements.
Definition: AHRSFactor.h:67
PreintegratedAhrsMeasurements()
Default constructor, only for serialization and wrappers.
Definition: AHRSFactor.h:46
Definition: AHRSFactor.h:128
PreintegratedAhrsMeasurements PreintegratedMeasurements
Definition: AHRSFactor.h:190
const PreintegratedAhrsMeasurements & preintegratedMeasurements() const
Access the preintegrated measurements.
Definition: AHRSFactor.h:171
boost::shared_ptr< AHRSFactor > shared_ptr
Shorthand for a smart pointer to a factor.
Definition: AHRSFactor.h:144
Parameters for pre-integration: Usage: Create just a single Params and pass a shared pointer to the c...
Definition: PreintegratedRotation.h:31
PreintegratedRotation is the base class for all PreintegratedMeasurements classes (in AHRSFactor,...
Definition: PreintegratedRotation.h:89
Nonlinear factor base class.
Definition: NonlinearFactor.h:43
A convenient base class for creating your own NoiseModelFactor with 3 variables.
Definition: NonlinearFactor.h:444