Mechanization_bRn2.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <gtsam/geometry/Rot3.h>
11 #include <gtsam/base/Vector.h>
12 #include <gtsam_unstable/dllexport.h>
13 #include <list>
14 
15 namespace gtsam {
16 
17 class GTSAM_UNSTABLE_EXPORT Mechanization_bRn2 {
18 
19 private:
23 
24 public:
25 
32  Mechanization_bRn2(const Rot3& initial_bRn = Rot3(),
33  const Vector3& initial_x_g = Z_3x1, const Vector3& initial_x_a = Z_3x1) :
34  bRn_(initial_bRn), x_g_(initial_x_g), x_a_(initial_x_a) {
35  }
36 
39  bRn_(other.bRn_), x_g_(other.x_g_), x_a_(other.x_a_) {
40  }
41 
43  Vector3 b_g(double g_e) const {
44  Vector3 n_g(0, 0, g_e);
45  return bRn_ * n_g;
46  }
47 
48  const Rot3& bRn() const {return bRn_; }
49  const Vector3& x_g() const { return x_g_; }
50  const Vector3& x_a() const { return x_a_; }
51 
59  static Mechanization_bRn2 initializeVector(const std::list<Vector>& U,
60  const std::list<Vector>& F, const double g_e = 0, bool flat=false);
61 
63  static Mechanization_bRn2 initialize(const Matrix& U,
64  const Matrix& F, const double g_e = 0, bool flat=false);
65 
71  Mechanization_bRn2 correct(const Vector9& dx) const;
72 
79  Mechanization_bRn2 integrate(const Vector3& u, const double dt) const;
80 
82  void print(const std::string& s = "") const {
83  bRn_.print(s + ".R");
84 
85  std::cout << s + ".x_g" << x_g_ << std::endl;
86  std::cout << s + ".x_a" << x_a_ << std::endl;
87  }
88 
89 };
90 
91 } // namespace gtsam
g_e
double g_e
Definition: testAHRS.cpp:21
gtsam::Rot3::print
void print(const std::string &s="") const
Definition: Rot3.cpp:33
Vector.h
typedef and functions to augment Eigen's VectorXd
s
RealScalar s
Definition: level1_cplx_impl.h:126
gtsam::Mechanization_bRn2::x_g_
Vector3 x_g_
gyroscope bias
Definition: Mechanization_bRn2.h:21
gtsam::Z_3x1
static const Eigen::MatrixBase< Vector3 >::ConstantReturnType Z_3x1
Definition: Vector.h:46
gtsam::Mechanization_bRn2::print
void print(const std::string &s="") const
print
Definition: Mechanization_bRn2.h:82
dt
const double dt
Definition: testVelocityConstraint.cpp:15
gtsam::Mechanization_bRn2::x_a_
Vector3 x_a_
accelerometer bias
Definition: Mechanization_bRn2.h:22
gtsam::Matrix
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
gtsam::Vector3
Eigen::Vector3d Vector3
Definition: Vector.h:43
gtsam::Mechanization_bRn2::bRn_
Rot3 bRn_
rotation from nav to body
Definition: Mechanization_bRn2.h:20
Rot3.h
3D rotation represented as a rotation matrix or quaternion
gtsam::Mechanization_bRn2::b_g
Vector3 b_g(double g_e) const
gravity in the body frame
Definition: Mechanization_bRn2.h:43
gtsam::Mechanization_bRn2::bRn
const Rot3 & bRn() const
Definition: Mechanization_bRn2.h:48
gtsam::Mechanization_bRn2
Definition: Mechanization_bRn2.h:17
gtsam::Rot3
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
Definition: Rot3.h:58
gtsam::symbol_shorthand::F
Key F(std::uint64_t j)
Definition: inference/Symbol.h:153
gtsam::Mechanization_bRn2::Mechanization_bRn2
Mechanization_bRn2(const Rot3 &initial_bRn=Rot3(), const Vector3 &initial_x_g=Z_3x1, const Vector3 &initial_x_a=Z_3x1)
Definition: Mechanization_bRn2.h:32
gtsam
traits
Definition: SFMdata.h:40
gtsam::Mechanization_bRn2::x_a
const Vector3 & x_a() const
Definition: Mechanization_bRn2.h:50
gtsam::Mechanization_bRn2::x_g
const Vector3 & x_g() const
Definition: Mechanization_bRn2.h:49
gtsam::Mechanization_bRn2::Mechanization_bRn2
Mechanization_bRn2(const Mechanization_bRn2 &other)
Copy constructor.
Definition: Mechanization_bRn2.h:38
U
@ U
Definition: testDecisionTree.cpp:349
gtsam::lago::initialize
Values initialize(const NonlinearFactorGraph &graph, bool useOdometricPath)
Definition: lago.cpp:375
pybind_wrapper_test_script.other
other
Definition: pybind_wrapper_test_script.py:42


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:10