gtsam
Loading...
Searching...
No Matches
Pose3Upright.h
Go to the documentation of this file.
1
11
12#pragma once
13
14#include <gtsam_unstable/dllexport.h>
17
18namespace gtsam {
19
25class GTSAM_UNSTABLE_EXPORT Pose3Upright {
26public:
27 static const size_t dimension = 4;
28
29protected:
30
31 Pose2 T_;
32 double z_;
33
34public:
37
39 Pose3Upright() : z_(0.0) {}
40
42 Pose3Upright(const Pose3Upright& x) : T_(x.T_), z_(x.z_) {}
43 Pose3Upright(const Rot2& bearing, const Point3& t);
44 Pose3Upright(double x, double y, double z, double theta);
45 Pose3Upright(const Pose2& pose, double z);
46 Pose3Upright& operator=(const Pose3Upright& x) = default;
47
49 Pose3Upright(const Pose3& fullpose);
50
54
56 void print(const std::string& s = "") const;
57
59 bool equals(const Pose3Upright& pose, double tol = 1e-9) const;
60
64
65 double x() const { return T_.x(); }
66 double y() const { return T_.y(); }
67 double z() const { return z_; }
68 double theta() const { return T_.theta(); }
69
70 Point2 translation2() const;
71 Point3 translation() const;
72 Rot2 rotation2() const;
73 Rot3 rotation() const;
74 Pose2 pose2() const;
75 Pose3 pose() const;
76
80
82 inline static size_t Dim() { return dimension; }
83
85 inline size_t dim() const { return dimension; }
86
89 Pose3Upright retract(const Vector& v) const;
90
92 Vector localCoordinates(const Pose3Upright& p2) const;
93
97
99 static Pose3Upright Identity() { return Pose3Upright(); }
100
102 Pose3Upright inverse(OptionalJacobian<4,4> H1={}) const;
103
105 Pose3Upright compose(const Pose3Upright& p2,
106 OptionalJacobian<4,4> H1={},
107 OptionalJacobian<4,4> H2={}) const;
108
110 inline Pose3Upright operator*(const Pose3Upright& T) const { return compose(T); }
111
116 Pose3Upright between(const Pose3Upright& p2,
118 OptionalJacobian<4,4> H2={}) const;
119
123
125 static Pose3Upright Expmap(const Vector& xi);
126
128 static Vector Logmap(const Pose3Upright& p);
129
131
132private:
133
134#if GTSAM_ENABLE_BOOST_SERIALIZATION //
135 // Serialization function
136 friend class boost::serialization::access;
137 template<class Archive>
138 void serialize(Archive & ar, const unsigned int /*version*/) {
139 ar & BOOST_SERIALIZATION_NVP(T_);
140 ar & BOOST_SERIALIZATION_NVP(z_);
141 }
142#endif
143
144}; // \class Pose3Upright
145
146template<>
147struct traits<Pose3Upright> : public internal::Manifold<Pose3Upright> {};
148
149
150} // \namespace gtsam
3D Pose manifold SO(3) x R^3 and group SE(3)
2D Pose
Global functions in a separate testing namespace.
Definition chartTesting.h:28
Vector3 Point3
As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
Definition Point3.h:38
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:143
Vector2 Point2
As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
Definition Point2.h:32
@ Logmap
Use the SE_2(3) NavState Logmap for every backend.
Definition PreintegrationParams.h:32
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
Both ManifoldTraits and Testable.
Definition Manifold.h:156
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:40
Template to create a binary predicate.
Definition Testable.h:112
A 2D pose (Point2,Rot2).
Definition Pose2.h:39
double y() const
get y
Definition Pose2.h:240
double x() const
get x
Definition Pose2.h:237
double theta() const
get theta
Definition Pose2.h:243
A 3D pose (R,t) : (Rot3,Point3).
Definition Pose3.h:42
Rotation matrix NOTE: the angle theta is in radians unless explicitly stated.
Definition Rot2.h:40
A 3D Pose with fixed pitch and roll.
Definition Pose3Upright.h:25
size_t dim() const
Dimensionality of tangent space = 4 DOF.
Definition Pose3Upright.h:85
Pose3Upright(const Pose3Upright &x)
Copy constructor.
Definition Pose3Upright.h:42
Pose3Upright compose(const Pose3Upright &p2, OptionalJacobian< 4, 4 > H1={}, OptionalJacobian< 4, 4 > H2={}) const
compose this transformation onto another (first *this and then p2)
Definition Pose3Upright.cpp:101
Pose3Upright operator*(const Pose3Upright &T) const
compose syntactic sugar
Definition Pose3Upright.h:110
Pose3Upright()
Default constructor initializes at origin.
Definition Pose3Upright.h:39
static Pose3Upright Identity()
identity for group operation
Definition Pose3Upright.h:99
static size_t Dim()
Dimensionality of tangent space = 4 DOF - used to autodetect sizes.
Definition Pose3Upright.h:82