PreintegrationCombinedParams.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 
23 #pragma once
24 
25 /* GTSAM includes */
26 #include <gtsam/base/Matrix.h>
31 
32 namespace gtsam {
33 
39  Matrix3 biasOmegaCovariance;
41  Matrix6 biasAccOmegaInt;
43 
47  : biasAccCovariance(I_3x3),
48  biasOmegaCovariance(I_3x3),
49  biasAccOmegaInt(I_6x6) {}
50 
54  : PreintegrationParams(n_gravity_),
55  biasAccCovariance(I_3x3),
56  biasOmegaCovariance(I_3x3),
57  biasAccOmegaInt(I_6x6) {}
58 
59  // Default Params for a Z-down navigation frame, such as NED: gravity points
60  // along positive Z-axis
61  static std::shared_ptr<PreintegrationCombinedParams> MakeSharedD(
62  double g = 9.81) {
63  return std::shared_ptr<PreintegrationCombinedParams>(
65  }
66 
67  // Default Params for a Z-up navigation frame, such as ENU: gravity points
68  // along negative Z-axis
69  static std::shared_ptr<PreintegrationCombinedParams> MakeSharedU(
70  double g = 9.81) {
71  return std::shared_ptr<PreintegrationCombinedParams>(
73  }
74 
75  void print(const std::string& s = "") const override;
77  double tol) const override;
78 
79  void setBiasAccCovariance(const Matrix3& cov) { biasAccCovariance = cov; }
80  void setBiasOmegaCovariance(const Matrix3& cov) { biasOmegaCovariance = cov; }
81  void setBiasAccOmegaInit(const Matrix6& cov) { biasAccOmegaInt = cov; }
82 
83  const Matrix3& getBiasAccCovariance() const { return biasAccCovariance; }
84  const Matrix3& getBiasOmegaCovariance() const { return biasOmegaCovariance; }
85  const Matrix6& getBiasAccOmegaInit() const { return biasAccOmegaInt; }
86 
87  private:
88 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
89 
90  friend class boost::serialization::access;
91  template <class ARCHIVE>
92  void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
93  namespace bs = ::boost::serialization;
94  ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(PreintegrationParams);
95  ar& BOOST_SERIALIZATION_NVP(biasAccCovariance);
96  ar& BOOST_SERIALIZATION_NVP(biasOmegaCovariance);
97  ar& BOOST_SERIALIZATION_NVP(biasAccOmegaInt);
98  }
99 #endif
100 
101  public:
103 };
104 
105 } // namespace gtsam
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
static std::shared_ptr< PreintegrationCombinedParams > MakeSharedD(double g=9.81)
Eigen::Vector3d Vector3
Definition: Vector.h:43
PreintegrationCombinedParams(const Vector3 &n_gravity_)
std::string serialize(const T &input)
serializes to a string
void g(const string &key, int i)
Definition: testBTree.cpp:41
RealScalar s
traits
Definition: chartTesting.h:28
Non-linear factor base classes.
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
Definition: types.h:284
const G double tol
Definition: Group.h:86
static std::shared_ptr< PreintegrationCombinedParams > MakeSharedU(double g=9.81)


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:35:15