gtsam
Loading...
Searching...
No Matches
Mechanization_bRn2.h
Go to the documentation of this file.
1
7
8#pragma once
9
10#include <gtsam/config.h>
11
12#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V43
13
14#include <gtsam/base/Vector.h>
16#include <gtsam/geometry/Rot3.h>
17#include <gtsam_unstable/dllexport.h>
18
19#include <list>
20
21namespace gtsam {
22
28class GTSAM_UNSTABLE_EXPORT Mechanization_bRn2 {
29
30private:
31 Rot3 bRn_;
32 Vector3 x_g_;
33 Vector3 x_a_;
34
35public:
36
43 Mechanization_bRn2(const Rot3& initial_bRn = Rot3(),
44 const Vector3& initial_x_g = Z_3x1, const Vector3& initial_x_a = Z_3x1) :
45 bRn_(initial_bRn), x_g_(initial_x_g), x_a_(initial_x_a) {
46 }
47
49 Mechanization_bRn2(const Mechanization_bRn2& other) = default;
50
51 Mechanization_bRn2& operator=(const Mechanization_bRn2& other) = default;
52
54 Vector3 b_g(double g_e) const {
55 Vector3 n_g(0, 0, g_e);
56 return bRn_ * n_g;
57 }
58
59 const Rot3& bRn() const {return bRn_; }
60 const Vector3& x_g() const { return x_g_; }
61 const Vector3& x_a() const { return x_a_; }
62
70 static Mechanization_bRn2 initializeVector(const std::list<Vector>& U,
71 const std::list<Vector>& F, const double g_e = 0, bool flat=false);
72
74 static Mechanization_bRn2 initialize(const Matrix& U,
75 const Matrix& F, const double g_e = 0, bool flat=false);
76
82 Mechanization_bRn2 correct(const Vector9& dx) const;
83
90 Mechanization_bRn2 integrate(const Vector3& u, const double dt) const;
91
93 void print(const std::string& s = "") const {
94 bRn_.print(s + ".R");
95
96 std::cout << s + ".x_g" << x_g_ << std::endl;
97 std::cout << s + ".x_a" << x_a_ << std::endl;
98 }
99};
100
101} // namespace gtsam
102
103#endif // GTSAM_ALLOW_DEPRECATED_SINCE_V43
Macros for Vector constants to avoid excessive template instantiation.
typedef and functions to augment Eigen's VectorXd
3D rotation represented as a rotation matrix or quaternion
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