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

A SpatialMomentum is a Momentum expressed in a RobotDynamics::ReferenceFrame. The angular portion of the vector is referred to as $k$ and the linear portion as $l$. More...

#include <SpatialMomentum.hpp>

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

Public Member Functions

 SpatialMomentum ()
 Constructor. RobotDynamics::ReferenceFrame is initialized to nullptr. More...
 
 SpatialMomentum (ReferenceFramePtr referenceFrame, const double kx, const double ky, const double kz, const double lx, const double ly, const double lz)
 Costructor. More...
 
 SpatialMomentum (ReferenceFramePtr referenceFrame, const Vector3d &k, const Vector3d l)
 Constructor. More...
 
 SpatialMomentum (const SpatialMomentum &SpatialMomentum)
 Copy constructor. More...
 
 SpatialMomentum (ReferenceFramePtr referenceFrame, const ForceVector &forceVector)
 Constructor. More...
 
 SpatialMomentum (ReferenceFramePtr referenceFrame)
 Constructor. More...
 
 SpatialMomentum (const SpatialInertia &inertia, const SpatialMotion &vector)
 Constructor. Momentum is computed from SpatialInertia and SpatialMotion by $ p=I*m $. Frame checks are performed. More...
 
 SpatialMomentum (ReferenceFramePtr referenceFrame, const RigidBodyInertia &inertia, const MotionVector &vector)
 Construct from a reference frame and the product of inertia and motion vector. More...
 
SpatialMomentumoperator= (const SpatialMomentum &m)
 
void setIncludingFrame (ReferenceFramePtr referenceFrame, const RigidBodyInertia &inertia, const MotionVector &vector)
 Set a momentum by multiplying the supplied motion vector by the supplied inertia. Set the stored RobotDynamics::FrameObject::referenceFrame to the supplied ReferenceFrame pointer. No frame checks will be performed. More...
 
void setIncludingFrame (ReferenceFramePtr referenceFrame, const ForceVector &f)
 Constructor. More...
 
double operator* (const SpatialMotion &vector)
 Operator that returns the kinetic energy. Given a momentum, $m$ and motion vector $v$, the resulting kinetic energy is computed by $ E_k = 0.5 m \cdot v $. Frame checks will be performed. More...
 
- Public Member Functions inherited from RobotDynamics::Math::Momentum
 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...
 
- Public Member Functions inherited from RobotDynamics::FrameObject
 FrameObject (ReferenceFramePtr referenceFrame)
 
virtual ~FrameObject ()
 Destructor. More...
 
virtual void changeFrame (ReferenceFramePtr desiredFrame)
 Change the ReferenceFrame this FrameObject is expressed in. More...
 
ReferenceFramePtr getReferenceFrame () const
 Get a pointer to the reference frame this FrameObject is expressed in. More...
 
void setReferenceFrame (ReferenceFramePtr frame)
 Set frame objects internal reference frame. More...
 
void checkReferenceFramesMatch (const FrameObject *frameObject) const
 Check if two FrameObjects hold the same ReferenceFrame. More...
 
void checkReferenceFramesMatch (FrameObject *frameObject) const
 

Protected Member Functions

TransformableGeometricObjectgetTransformableGeometricObject ()
 Pure virtual method that FrameObjects are required to implement so the FrameObject::changeFrame method is able to access the TransformableGeometricObject which is required to implement the TransformableGeometricObject::transform method. More...
 

Additional Inherited Members

- Public Types inherited from RobotDynamics::Math::SpatialVector
typedef Eigen::Matrix< double, 6, 1 > Base
 
- Static Public Member Functions inherited from RobotDynamics::Math::Momentum
static Momentum computeMomentum (const RigidBodyInertia &I, const MotionVector &v)
 Computes momentum from inertia and velocity. More...
 
- Protected Attributes inherited from RobotDynamics::FrameObject
ReferenceFramePtr referenceFrame
 

Detailed Description

A SpatialMomentum is a Momentum expressed in a RobotDynamics::ReferenceFrame. The angular portion of the vector is referred to as $k$ and the linear portion as $l$.

Constructor & Destructor Documentation

◆ SpatialMomentum() [1/8]

RobotDynamics::Math::SpatialMomentum::SpatialMomentum ( )
inline

Constructor. RobotDynamics::ReferenceFrame is initialized to nullptr.

◆ SpatialMomentum() [2/8]

RobotDynamics::Math::SpatialMomentum::SpatialMomentum ( ReferenceFramePtr  referenceFrame,
const double  kx,
const double  ky,
const double  kz,
const double  lx,
const double  ly,
const double  lz 
)
inline

Costructor.

Parameters
referenceFrameRobotDynamics::ReferenceFrame the momentum is expressed in
kxx-Angular
kyy-Angular
kzz-Angular
lxx-Linear
lyy-Linear
lzz-Linear

◆ SpatialMomentum() [3/8]

RobotDynamics::Math::SpatialMomentum::SpatialMomentum ( ReferenceFramePtr  referenceFrame,
const Vector3d k,
const Vector3d  l 
)
inline

Constructor.

Parameters
referenceFrameRobotDynamics::ReferenceFrame the momentum is expressed in
kAngular part
lLinear part

◆ SpatialMomentum() [4/8]

RobotDynamics::Math::SpatialMomentum::SpatialMomentum ( const SpatialMomentum SpatialMomentum)
inline

Copy constructor.

Parameters
SpatialMomentum

◆ SpatialMomentum() [5/8]

RobotDynamics::Math::SpatialMomentum::SpatialMomentum ( ReferenceFramePtr  referenceFrame,
const ForceVector forceVector 
)
inline

Constructor.

Parameters
referenceFrameRobotDynamics::ReferenceFrame the momentum is expressed in
forceVector

◆ SpatialMomentum() [6/8]

RobotDynamics::Math::SpatialMomentum::SpatialMomentum ( ReferenceFramePtr  referenceFrame)
inlineexplicit

Constructor.

Parameters
referenceFrameRobotDynamics::ReferenceFrame the momentum is expressed in

◆ SpatialMomentum() [7/8]

RobotDynamics::Math::SpatialMomentum::SpatialMomentum ( const SpatialInertia inertia,
const SpatialMotion vector 
)
inline

Constructor. Momentum is computed from SpatialInertia and SpatialMotion by $ p=I*m $. Frame checks are performed.

Parameters
inertia
vector

◆ SpatialMomentum() [8/8]

RobotDynamics::Math::SpatialMomentum::SpatialMomentum ( ReferenceFramePtr  referenceFrame,
const RigidBodyInertia inertia,
const MotionVector vector 
)
inline

Construct from a reference frame and the product of inertia and motion vector.

Member Function Documentation

◆ getTransformableGeometricObject()

TransformableGeometricObject* RobotDynamics::Math::SpatialMomentum::getTransformableGeometricObject ( )
inlineprotectedvirtual

Pure virtual method that FrameObjects are required to implement so the FrameObject::changeFrame method is able to access the TransformableGeometricObject which is required to implement the TransformableGeometricObject::transform method.

Returns

Implements RobotDynamics::FrameObject.

◆ operator*()

double RobotDynamics::Math::SpatialMomentum::operator* ( const SpatialMotion vector)
inline

Operator that returns the kinetic energy. Given a momentum, $m$ and motion vector $v$, the resulting kinetic energy is computed by $ E_k = 0.5 m \cdot v $. Frame checks will be performed.

Returns
double The kinetic energy

◆ operator=()

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

◆ setIncludingFrame() [1/2]

void RobotDynamics::Math::SpatialMomentum::setIncludingFrame ( ReferenceFramePtr  referenceFrame,
const ForceVector f 
)
inline

Constructor.

Parameters
referenceFrame
f

◆ setIncludingFrame() [2/2]

void RobotDynamics::Math::SpatialMomentum::setIncludingFrame ( ReferenceFramePtr  referenceFrame,
const RigidBodyInertia inertia,
const MotionVector vector 
)
inline

Set a momentum by multiplying the supplied motion vector by the supplied inertia. Set the stored RobotDynamics::FrameObject::referenceFrame to the supplied ReferenceFrame pointer. No frame checks will be performed.

Parameters
referenceFrame
inertia
vector

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