gtsam
Loading...
Searching...
No Matches
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
22
23#pragma once
24
25/* GTSAM includes */
26#include <gtsam/base/Matrix.h>
31
32namespace gtsam {
33
42
46 : biasAccCovariance(I_3x3),
47 biasOmegaCovariance(I_3x3) {
48#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V43
49 biasAccOmegaInt.setZero();
50#endif
51 }
52
55 PreintegrationCombinedParams(const Vector3& n_gravity_)
56 : PreintegrationParams(n_gravity_),
57 biasAccCovariance(I_3x3),
58 biasOmegaCovariance(I_3x3) {
59#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V43
60 biasAccOmegaInt.setZero();
61#endif
62 }
63
64 // Default Params for a Z-down navigation frame, such as NED: gravity points
65 // along positive Z-axis
66 static std::shared_ptr<PreintegrationCombinedParams> MakeSharedD(
67 double g = 9.81) {
68 return std::shared_ptr<PreintegrationCombinedParams>(
69 new PreintegrationCombinedParams(Vector3(0, 0, g)));
70 }
71
72 // Default Params for a Z-up navigation frame, such as ENU: gravity points
73 // along negative Z-axis
74 static std::shared_ptr<PreintegrationCombinedParams> MakeSharedU(
75 double g = 9.81) {
76 return std::shared_ptr<PreintegrationCombinedParams>(
77 new PreintegrationCombinedParams(Vector3(0, 0, -g)));
78 }
79
80 void print(const std::string& s = "") const override;
81 bool equals(const PreintegratedRotationParams& other,
82 double tol) const override;
83
84 void setBiasAccCovariance(const Matrix3& cov) { biasAccCovariance = cov; }
85 void setBiasOmegaCovariance(const Matrix3& cov) { biasOmegaCovariance = cov; }
86
87 const Matrix3& getBiasAccCovariance() const { return biasAccCovariance; }
88 const Matrix3& getBiasOmegaCovariance() const { return biasOmegaCovariance; }
89
90#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V43
91 Matrix6 biasAccOmegaInt;
93 void setBiasAccOmegaInit(const Matrix6& cov) {
94 std::cerr << "Warning: setBiasAccOmegaInit() is deprecated and no longer used." << std::endl;
95 biasAccOmegaInt = cov;
96 }
98 const Matrix6& getBiasAccOmegaInit() const {
99 std::cerr << "Warning: getBiasAccOmegaInit() is deprecated and no longer used." << std::endl;
100 return biasAccOmegaInt;
101 }
102#endif
103
104 private:
105#if GTSAM_ENABLE_BOOST_SERIALIZATION
107 friend class boost::serialization::access;
108 template <class ARCHIVE>
109 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
110 namespace bs = ::boost::serialization;
111 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(PreintegrationParams);
112 ar& BOOST_SERIALIZATION_NVP(biasAccCovariance);
113 ar& BOOST_SERIALIZATION_NVP(biasOmegaCovariance);
114#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V43
115 ar& BOOST_SERIALIZATION_NVP(biasAccOmegaInt);
116#endif
117 }
118#endif
119};
120
121} // namespace gtsam
typedef and functions to augment Eigen's MatrixXd
Macros for Matrix constants to avoid excessive template instantiation.
Non-linear factor base classes.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:143
Parameters for pre-integration using PreintegratedCombinedMeasurements: Usage: Create just a single P...
Definition PreintegrationCombinedParams.h:37
PreintegrationCombinedParams()
Default constructor makes uninitialized params struct.
Definition PreintegrationCombinedParams.h:45
PreintegrationCombinedParams(const Vector3 &n_gravity_)
See two named constructors below for good values of n_gravity in body frame.
Definition PreintegrationCombinedParams.h:55
Matrix3 biasOmegaCovariance
continuous-time "Covariance" describing gyroscope bias random walk
Definition PreintegrationCombinedParams.h:40
Matrix3 biasAccCovariance
continuous-time "Covariance" describing accelerometer bias random walk
Definition PreintegrationCombinedParams.h:38
PreintegrationParams()
Default constructor for serialization only; fresh params use Logmap.
Definition PreintegrationParams.h:58