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

Momentum is mass/inertia multiplied by velocity. More...

#include <Momentum.hpp>

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

Public Member Functions

 Momentum ()
 
 Momentum (const double kx, const double ky, const double kz, const double lx, const double ly, const double lz)
 
 Momentum (const Vector3d &k, const Vector3d l)
 
 Momentum (const Momentum &momentum)
 
 Momentum (const ForceVector &forceVector)
 
Momentumoperator= (const Momentum &m)
 
 Momentum (const RigidBodyInertia &inertia, const MotionVector &vector)
 
Momentum transform_copy (const SpatialTransform &X) const
 Copy then transform a ForceVector by. More...
 
EIGEN_STRONG_INLINE double & kx ()
 
EIGEN_STRONG_INLINE double & ky ()
 
EIGEN_STRONG_INLINE double & kz ()
 
EIGEN_STRONG_INLINE double kx () const
 
EIGEN_STRONG_INLINE double ky () const
 
EIGEN_STRONG_INLINE double kz () const
 
EIGEN_STRONG_INLINE double & lx ()
 
EIGEN_STRONG_INLINE double & ly ()
 
EIGEN_STRONG_INLINE double & lz ()
 
EIGEN_STRONG_INLINE double lx () const
 
EIGEN_STRONG_INLINE double ly () const
 
EIGEN_STRONG_INLINE double lz () const
 
Momentum operator+= (const Momentum &v)
 Overloaded plus-equals operator. More...
 
Momentum operator-= (const Momentum &v)
 Overloaded plus-equals operator. More...
 
EIGEN_STRONG_INLINE double operator* (const MotionVector &vector)
 Operator for computing kinetic energy. With momentum, $ m $ and Math::MotionVector, $ v $ this performs performs $ \frac{m\cdot v}{2} $. More...
 
- Public Member Functions inherited from RobotDynamics::Math::ForceVector
template<typename OtherDerived >
 ForceVector (const Eigen::MatrixBase< OtherDerived > &other)
 Constructor. More...
 
template<typename OtherDerived >
ForceVectoroperator= (const Eigen::MatrixBase< OtherDerived > &other)
 
EIGEN_STRONG_INLINE ForceVector ()
 Empty constructor. More...
 
EIGEN_STRONG_INLINE SpatialVector toSpatialVector () const
 Get a copy of a ForceVector as type SpatialVector. More...
 
 ForceVector (const double mx, const double my, const double mz, const double fx, const double fy, const double fz)
 Constructor. More...
 
EIGEN_STRONG_INLINE void set (const ForceVector &f)
 Setter. More...
 
EIGEN_STRONG_INLINE double & mx ()
 Get reference to x-angular component. More...
 
EIGEN_STRONG_INLINE double & my ()
 Get reference to y-angular component. More...
 
EIGEN_STRONG_INLINE double & mz ()
 Get reference to z-angular component. More...
 
EIGEN_STRONG_INLINE double mx () const
 Get copy of x-angular component. More...
 
EIGEN_STRONG_INLINE double my () const
 Get copy of y-angular component. More...
 
EIGEN_STRONG_INLINE double mz () const
 Get copy of z-angular component. More...
 
EIGEN_STRONG_INLINE double & fx ()
 Get reference to x-linear component. More...
 
EIGEN_STRONG_INLINE double & fy ()
 Get reference to y-linear component. More...
 
EIGEN_STRONG_INLINE double & fz ()
 Get reference to z-linear component. More...
 
EIGEN_STRONG_INLINE double fx () const
 Get copy of x-linear component. More...
 
EIGEN_STRONG_INLINE double fy () const
 Get copy of y-linear component. More...
 
EIGEN_STRONG_INLINE double fz () const
 Get copy of z-linear component. More...
 
void transform (const SpatialTransform &X)
 Performs the following in place transform. More...
 
ForceVector transform_copy (const SpatialTransform &X) const
 Copy then transform a ForceVector by. More...
 
ForceVector operator+= (const ForceVector &v)
 Overloaded plus-equals operator. 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...
 

Static Public Member Functions

static Momentum computeMomentum (const RigidBodyInertia &I, const MotionVector &v)
 Computes momentum from inertia and velocity. More...
 

Additional Inherited Members

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

Detailed Description

Momentum is mass/inertia multiplied by velocity.

Constructor & Destructor Documentation

◆ Momentum() [1/6]

RobotDynamics::Math::Momentum::Momentum ( )
inline

◆ Momentum() [2/6]

RobotDynamics::Math::Momentum::Momentum ( const double  kx,
const double  ky,
const double  kz,
const double  lx,
const double  ly,
const double  lz 
)
inline

◆ Momentum() [3/6]

RobotDynamics::Math::Momentum::Momentum ( const Vector3d k,
const Vector3d  l 
)
inline

◆ Momentum() [4/6]

RobotDynamics::Math::Momentum::Momentum ( const Momentum momentum)
inline

◆ Momentum() [5/6]

RobotDynamics::Math::Momentum::Momentum ( const ForceVector forceVector)
inlineexplicit

◆ Momentum() [6/6]

RobotDynamics::Math::Momentum::Momentum ( const RigidBodyInertia inertia,
const MotionVector vector 
)
inline

Member Function Documentation

◆ computeMomentum()

static Momentum RobotDynamics::Math::Momentum::computeMomentum ( const RigidBodyInertia I,
const MotionVector v 
)
inlinestatic

Computes momentum from inertia and velocity.

Parameters
I
v

◆ kx() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Momentum::kx ( )
inline

◆ kx() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Momentum::kx ( ) const
inline

◆ ky() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Momentum::ky ( )
inline

◆ ky() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Momentum::ky ( ) const
inline

◆ kz() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Momentum::kz ( )
inline

◆ kz() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Momentum::kz ( ) const
inline

◆ lx() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Momentum::lx ( )
inline

◆ lx() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Momentum::lx ( ) const
inline

◆ ly() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Momentum::ly ( )
inline

◆ ly() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Momentum::ly ( ) const
inline

◆ lz() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Momentum::lz ( )
inline

◆ lz() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Momentum::lz ( ) const
inline

◆ operator*()

EIGEN_STRONG_INLINE double RobotDynamics::Math::Momentum::operator* ( const MotionVector vector)
inline

Operator for computing kinetic energy. With momentum, $ m $ and Math::MotionVector, $ v $ this performs performs $ \frac{m\cdot v}{2} $.

Parameters
vector
Returns
kinetic energy

◆ operator+=()

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

Overloaded plus-equals operator.

Returns
$ f_2=f_2+f_1 $

◆ operator-=()

Momentum RobotDynamics::Math::Momentum::operator-= ( const Momentum v)
inline

Overloaded plus-equals operator.

Returns
$ f_2=f_2-f_1 $

◆ operator=()

Momentum& RobotDynamics::Math::Momentum::operator= ( const Momentum m)
inline

◆ transform_copy()

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

Copy then transform a ForceVector by.

\[ f_2 = \begin{bmatrix} X.E & -X.E(X.r\times) \\ \mathbf{0} & X.E \end{bmatrix} f_1 \]

Parameters
X
Returns
Copied, transformed ForceVector

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