Robot Dynamics Library
Public Member Functions | Public Attributes | List of all members
RobotDynamics::Math::SpatialTransform Struct Reference

Compact representation of spatial transformations. More...

#include <rdl_eigenmath.hpp>

Collaboration diagram for RobotDynamics::Math::SpatialTransform:
Collaboration graph
[legend]

Public Member Functions

 SpatialTransform ()
 Constructor. More...
 
 SpatialTransform (const Matrix3d &rotation, const double x, const double y, const double z)
 Constructor. More...
 
 SpatialTransform (const Quaternion &o, double x, double y, double z)
 
 SpatialTransform (double x, double y, double z, double w)
 
 SpatialTransform (const Quaternion &o)
 
 SpatialTransform (const Matrix3d &rotation, const Vector3d &translation)
 Constructor. More...
 
 SpatialTransform (const Matrix3d &rotation)
 Constructor. More...
 
 SpatialTransform (const Vector3d &translation)
 Constructor. More...
 
SpatialVector apply (const SpatialVector &v_sp) const
 Transform a spatial vector. Same as $ X * v $. More...
 
SpatialVector applyTranspose (const SpatialVector &f_sp) const
 Applies $ X^T * f $. More...
 
SpatialVector applyAdjoint (const SpatialVector &f_sp) const
 Applies $ X * f $ where $ f $ is a spatial force. More...
 
SpatialMatrix toMatrix () const
 Return transform as 6x6 spatial matrix. More...
 
SpatialMatrix toMatrixAdjoint () const
 Returns Spatial transform that transforms spatial force vectors. More...
 
SpatialMatrix toMatrixTranspose () const
 Returns spatial force transform transposed. More...
 
SpatialTransform inverse () const
 Returns inverse of transform. More...
 
void invert ()
 Inverts in place. $ this = this^{-1} $. More...
 
SpatialTransform operator* (const SpatialTransform &XT) const
 Overloaded * operator for combining transforms. More...
 
void operator*= (const SpatialTransform &XT)
 

Public Attributes

Matrix3d E
 
Vector3d r
 

Detailed Description

Compact representation of spatial transformations.

Instead of using a verbose 6x6 matrix, this structure only stores a 3x3 matrix and a 3-d vector to store spatial transformations. It also encapsulates efficient operations such as concatenations and transformation of spatial vectors.

Constructor & Destructor Documentation

◆ SpatialTransform() [1/8]

RobotDynamics::Math::SpatialTransform::SpatialTransform ( )
inline

Constructor.

◆ SpatialTransform() [2/8]

RobotDynamics::Math::SpatialTransform::SpatialTransform ( const Matrix3d rotation,
const double  x,
const double  y,
const double  z 
)
inline

Constructor.

Parameters
rotationOrthogonal rotation matrix
xX component
yY component
zZ component

◆ SpatialTransform() [3/8]

RobotDynamics::Math::SpatialTransform::SpatialTransform ( const Quaternion o,
double  x,
double  y,
double  z 
)
inline

◆ SpatialTransform() [4/8]

RobotDynamics::Math::SpatialTransform::SpatialTransform ( double  x,
double  y,
double  z,
double  w 
)

◆ SpatialTransform() [5/8]

RobotDynamics::Math::SpatialTransform::SpatialTransform ( const Quaternion o)
inline

◆ SpatialTransform() [6/8]

RobotDynamics::Math::SpatialTransform::SpatialTransform ( const Matrix3d rotation,
const Vector3d translation 
)
inline

Constructor.

Parameters
rotationOrthogonal rotation matrix
translation3D translational component

◆ SpatialTransform() [7/8]

RobotDynamics::Math::SpatialTransform::SpatialTransform ( const Matrix3d rotation)
inline

Constructor.

Parameters
rotationOrthogonal rotation matrix

◆ SpatialTransform() [8/8]

RobotDynamics::Math::SpatialTransform::SpatialTransform ( const Vector3d translation)
inline

Constructor.

Parameters
translation3D translational component

Member Function Documentation

◆ apply()

SpatialVector RobotDynamics::Math::SpatialTransform::apply ( const SpatialVector v_sp) const
inline

Transform a spatial vector. Same as $ X * v $.

Parameters
v_spSpatial motion vector to be copied/transformed
Returns
Transformed spatial vector. $ \begin{bmatrix} E * w \\ - E * (r \times w) + E * v \end{bmatrix} $

◆ applyAdjoint()

SpatialVector RobotDynamics::Math::SpatialTransform::applyAdjoint ( const SpatialVector f_sp) const
inline

Applies $ X * f $ where $ f $ is a spatial force.

Parameters
f_spSpatial force vector
Returns
$ \begin{bmatrix} E * n - E * (r \times f) \\ E * f \end{bmatrix} $

◆ applyTranspose()

SpatialVector RobotDynamics::Math::SpatialTransform::applyTranspose ( const SpatialVector f_sp) const
inline

Applies $ X^T * f $.

Parameters
f_spSpatial force
Returns
$ \begin{bmatrix} E^T * n + r \times * E^T * f \\ E^T * f \end{bmatrix} $

◆ inverse()

SpatialTransform RobotDynamics::Math::SpatialTransform::inverse ( ) const
inline

Returns inverse of transform.

Returns
$ X^{-1} $

◆ invert()

void RobotDynamics::Math::SpatialTransform::invert ( )
inline

Inverts in place. $ this = this^{-1} $.

◆ operator*()

SpatialTransform RobotDynamics::Math::SpatialTransform::operator* ( const SpatialTransform XT) const
inline

Overloaded * operator for combining transforms.

Parameters
XT
Returns
Combined rotation

◆ operator*=()

void RobotDynamics::Math::SpatialTransform::operator*= ( const SpatialTransform XT)
inline

◆ toMatrix()

SpatialMatrix RobotDynamics::Math::SpatialTransform::toMatrix ( ) const
inline

Return transform as 6x6 spatial matrix.

Returns
$ \begin{bmatrix} E & \mathbf{0} \\ -E * r\times & E \end{bmatrix} $

◆ toMatrixAdjoint()

SpatialMatrix RobotDynamics::Math::SpatialTransform::toMatrixAdjoint ( ) const
inline

Returns Spatial transform that transforms spatial force vectors.

Returns
$ \begin{bmatrix} E & -E * r\times \\ \mathbf{0} & E \end{bmatrix} $

◆ toMatrixTranspose()

SpatialMatrix RobotDynamics::Math::SpatialTransform::toMatrixTranspose ( ) const
inline

Returns spatial force transform transposed.

Returns
$ \begin{bmatrix} E^{T} & (-E r\times)^{T} \\ \mathbf{0} & E^{T} \end{bmatrix} $

Member Data Documentation

◆ E

Matrix3d RobotDynamics::Math::SpatialTransform::E

◆ r

Vector3d RobotDynamics::Math::SpatialTransform::r

The documentation for this struct was generated from the following files: