manif-geom-cpp
|
Class representing a member of the \(SE(2)\) manifold, or a 2D rigid body transform. More...
#include <SE2.h>
Public Member Functions | |
SE2 () | |
Create a transform (with garbage data). | |
SE2 (const Ref< const Vec4T > &arr) | |
Create a transform from an array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} &
\boldsymbol{q}\end{bmatrix}^\top\). | |
SE2 (const SE2 &x) | |
Copy constructor from another transform. | |
SE2 (const T *data) | |
Create a transform from a pointer array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\). | |
T & | operator[] (int i) |
Access a field from \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\). | |
const Map< Vec2T > & | t () const |
Access the translation vector \(\boldsymbol{t}\in\mathbb{R}^2\). | |
const SO2< T > & | q () const |
Access the rotation \(\boldsymbol{q}\in SO(2)\). | |
Map< Vec2T > & | t () |
Access the translation vector \(\boldsymbol{t}\in\mathbb{R}^2\). | |
SO2< T > & | q () |
Access the rotation \(\boldsymbol{q}\in SO(2)\). | |
const Vec4T | elements () const |
Access all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\). | |
Vec4T | array () const |
Access all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\). | |
T * | data () |
Access pointer to all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\). | |
const T * | data () const |
Access pointer to all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\). | |
SE2 | copy () const |
Get a deep copy of the current transform. | |
Mat3T | H () const |
Convert the transform to matrix representation \(\begin{bmatrix}\boldsymbol{R} & \boldsymbol{t}
\\ \boldsymbol{0} & 1\end{bmatrix}\in\mathbb{R}^{3\times 3}\). | |
SE2 | inverse () const |
Obtain the inverse transform \(\boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_B^A\). | |
SE2 & | invert () |
Invert the current transform \(\boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_B^A\). | |
template<typename Tout = T, typename T2 > | |
SE2< Tout > | otimes (const SE2< T2 > &x) const |
Implementation of group composition: \(\boldsymbol{T}_B^C \otimes \boldsymbol{T}_A^B\rightarrow
\boldsymbol{T}_A^C\). | |
template<typename Tout = T, typename T2 > | |
SE2< Tout > | oplus (const Matrix< T2, 3, 1 > &delta) const |
Implementation of tangent space group perturbations: \(\boldsymbol{T}_A^B\oplus \boldsymbol{t}_B^{B'}
\rightarrow \boldsymbol{T}_A^{B'}\). | |
template<typename Tout = T, typename T2 > | |
Matrix< Tout, 3, 1 > | ominus (const SE2< T2 > &x) const |
Implementation of group subtraction: \(\boldsymbol{T}_A^B\ominus \boldsymbol{T}_A^{B'} \rightarrow
\boldsymbol{t}_B^{B'}\). | |
SE2 & | operator= (const SE2 &x) |
Copy constructor. | |
template<typename T2 > | |
SE2 | operator* (const SE2< T2 > &x) const |
Invocation of otimes via multiplication. | |
template<typename T2 > | |
SE2 & | operator*= (const SE2< T2 > &x) |
Invocation of otimes via multiplication. | |
SE2 & | operator*= (const double &s) |
Scale a transform by a scalar. | |
SE2 & | operator/= (const double &s) |
Scale a transform by a scalar. | |
SE2 | operator/ (const double &s) const |
Scale a transform by a scalar. | |
template<typename Tout = T, typename T2 > | |
Matrix< Tout, 2, 1 > | operator* (const Matrix< T2, 2, 1 > &v) const |
Transform a vector via multiplication: \(\boldsymbol{T}_A^B\boldsymbol{t}^A \rightarrow
\boldsymbol{t}^B\). | |
Vec2T | operator* (const Vec2T &v) const |
Transform a vector via multiplication: \(\boldsymbol{T}_A^B\boldsymbol{t}^A \rightarrow
\boldsymbol{t}^B\). | |
SE2 | operator+ (const Vec3T &v) const |
Invocation of oplus via addition. | |
SE2 & | operator+= (const Vec3T &v) |
Invocation of oplus via addition. | |
template<typename T2 > | |
Vec3T | operator- (const SE2< T2 > &x) const |
Invocation of ominus via subtraction. | |
template<typename T2 > | |
SE2< T2 > | cast () const |
Cast the underlying numeric type. | |
Static Public Member Functions | |
static SE2 | random () |
Obtain a random \(SE(2)\) transform. | |
static SE2 | identity () |
Obtain an identity \(SE(2)\) transform. | |
static SE2 | nans () |
Obtain a transform full of NaNs. | |
static SE2 | fromH (const Mat3T &m) |
Convert a transform matrix \(\begin{bmatrix}\boldsymbol{R} & \boldsymbol{t} \\ \boldsymbol{0} &
1\end{bmatrix}\) into a \(SE(2)\) transform. | |
static SE2 | fromVecAndRot (const T tx, const T ty, const T qw, const T qx) |
Construct a transform from the individual fields. | |
static SE2 | fromVecAndRot (const Vec2T &tvec, const Vec2T &qvec) |
Construct a transform from a translation vector and rotation fields vector. | |
static SE2 | fromVecAndRot (const Vec2T &t, const SO2< T > &q) |
Construct a transform from a translation vector and a rotation object. | |
static Mat3T | hat (const Vec3T &omega) |
Hat operator implementation, which coverts the tangent-space vector representation to the corresponding Lie algebra: \(\mathbb{R}^3\rightarrow \mathfrak{se}(2)\). | |
static Vec3T | vee (const Mat3T &Omega) |
Vee operator implementation, which coverts the Lie algebra representation to a tangent-space vector representation: \(\mathfrak{se}(2) \rightarrow \mathbb{R}^3\). | |
static Mat3T | log (const SE2 &x) |
Logarithmic chart map implementation: \(SE(2) \rightarrow \mathfrak{se}(2)\). | |
static Vec3T | Log (const SE2 &x) |
Logarithmic chart map implementation: \(SE(2) \rightarrow \mathbb{R}^3\). | |
static SE2 | exp (const Mat3T &Omega) |
Exponential chart map implementation: \(\mathfrak{se}(2) \rightarrow SE(2)\). | |
static SE2 | Exp (const Vec3T &omega) |
Exponential chart map implementation: \(\mathbb{R}^3 \rightarrow SE(2)\). | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Map< Vec4T > | arr_ |
Memory-mapped array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} &
\boldsymbol{q}\end{bmatrix}^\top\). | |
Map< Vec2T > | t_ |
Memory-mapped array representing only the translation component of the transform \(\boldsymbol{t}\). | |
SO2< T > | q_ |
Memory-mapped array representing only the rotation component of the transform \(\boldsymbol{q}\). | |
Class representing a member of the \(SE(2)\) manifold, or a 2D rigid body transform.
Create a transform from an array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
Copy constructor from another transform.
Create a transform from a pointer array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
Access all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
Cast the underlying numeric type.
Access pointer to all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
Access pointer to all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
Access all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
Exponential chart map implementation: \(\mathfrak{se}(2) \rightarrow SE(2)\).
Exponential chart map implementation: \(\mathbb{R}^3 \rightarrow SE(2)\).
Convert a transform matrix \(\begin{bmatrix}\boldsymbol{R} & \boldsymbol{t} \\ \boldsymbol{0} & 1\end{bmatrix}\) into a \(SE(2)\) transform.
Construct a transform from the individual fields.
tx | First component of the translation \(\boldsymbol{t}\in\mathbb{R}^2\). |
ty | Second component of the translation \(\boldsymbol{t}\in\mathbb{R}^2\). |
qw | Real component of the rotation \(\boldsymbol{q}\in SO(2)\). |
qx | Imaginary component of the rotation \(\boldsymbol{q}\in SO(2)\). |
Construct a transform from a translation vector and a rotation object.
t | The translation vector \(\boldsymbol{t}\in\mathbb{R}^2\). |
q | The rotation \(\boldsymbol{q}\in SO(2)\). |
Construct a transform from a translation vector and rotation fields vector.
tvec | The translation vector \(\boldsymbol{t}\in\mathbb{R}^2\). |
qvec | The rotation represented as an array \(\boldsymbol{q}\in\mathbb{R}^2\). |
Convert the transform to matrix representation \(\begin{bmatrix}\boldsymbol{R} & \boldsymbol{t} \\ \boldsymbol{0} & 1\end{bmatrix}\in\mathbb{R}^{3\times 3}\).
Hat operator implementation, which coverts the tangent-space vector representation to the corresponding Lie algebra: \(\mathbb{R}^3\rightarrow \mathfrak{se}(2)\).
Obtain an identity \(SE(2)\) transform.
Obtain the inverse transform \(\boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_B^A\).
Invert the current transform \(\boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_B^A\).
Logarithmic chart map implementation: \(SE(2) \rightarrow \mathfrak{se}(2)\).
Logarithmic chart map implementation: \(SE(2) \rightarrow \mathbb{R}^3\).
Implementation of group subtraction: \(\boldsymbol{T}_A^B\ominus \boldsymbol{T}_A^{B'} \rightarrow \boldsymbol{t}_B^{B'}\).
Transform a vector via multiplication: \(\boldsymbol{T}_A^B\boldsymbol{t}^A \rightarrow \boldsymbol{t}^B\).
Invocation of otimes via multiplication.
Transform a vector via multiplication: \(\boldsymbol{T}_A^B\boldsymbol{t}^A \rightarrow \boldsymbol{t}^B\).
Scale a transform by a scalar.
Under the hood, this converts the transform into a tangent-space vector, scales the vector, then converts the scaled vector back to a transform.
Invocation of oplus via addition.
Invocation of oplus via addition.
Scale a transform by a scalar.
Under the hood, this converts the transform into a tangent-space vector, scales the vector, then converts the scaled vector back to a transform.
Scale a transform by a scalar.
Under the hood, this converts the transform into a tangent-space vector, scales the vector, then converts the scaled vector back to a transform.
Access a field from \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
Implementation of tangent space group perturbations: \(\boldsymbol{T}_A^B\oplus \boldsymbol{t}_B^{B'} \rightarrow \boldsymbol{T}_A^{B'}\).
|
inline |
Implementation of group composition: \(\boldsymbol{T}_B^C \otimes \boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_A^C\).
Access the rotation \(\boldsymbol{q}\in SO(2)\).
Access the rotation \(\boldsymbol{q}\in SO(2)\).
Obtain a random \(SE(2)\) transform.
\(\boldsymbol{q}\) is normalized and \(0\leq t_i \leq 1\).
Access the translation vector \(\boldsymbol{t}\in\mathbb{R}^2\).
Access the translation vector \(\boldsymbol{t}\in\mathbb{R}^2\).
Vee operator implementation, which coverts the Lie algebra representation to a tangent-space vector representation: \(\mathfrak{se}(2) \rightarrow \mathbb{R}^3\).
Memory-mapped array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
Memory-mapped array representing only the rotation component of the transform \(\boldsymbol{q}\).
Memory-mapped array representing only the translation component of the transform \(\boldsymbol{t}\).