5#include <Eigen/Geometry>
19 typedef Matrix<T, 1, 1> Vec1T;
20 typedef Matrix<T, 2, 1> Vec2T;
21 typedef Matrix<T, 3, 1> Vec3T;
22 typedef Matrix<T, 4, 1> Vec4T;
23 typedef Matrix<T, 2, 2> Mat2T;
24 typedef Matrix<T, 3, 3> Mat3T;
29 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
74 x.
arr_.setConstant(std::numeric_limits<T>::quiet_NaN());
97 x.
arr_ << tx, ty, qw, qx;
109 x.
arr_ << tvec(0), tvec(1), qvec(0), qvec(1);
164 inline const Map<Vec2T>&
t()
const
180 inline Map<Vec2T>&
t()
242 out <<
q_.R(),
t_, (T)0., (T)0., (T)1.;
270 template<
typename Tout = T,
typename T2>
275 xout.
q() =
q_ * x.
q_;
283 template<
typename Tout = T,
typename T2>
293 template<
typename Tout = T,
typename T2>
311 template<
typename T2>
320 template<
typename T2>
368 template<
typename Tout = T,
typename T2>
403 template<
typename T2>
504 template<
typename T2>
547 os <<
"SE(2): [ " << x.
t_.x() <<
"i, " << x.
t_.y() <<
"j ] [ " << x.
q_.w() <<
", " << x.
q_.x() <<
"i ]";
SE2< double > SE2d
Definition SE2.h:551
SE2< T > operator*(const double &l, const SE2< T > &r)
Scale a transform by a scalar.
Definition SE2.h:520
std::ostream & operator<<(std::ostream &os, const SE2< T > &x)
Render the transform in a stream.
Definition SE2.h:545
Class representing a member of the manifold, or a 2D rigid body transform.
Definition SE2.h:17
SE2 operator*(const SE2< T2 > &x) const
Invocation of otimes via multiplication.
Definition SE2.h:312
const SO2< T > & q() const
Access the rotation .
Definition SE2.h:172
SE2(const Ref< const Vec4T > &arr)
Create a transform from an array representing all transform fields in .
Definition SE2.h:134
static Mat3T hat(const Vec3T &omega)
Hat operator implementation, which coverts the tangent-space vector representation to the correspondi...
Definition SE2.h:413
SE2()
Create a transform (with garbage data).
Definition SE2.h:128
static SE2 nans()
Obtain a transform full of NaNs.
Definition SE2.h:71
const Map< Vec2T > & t() const
Access the translation vector .
Definition SE2.h:164
Map< Vec2T > & t()
Access the translation vector .
Definition SE2.h:180
SE2 operator/(const double &s) const
Scale a transform by a scalar.
Definition SE2.h:357
Vec4T array() const
Access all elements of .
Definition SE2.h:204
SE2 & operator*=(const double &s)
Scale a transform by a scalar.
Definition SE2.h:333
static SE2 exp(const Mat3T &Omega)
Exponential chart map implementation: .
Definition SE2.h:469
SE2< Tout > oplus(const Matrix< T2, 3, 1 > &delta) const
Implementation of tangent space group perturbations: .
Definition SE2.h:284
static SE2 identity()
Obtain an identity transform.
Definition SE2.h:60
Map< Vec2T > t_
Memory-mapped array representing only the translation component of the transform .
Definition SE2.h:38
const T * data() const
Access pointer to all elements of .
Definition SE2.h:220
SE2 inverse() const
Obtain the inverse transform .
Definition SE2.h:249
T * data()
Access pointer to all elements of .
Definition SE2.h:212
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Map< Vec4T > arr_
Memory-mapped array representing all transform fields in .
Definition SE2.h:34
SE2 & operator+=(const Vec3T &v)
Invocation of oplus via addition.
Definition SE2.h:394
Vec2T operator*(const Vec2T &v) const
Transform a vector via multiplication: .
Definition SE2.h:378
static SE2 fromVecAndRot(const Vec2T &tvec, const Vec2T &qvec)
Construct a transform from a translation vector and rotation fields vector.
Definition SE2.h:106
SE2< T2 > cast() const
Cast the underlying numeric type.
Definition SE2.h:505
static SE2 fromVecAndRot(const T tx, const T ty, const T qw, const T qx)
Construct a transform from the individual fields.
Definition SE2.h:94
SE2 & invert()
Invert the current transform .
Definition SE2.h:259
Matrix< Tout, 3, 1 > ominus(const SE2< T2 > &x) const
Implementation of group subtraction: .
Definition SE2.h:294
T & operator[](int i)
Access a field from .
Definition SE2.h:156
SE2< Tout > otimes(const SE2< T2 > &x) const
Implementation of group composition: .
Definition SE2.h:271
SE2 copy() const
Get a deep copy of the current transform.
Definition SE2.h:228
SE2(const SE2 &x)
Copy constructor from another transform.
Definition SE2.h:142
SE2 operator+(const Vec3T &v) const
Invocation of oplus via addition.
Definition SE2.h:386
static SE2 random()
Obtain a random transform.
Definition SE2.h:49
SE2 & operator=(const SE2 &x)
Copy constructor.
Definition SE2.h:302
static SE2 fromVecAndRot(const Vec2T &t, const SO2< T > &q)
Construct a transform from a translation vector and a rotation object.
Definition SE2.h:118
Matrix< Tout, 2, 1 > operator*(const Matrix< T2, 2, 1 > &v) const
Transform a vector via multiplication: .
Definition SE2.h:369
static Vec3T Log(const SE2 &x)
Logarithmic chart map implementation: .
Definition SE2.h:442
Vec3T operator-(const SE2< T2 > &x) const
Invocation of ominus via subtraction.
Definition SE2.h:404
SO2< T > q_
Memory-mapped array representing only the rotation component of the transform .
Definition SE2.h:42
static Vec3T vee(const Mat3T &Omega)
Vee operator implementation, which coverts the Lie algebra representation to a tangent-space vector r...
Definition SE2.h:424
static Mat3T log(const SE2 &x)
Logarithmic chart map implementation: .
Definition SE2.h:434
SE2(const T *data)
Create a transform from a pointer array representing all transform fields in .
Definition SE2.h:151
SE2 & operator/=(const double &s)
Scale a transform by a scalar.
Definition SE2.h:345
SE2 & operator*=(const SE2< T2 > &x)
Invocation of otimes via multiplication.
Definition SE2.h:321
const Vec4T elements() const
Access all elements of .
Definition SE2.h:196
Mat3T H() const
Convert the transform to matrix representation .
Definition SE2.h:239
static SE2 Exp(const Vec3T &omega)
Exponential chart map implementation: .
Definition SE2.h:477
static SE2 fromH(const Mat3T &m)
Convert a transform matrix into a transform.
Definition SE2.h:82
SO2< T > & q()
Access the rotation .
Definition SE2.h:188
Class representing a member of the manifold, or a 2D rotation.
Definition SO2.h:14
static Vec1T vee(const Mat2T &Omega)
Vee operator implementation, which coverts the Lie algebra representation to a tangent-space vector r...
Definition SO2.h:463
static SO2 Exp(const Vec1T &omega)
Exponential chart map implementation: .
Definition SO2.h:499
SO2 inverse() const
Obtain the inverse rotation .
Definition SO2.h:274
static Vec1T Log(const SO2 &q)
Logarithmic chart map implementation: .
Definition SO2.h:481