Pose3Upright.h
Go to the documentation of this file.
1 
12 #pragma once
13 
14 #include <gtsam_unstable/dllexport.h>
15 #include <gtsam/geometry/Pose3.h>
16 #include <gtsam/geometry/Pose2.h>
17 
18 namespace gtsam {
19 
25 class GTSAM_UNSTABLE_EXPORT Pose3Upright {
26 public:
27  static const size_t dimension = 4;
28 
29 protected:
30 
32  double z_;
33 
34 public:
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 
48  Pose3Upright(const Pose3& fullpose);
49 
53 
55  void print(const std::string& s = "") const;
56 
58  bool equals(const Pose3Upright& pose, double tol = 1e-9) const;
59 
63 
64  double x() const { return T_.x(); }
65  double y() const { return T_.y(); }
66  double z() const { return z_; }
67  double theta() const { return T_.theta(); }
68 
69  Point2 translation2() const;
70  Point3 translation() const;
71  Rot2 rotation2() const;
72  Rot3 rotation() const;
73  Pose2 pose2() const;
74  Pose3 pose() const;
75 
79 
81  inline static size_t Dim() { return dimension; }
82 
84  inline size_t dim() const { return dimension; }
85 
88  Pose3Upright retract(const Vector& v) const;
89 
91  Vector localCoordinates(const Pose3Upright& p2) const;
92 
96 
98  static Pose3Upright identity() { return Pose3Upright(); }
99 
101  Pose3Upright inverse(boost::optional<Matrix&> H1=boost::none) const;
102 
105  boost::optional<Matrix&> H1=boost::none,
106  boost::optional<Matrix&> H2=boost::none) const;
107 
109  inline Pose3Upright operator*(const Pose3Upright& T) const { return compose(T); }
110 
116  boost::optional<Matrix&> H1=boost::none,
117  boost::optional<Matrix&> H2=boost::none) const;
118 
122 
124  static Pose3Upright Expmap(const Vector& xi);
125 
127  static Vector Logmap(const Pose3Upright& p);
128 
130 
131 private:
132 
133  // Serialization function
134  friend class boost::serialization::access;
135  template<class Archive>
136  void serialize(Archive & ar, const unsigned int /*version*/) {
137  ar & BOOST_SERIALIZATION_NVP(T_);
138  ar & BOOST_SERIALIZATION_NVP(z_);
139  }
140 
141 }; // \class Pose3Upright
142 
143 template<>
144 struct traits<Pose3Upright> : public internal::Manifold<Pose3Upright> {};
145 
146 
147 } // \namespace gtsam
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
Both ManifoldTraits and Testable.
Definition: Manifold.h:120
size_t dim() const
Dimensionality of tangent space = 4 DOF.
Definition: Pose3Upright.h:84
Scalar * y
Rot3_ rotation(const Pose3_ &pose)
double y() const
get y
Definition: Pose2.h:218
Pose3Upright()
Default constructor initializes at origin.
Definition: Pose3Upright.h:39
Vector2 Point2
Definition: Point2.h:27
ArrayXcf v
Definition: Cwise_arg.cpp:1
Pose2_ Expmap(const Vector3_ &xi)
Rot2 theta
double x() const
Definition: Pose3Upright.h:64
Eigen::VectorXd Vector
Definition: Vector.h:38
double theta() const
get theta
Definition: Pose2.h:221
static const Pose3 pose(Rot3(Vector3(1,-1,-1).asDiagonal()), Point3(0, 0, 0.5))
void serialize(Archive &ar, const unsigned int)
Definition: Pose3Upright.h:136
Pose3Upright operator*(const Pose3Upright &T) const
compose syntactic sugar
Definition: Pose3Upright.h:109
Array< double, 1, 3 > e(1./3., 0.5, 2.)
RealScalar s
static Pose3Upright identity()
identity for group operation
Definition: Pose3Upright.h:98
double theta() const
Definition: Pose3Upright.h:67
double z() const
Definition: Pose3Upright.h:66
static size_t Dim()
Dimensionality of tangent space = 4 DOF - used to autodetect sizes.
Definition: Pose3Upright.h:81
Vector xi
Definition: testPose2.cpp:150
Pose3Upright(const Pose3Upright &x)
Copy constructor.
Definition: Pose3Upright.h:42
traits
Definition: chartTesting.h:28
double x() const
get x
Definition: Pose2.h:215
Expression< T > compose(const Expression< T > &t1, const Expression< T > &t2)
double y() const
Definition: Pose3Upright.h:65
float * p
static Point3 p2
static const Pose3 pose2
const G double tol
Definition: Group.h:83
Vector3 Point3
Definition: Point3.h:35
2D Pose
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
3D Pose
Expression< T > between(const Expression< T > &t1, const Expression< T > &t2)
EIGEN_DEVICE_FUNC const InverseReturnType inverse() const
Point2 t(10, 10)


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:43:27