Robot Dynamics Library
Public Member Functions | List of all members
RobotDynamics::Math::MotionVector Class Reference

#include <MotionVector.hpp>

Inheritance diagram for RobotDynamics::Math::MotionVector:
Inheritance graph
[legend]
Collaboration diagram for RobotDynamics::Math::MotionVector:
Collaboration graph
[legend]

Public Member Functions

template<typename OtherDerived >
 MotionVector (const Eigen::MatrixBase< OtherDerived > &other)
 Constructor. More...
 
 MotionVector (const MotionVector &v)
 
MotionVectoroperator= (const MotionVector &other)
 Overload equal operator. More...
 
EIGEN_STRONG_INLINE MotionVector ()
 Empty constructor. More...
 
 MotionVector (const double v0, const double v1, const double v2, const double v3, const double v4, const double v5)
 Constructor. More...
 
EIGEN_STRONG_INLINE SpatialVector toSpatialVector () const
 Get a copy of a MotionVector as a SpatialVector. More...
 
EIGEN_STRONG_INLINE void set (const MotionVector &v)
 Setter. More...
 
EIGEN_STRONG_INLINE double & wx ()
 Get a reference to the angular-x component. More...
 
EIGEN_STRONG_INLINE double & wy ()
 Get a reference to the angular-y component. More...
 
EIGEN_STRONG_INLINE double & wz ()
 Get a reference to the angular-z component. More...
 
EIGEN_STRONG_INLINE double wx () const
 Get a copy of the angular-x component. More...
 
EIGEN_STRONG_INLINE double wy () const
 Get a copy of the angular-y component. More...
 
EIGEN_STRONG_INLINE double wz () const
 Get a copy of the angular-z component. More...
 
EIGEN_STRONG_INLINE double & vx ()
 Get a reference to the linear-x component. More...
 
EIGEN_STRONG_INLINE double & vy ()
 Get a reference to the linear-y component. More...
 
EIGEN_STRONG_INLINE double & vz ()
 Get a reference to the linear-z component. More...
 
EIGEN_STRONG_INLINE double vx () const
 Get a copy of the linear-x component. More...
 
EIGEN_STRONG_INLINE double vy () const
 Get a copy of the linear-y component. More...
 
EIGEN_STRONG_INLINE double vz () const
 Get a copy of the linear-z component. More...
 
void transform (const SpatialTransform &X)
 Transforms a motion vector. Performs $ v= X v $. More...
 
MotionVector transform_copy (const SpatialTransform &X) const
 Copies, transforms, and returns a MotionVector. Performs $ v_2=X v_1 $. More...
 
MotionVector cross (const MotionVector &v)
 See V. Duindum thesis p.25 for an explanation of what $ad_T$ operator is. It is also in Featherstone p. 25 eq. 2.31 & 2.32. For featherstone notation, it is essentially the $\times$ operator for spatial vectors. Given two SpatialMotion vectors, $v_1$ and $v_2$, this method returns $ v_3 = (v_1\times) v_2 $. Expanded, it looks like,. More...
 
ForceVector cross (const ForceVector &v)
 See Featherstone p. 25 eq. 2.31 & 2.32. For featherstone notation, it is essentially the $\times *$ operator for spatial vectors. Given a SpatialMotion vector, $v_1$, and SpatialForceVector, $f_1$, this method returns $ f_2 = (v_1\times *) f_1 $. Expanded, it looks like,. More...
 
SpatialMatrix crossm ()
 Get the spatial motion cross matrix,. More...
 
SpatialMatrix crossf ()
 Get the spatial force cross matrix. More...
 
MotionVector operator%= (const MotionVector &v)
 Operator for performing the RBDA $\times$ operator for two motion vectors, i.e. $m_2=(m_1\times)m_2$. More...
 
ForceVector operator%= (const ForceVector &v)
 Operator for performing the RBDA $ \times * $ operator for a motion vector and a force vector, i.e. $ f=(m\times *)f $. More...
 
MotionVector operator+= (const MotionVector &v)
 Overloaded += operator for a MotionVector. More...
 
- Public Member Functions inherited from RobotDynamics::Math::SpatialVector
template<typename OtherDerived >
 SpatialVector (const Eigen::MatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
SpatialVectoroperator= (const Eigen::MatrixBase< OtherDerived > &other)
 
EIGEN_STRONG_INLINE SpatialVector ()
 
EIGEN_STRONG_INLINE SpatialVector (const double &v0, const double &v1, const double &v2, const double &v3, const double &v4, const double &v5)
 
EIGEN_STRONG_INLINE SpatialVector (const Vector3d &angularPart, const Vector3d &linearPart)
 
EIGEN_STRONG_INLINE void set (const double &v0, const double &v1, const double &v2, const double &v3, const double &v4, const double &v5)
 
EIGEN_STRONG_INLINE Vector3d getAngularPart () const
 
EIGEN_STRONG_INLINE Vector3d getLinearPart () const
 
void zeroAngularPart ()
 
void zeroLinearPart ()
 
void setAngularPart (const Vector3d &v)
 
void setAngularPart (double x, double y, double z)
 
void setLinearPart (const Vector3d &v)
 
void setLinearPart (double x, double y, double z)
 
EIGEN_STRONG_INLINE void set (const Vector3d &angularPart, const Vector3d &linearPart)
 
SpatialMatrix crossm ()
 Get the spatial motion cross matrix. More...
 
SpatialVector crossm (const SpatialVector &v)
 Spatial motion cross times spatial motion. More...
 
SpatialMatrix crossf ()
 Get the spatial force cross matrix. More...
 
SpatialVector crossf (const SpatialVector &v)
 Spatial motion cross spatial force. More...
 

Additional Inherited Members

- Public Types inherited from RobotDynamics::Math::SpatialVector
typedef Eigen::Matrix< double, 6, 1 > Base
 

Constructor & Destructor Documentation

◆ MotionVector() [1/4]

template<typename OtherDerived >
RobotDynamics::Math::MotionVector::MotionVector ( const Eigen::MatrixBase< OtherDerived > &  other)
inline

Constructor.

Parameters
other

◆ MotionVector() [2/4]

RobotDynamics::Math::MotionVector::MotionVector ( const MotionVector v)
inline

◆ MotionVector() [3/4]

EIGEN_STRONG_INLINE RobotDynamics::Math::MotionVector::MotionVector ( )
inline

Empty constructor.

◆ MotionVector() [4/4]

RobotDynamics::Math::MotionVector::MotionVector ( const double  v0,
const double  v1,
const double  v2,
const double  v3,
const double  v4,
const double  v5 
)
inline

Constructor.

Parameters
v0x-angular
v1y-angular
v2z-angular
v3x-linear
v4y-linear
v5z-linear

Member Function Documentation

◆ cross() [1/2]

ForceVector RobotDynamics::Math::MotionVector::cross ( const ForceVector v)

See Featherstone p. 25 eq. 2.31 & 2.32. For featherstone notation, it is essentially the $\times *$ operator for spatial vectors. Given a SpatialMotion vector, $v_1$, and SpatialForceVector, $f_1$, this method returns $ f_2 = (v_1\times *) f_1 $. Expanded, it looks like,.

\[ =(v_1\times *) f_1 = \begin{bmatrix} \omega_{v_1}\times & v_{v_1}\times \\ \mathbf{0} & \omega_{v_1}\times \end{bmatrix} f \]

The 3d vector $\times$ operator is equivalent to the $\sim$ operator. See Math::toTildeForm.

◆ cross() [2/2]

MotionVector RobotDynamics::Math::MotionVector::cross ( const MotionVector v)

See V. Duindum thesis p.25 for an explanation of what $ad_T$ operator is. It is also in Featherstone p. 25 eq. 2.31 & 2.32. For featherstone notation, it is essentially the $\times$ operator for spatial vectors. Given two SpatialMotion vectors, $v_1$ and $v_2$, this method returns $ v_3 = (v_1\times) v_2 $. Expanded, it looks like,.

\[ v_3 = (v_1 \times) v_2 = ad_{v_1} v_2 = \begin{bmatrix} \omega_{v_1} \times & \mathbf{0} \\ v_{v_1}\times & \omega_{v_1}\times \end{bmatrix} v_2 \]

The 3d vector $\times$ operator is equivalent to the $\sim$ operator. See Math::toTildeForm.

◆ crossf()

SpatialMatrix RobotDynamics::Math::MotionVector::crossf ( )
inline

Get the spatial force cross matrix.

Returns
$ v\times* $

◆ crossm()

SpatialMatrix RobotDynamics::Math::MotionVector::crossm ( )
inline

Get the spatial motion cross matrix,.

\[ m\times = \begin{bmatrix} \omega\times & \mathbf{0} \\ v\times & \omega\times \end{bmatrix} \]

Returns
$ v\times $

◆ operator%=() [1/2]

ForceVector RobotDynamics::Math::MotionVector::operator%= ( const ForceVector v)
inline

Operator for performing the RBDA $ \times * $ operator for a motion vector and a force vector, i.e. $ f=(m\times *)f $.

Parameters
v
Returns
A ForceVector

◆ operator%=() [2/2]

MotionVector RobotDynamics::Math::MotionVector::operator%= ( const MotionVector v)
inline

Operator for performing the RBDA $\times$ operator for two motion vectors, i.e. $m_2=(m_1\times)m_2$.

Parameters
v
Returns
A MotionVector

◆ operator+=()

MotionVector RobotDynamics::Math::MotionVector::operator+= ( const MotionVector v)
inline

Overloaded += operator for a MotionVector.

Returns
MotionVector

◆ operator=()

MotionVector& RobotDynamics::Math::MotionVector::operator= ( const MotionVector other)
inline

Overload equal operator.

Parameters
other
Returns
A motion vector

◆ set()

EIGEN_STRONG_INLINE void RobotDynamics::Math::MotionVector::set ( const MotionVector v)
inline

Setter.

Parameters
vSets the values equal to those stored in v

◆ toSpatialVector()

EIGEN_STRONG_INLINE SpatialVector RobotDynamics::Math::MotionVector::toSpatialVector ( ) const
inline

Get a copy of a MotionVector as a SpatialVector.

Returns
SpatialVector copy of a MotionVectors

◆ transform()

void RobotDynamics::Math::MotionVector::transform ( const SpatialTransform X)
inlinevirtual

Transforms a motion vector. Performs $ v= X v $.

Parameters
X

Implements RobotDynamics::Math::TransformableGeometricObject.

◆ transform_copy()

MotionVector RobotDynamics::Math::MotionVector::transform_copy ( const SpatialTransform X) const
inline

Copies, transforms, and returns a MotionVector. Performs $ v_2=X v_1 $.

Parameters
X
Returns
Copied, transformed MotionVector

◆ vx() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::MotionVector::vx ( )
inline

Get a reference to the linear-x component.

Returns
A reference to the linear x-component

◆ vx() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::MotionVector::vx ( ) const
inline

Get a copy of the linear-x component.

Returns
A copy of the linear x-component

◆ vy() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::MotionVector::vy ( )
inline

Get a reference to the linear-y component.

Returns
A reference to the linear y-component

◆ vy() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::MotionVector::vy ( ) const
inline

Get a copy of the linear-y component.

Returns
A copy of the linear y-component

◆ vz() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::MotionVector::vz ( )
inline

Get a reference to the linear-z component.

Returns
A reference to the linear z-component

◆ vz() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::MotionVector::vz ( ) const
inline

Get a copy of the linear-z component.

Returns
A copy of the linear z-component

◆ wx() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::MotionVector::wx ( )
inline

Get a reference to the angular-x component.

Returns
A reference to the angular x-component

◆ wx() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::MotionVector::wx ( ) const
inline

Get a copy of the angular-x component.

Returns
A copy of the angular x-component

◆ wy() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::MotionVector::wy ( )
inline

Get a reference to the angular-y component.

Returns
A reference to the angular y-component

◆ wy() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::MotionVector::wy ( ) const
inline

Get a copy of the angular-y component.

Returns
A copy of the angular y-component

◆ wz() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::MotionVector::wz ( )
inline

Get a reference to the angular-z component.

Returns
A copy reference to the angular z-component

◆ wz() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::MotionVector::wz ( ) const
inline

Get a copy of the angular-z component.

Returns
A copy of the angular z-component

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