manif-geom-cpp
Loading...
Searching...
No Matches
SE3< T > Class Template Reference

Class representing a member of the \(SE(3)\) manifold, or a 3D rigid body transform. More...

#include <SE3.h>

Public Member Functions

 SE3 ()
 Create a transform (with garbage data).
 
 SE3 (const Ref< const Vec7T > &arr)
 Create a transform from an array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
 
 SE3 (const SE3 &x)
 Copy constructor from another transform.
 
 SE3 (const T *data)
 Create a transform from a pointer array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
 
Toperator[] (int i)
 Access a field from \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
 
const Map< Vec3T > & t () const
 Access the translation vector \(\boldsymbol{t}\in\mathbb{R}^3\).
 
const SO3< T > & q () const
 Access the rotation \(\boldsymbol{q}\in SO(3)\).
 
Map< Vec3T > & t ()
 Access the translation vector \(\boldsymbol{t}\in\mathbb{R}^3\).
 
SO3< T > & q ()
 Access the rotation \(\boldsymbol{q}\in SO(3)\).
 
const Vec7T elements () const
 Access all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
 
Vec7T array () const
 Access all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
 
Tdata ()
 Access pointer to all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
 
const Tdata () const
 Access pointer to all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
 
SE3 copy () const
 Get a deep copy of the current transform.
 
Mat4T H () const
 Convert the transform to matrix representation \(\begin{bmatrix}\boldsymbol{R} & \boldsymbol{t} \\ \boldsymbol{0} & 1\end{bmatrix}\in\mathbb{R}^{4\times 4}\).
 
SE3 inverse () const
 Obtain the inverse transform \(\boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_B^A\).
 
SE3invert ()
 Invert the current transform \(\boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_B^A\).
 
template<typename Tout = T, typename T2 >
SE3< Tout > otimes (const SE3< 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 >
SE3< Toutoplus (const Matrix< T2, 6, 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, 6, 1 > ominus (const SE3< T2 > &x) const
 Implementation of group subtraction: \(\boldsymbol{T}_A^B\ominus \boldsymbol{T}_A^{B'} \rightarrow \boldsymbol{t}_B^{B'}\).
 
SE3operator= (const SE3 &x)
 Copy constructor.
 
template<typename T2 >
SE3 operator* (const SE3< T2 > &x) const
 Invocation of otimes via multiplication.
 
template<typename T2 >
SE3operator*= (const SE3< T2 > &x)
 Invocation of otimes via multiplication.
 
SE3operator*= (const double &s)
 Scale a transform by a scalar.
 
SE3operator/= (const double &s)
 Scale a transform by a scalar.
 
SE3 operator/ (const double &s) const
 Scale a transform by a scalar.
 
template<typename Tout = T, typename T2 >
Matrix< Tout, 3, 1 > operator* (const Matrix< T2, 3, 1 > &v) const
 Transform a vector via multiplication: \(\boldsymbol{T}_A^B\boldsymbol{t}^A \rightarrow \boldsymbol{t}^B\).
 
Vec3T operator* (const Vec3T &v) const
 Transform a vector via multiplication: \(\boldsymbol{T}_A^B\boldsymbol{t}^A \rightarrow \boldsymbol{t}^B\).
 
SE3 operator+ (const Vec6T &v) const
 Invocation of oplus via addition.
 
SE3operator+= (const Vec6T &v)
 Invocation of oplus via addition.
 
template<typename T2 >
Vec6T operator- (const SE3< T2 > &x) const
 Invocation of ominus via subtraction.
 
template<typename T2 >
SE3< T2cast () const
 Cast the underlying numeric type.
 

Static Public Member Functions

static SE3 random ()
 Obtain a random rigid body transform.
 
static SE3 identity ()
 Obtain an identity \(SE(3)\) transform.
 
static SE3 nans ()
 Obtain a transform full of NaNs.
 
static SE3 fromH (const Mat4T &m)
 Convert a transform matrix \(\begin{bmatrix}\boldsymbol{R} & \boldsymbol{t} \\ \boldsymbol{0} & 1\end{bmatrix}\) into a \(SE(3)\) transform.
 
static SE3 fromVecAndQuat (const T tx, const T ty, const T tz, const T qw, const T qx, const T qy, const T qz)
 Construct a transform from the individual fields.
 
static SE3 fromVecAndQuat (const Vec3T &tvec, const Vec4T &qvec)
 Construct a transform from a translation vector and rotation fields vector.
 
static SE3 fromVecAndQuat (const Vec3T &t, const SO3< T > &q)
 Construct a transform from a translation vector and a rotation object.
 
static SE3 fromVecAndQuat (const Vec3T &tvec, const Quaternion< T > quat)
 Construct a transform from a translation vector and an Eigen Quaternion object.
 
static Mat4T hat (const Vec6T &omega)
 Hat operator implementation, which coverts the tangent-space vector representation to the corresponding Lie algebra: \(\mathbb{R}^6\rightarrow \mathfrak{se}(3)\).
 
static Vec6T vee (const Mat4T &Omega)
 Vee operator implementation, which coverts the Lie algebra representation to a tangent-space vector representation: \(\mathfrak{se}(3) \rightarrow \mathbb{R}^6\).
 
static Mat4T log (const SE3 &x)
 Logarithmic chart map implementation: \(SE(3) \rightarrow \mathfrak{se}(3)\).
 
static Vec6T Log (const SE3 &x)
 Logarithmic chart map implementation: \(SE(3) \rightarrow \mathbb{R}^6\).
 
static SE3 exp (const Mat4T &Omega)
 Exponential chart map implementation: \(\mathfrak{se}(3) \rightarrow SE(3)\).
 
static SE3 Exp (const Vec6T &omega)
 Exponential chart map implementation: \(\mathbb{R}^6 \rightarrow SE(3)\).
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Map< Vec7T > arr_
 Memory-mapped array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).
 
Map< Vec3T > t_
 Memory-mapped array representing only the translation component of the transform \(\boldsymbol{t}\).
 
SO3< Tq_
 Memory-mapped array representing only the rotation component of the transform \(\boldsymbol{q}\).
 

Detailed Description

template<typename T>
class SE3< T >

Class representing a member of the \(SE(3)\) manifold, or a 3D rigid body transform.

Constructor & Destructor Documentation

◆ SE3() [1/4]

template<typename T >
SE3< T >::SE3 ( )
inline

Create a transform (with garbage data).

◆ SE3() [2/4]

template<typename T >
SE3< T >::SE3 ( const Ref< const Vec7T > & arr)
inline

Create a transform from an array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).

◆ SE3() [3/4]

template<typename T >
SE3< T >::SE3 ( const SE3< T > & x)
inline

Copy constructor from another transform.

◆ SE3() [4/4]

template<typename T >
SE3< T >::SE3 ( const T * data)
inline

Create a transform from a pointer array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).

Member Function Documentation

◆ array()

template<typename T >
Vec7T SE3< T >::array ( ) const
inline

Access all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).

◆ cast()

template<typename T >
template<typename T2 >
SE3< T2 > SE3< T >::cast ( ) const
inline

Cast the underlying numeric type.

◆ copy()

template<typename T >
SE3 SE3< T >::copy ( ) const
inline

Get a deep copy of the current transform.

◆ data() [1/2]

template<typename T >
T * SE3< T >::data ( )
inline

Access pointer to all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).

◆ data() [2/2]

template<typename T >
const T * SE3< T >::data ( ) const
inline

Access pointer to all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).

◆ elements()

template<typename T >
const Vec7T SE3< T >::elements ( ) const
inline

Access all elements of \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).

◆ exp()

template<typename T >
static SE3 SE3< T >::exp ( const Mat4T & Omega)
inlinestatic

Exponential chart map implementation: \(\mathfrak{se}(3) \rightarrow SE(3)\).

◆ Exp()

template<typename T >
static SE3 SE3< T >::Exp ( const Vec6T & omega)
inlinestatic

Exponential chart map implementation: \(\mathbb{R}^6 \rightarrow SE(3)\).

◆ fromH()

template<typename T >
static SE3 SE3< T >::fromH ( const Mat4T & m)
inlinestatic

Convert a transform matrix \(\begin{bmatrix}\boldsymbol{R} & \boldsymbol{t} \\ \boldsymbol{0} & 1\end{bmatrix}\) into a \(SE(3)\) transform.

◆ fromVecAndQuat() [1/4]

template<typename T >
static SE3 SE3< T >::fromVecAndQuat ( const T tx,
const T ty,
const T tz,
const T qw,
const T qx,
const T qy,
const T qz )
inlinestatic

Construct a transform from the individual fields.

Parameters
txFirst component of the translation \(\boldsymbol{t}\in\mathbb{R}^3\).
tySecond component of the translation \(\boldsymbol{t}\in\mathbb{R}^3\).
tzThird component of the translation \(\boldsymbol{t}\in\mathbb{R}^3\).
qwReal component of the rotation \(\boldsymbol{q}\in SO(3)\).
qxFirst imaginary component of the rotation \(\boldsymbol{q}\in SO(3)\).
qySecond imaginary component of the rotation \(\boldsymbol{q}\in SO(3)\).
qzThird imaginary component of the rotation \(\boldsymbol{q}\in SO(3)\).

◆ fromVecAndQuat() [2/4]

template<typename T >
static SE3 SE3< T >::fromVecAndQuat ( const Vec3T & t,
const SO3< T > & q )
inlinestatic

Construct a transform from a translation vector and a rotation object.

Parameters
tThe translation vector \(\boldsymbol{t}\in\mathbb{R}^3\).
qThe rotation \(\boldsymbol{q}\in SO(3)\).

◆ fromVecAndQuat() [3/4]

template<typename T >
static SE3 SE3< T >::fromVecAndQuat ( const Vec3T & tvec,
const Quaternion< T > quat )
inlinestatic

Construct a transform from a translation vector and an Eigen Quaternion object.

Parameters
tThe translation vector \(\boldsymbol{t}\in\mathbb{R}^3\).
qThe Eigen Quaternion \(\boldsymbol{q}\in SO(3)\).

◆ fromVecAndQuat() [4/4]

template<typename T >
static SE3 SE3< T >::fromVecAndQuat ( const Vec3T & tvec,
const Vec4T & qvec )
inlinestatic

Construct a transform from a translation vector and rotation fields vector.

Parameters
tvecThe translation vector \(\boldsymbol{t}\in\mathbb{R}^3\).
qvecThe rotation represented as an array \(\boldsymbol{q}\in\mathbb{R}^4\).

◆ H()

template<typename T >
Mat4T SE3< T >::H ( ) const
inline

Convert the transform to matrix representation \(\begin{bmatrix}\boldsymbol{R} & \boldsymbol{t} \\ \boldsymbol{0} & 1\end{bmatrix}\in\mathbb{R}^{4\times 4}\).

◆ hat()

template<typename T >
static Mat4T SE3< T >::hat ( const Vec6T & omega)
inlinestatic

Hat operator implementation, which coverts the tangent-space vector representation to the corresponding Lie algebra: \(\mathbb{R}^6\rightarrow \mathfrak{se}(3)\).

◆ identity()

template<typename T >
static SE3 SE3< T >::identity ( )
inlinestatic

Obtain an identity \(SE(3)\) transform.

◆ inverse()

template<typename T >
SE3 SE3< T >::inverse ( ) const
inline

Obtain the inverse transform \(\boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_B^A\).

◆ invert()

template<typename T >
SE3 & SE3< T >::invert ( )
inline

Invert the current transform \(\boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_B^A\).

◆ log()

template<typename T >
static Mat4T SE3< T >::log ( const SE3< T > & x)
inlinestatic

Logarithmic chart map implementation: \(SE(3) \rightarrow \mathfrak{se}(3)\).

◆ Log()

template<typename T >
static Vec6T SE3< T >::Log ( const SE3< T > & x)
inlinestatic

Logarithmic chart map implementation: \(SE(3) \rightarrow \mathbb{R}^6\).

◆ nans()

template<typename T >
static SE3 SE3< T >::nans ( )
inlinestatic

Obtain a transform full of NaNs.

◆ ominus()

template<typename T >
template<typename Tout = T, typename T2 >
Matrix< Tout, 6, 1 > SE3< T >::ominus ( const SE3< T2 > & x) const
inline

Implementation of group subtraction: \(\boldsymbol{T}_A^B\ominus \boldsymbol{T}_A^{B'} \rightarrow \boldsymbol{t}_B^{B'}\).

◆ operator*() [1/3]

template<typename T >
template<typename Tout = T, typename T2 >
Matrix< Tout, 3, 1 > SE3< T >::operator* ( const Matrix< T2, 3, 1 > & v) const
inline

Transform a vector via multiplication: \(\boldsymbol{T}_A^B\boldsymbol{t}^A \rightarrow \boldsymbol{t}^B\).

◆ operator*() [2/3]

template<typename T >
template<typename T2 >
SE3 SE3< T >::operator* ( const SE3< T2 > & x) const
inline

Invocation of otimes via multiplication.

◆ operator*() [3/3]

template<typename T >
Vec3T SE3< T >::operator* ( const Vec3T & v) const
inline

Transform a vector via multiplication: \(\boldsymbol{T}_A^B\boldsymbol{t}^A \rightarrow \boldsymbol{t}^B\).

◆ operator*=() [1/2]

template<typename T >
SE3 & SE3< T >::operator*= ( const double & s)
inline

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.

◆ operator*=() [2/2]

template<typename T >
template<typename T2 >
SE3 & SE3< T >::operator*= ( const SE3< T2 > & x)
inline

Invocation of otimes via multiplication.

◆ operator+()

template<typename T >
SE3 SE3< T >::operator+ ( const Vec6T & v) const
inline

Invocation of oplus via addition.

◆ operator+=()

template<typename T >
SE3 & SE3< T >::operator+= ( const Vec6T & v)
inline

Invocation of oplus via addition.

◆ operator-()

template<typename T >
template<typename T2 >
Vec6T SE3< T >::operator- ( const SE3< T2 > & x) const
inline

Invocation of ominus via subtraction.

◆ operator/()

template<typename T >
SE3 SE3< T >::operator/ ( const double & s) const
inline

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.

◆ operator/=()

template<typename T >
SE3 & SE3< T >::operator/= ( const double & s)
inline

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.

◆ operator=()

template<typename T >
SE3 & SE3< T >::operator= ( const SE3< T > & x)
inline

Copy constructor.

◆ operator[]()

template<typename T >
T & SE3< T >::operator[] ( int i)
inline

Access a field from \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).

◆ oplus()

template<typename T >
template<typename Tout = T, typename T2 >
SE3< Tout > SE3< T >::oplus ( const Matrix< T2, 6, 1 > & delta) const
inline

Implementation of tangent space group perturbations: \(\boldsymbol{T}_A^B\oplus \boldsymbol{t}_B^{B'} \rightarrow \boldsymbol{T}_A^{B'}\).

◆ otimes()

template<typename T >
template<typename Tout = T, typename T2 >
SE3< Tout > SE3< T >::otimes ( const SE3< T2 > & x) const
inline

Implementation of group composition: \(\boldsymbol{T}_B^C \otimes \boldsymbol{T}_A^B\rightarrow \boldsymbol{T}_A^C\).

◆ q() [1/2]

template<typename T >
SO3< T > & SE3< T >::q ( )
inline

Access the rotation \(\boldsymbol{q}\in SO(3)\).

◆ q() [2/2]

template<typename T >
const SO3< T > & SE3< T >::q ( ) const
inline

Access the rotation \(\boldsymbol{q}\in SO(3)\).

◆ random()

template<typename T >
static SE3 SE3< T >::random ( )
inlinestatic

Obtain a random rigid body transform.

Returns
A random rigid body transform \(\mathbf{X}_B^W\in SE(3)\).

The rotation component \(\mathbf{q}_B^W\) will be normalized, but the translation component \(\mathbf{t}_{B/W}^W\) will not (each component will be between 0 and 1).

◆ t() [1/2]

template<typename T >
Map< Vec3T > & SE3< T >::t ( )
inline

Access the translation vector \(\boldsymbol{t}\in\mathbb{R}^3\).

◆ t() [2/2]

template<typename T >
const Map< Vec3T > & SE3< T >::t ( ) const
inline

Access the translation vector \(\boldsymbol{t}\in\mathbb{R}^3\).

◆ vee()

template<typename T >
static Vec6T SE3< T >::vee ( const Mat4T & Omega)
inlinestatic

Vee operator implementation, which coverts the Lie algebra representation to a tangent-space vector representation: \(\mathfrak{se}(3) \rightarrow \mathbb{R}^6\).

Member Data Documentation

◆ arr_

template<typename T >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Map<Vec7T> SE3< T >::arr_

Memory-mapped array representing all transform fields in \(\begin{bmatrix}\boldsymbol{t} & \boldsymbol{q}\end{bmatrix}^\top\).

◆ q_

template<typename T >
SO3<T> SE3< T >::q_

Memory-mapped array representing only the rotation component of the transform \(\boldsymbol{q}\).

◆ t_

template<typename T >
Map<Vec3T> SE3< T >::t_

Memory-mapped array representing only the translation component of the transform \(\boldsymbol{t}\).


The documentation for this class was generated from the following file: