- 3.0.2 rigid body dynamics module.
iit::rbd::tpl::InertiaMatrixDense< SCALAR > Class Template Reference

#include <InertiaMatrix.h>

Inheritance diagram for iit::rbd::tpl::InertiaMatrixDense< SCALAR >:

Public Member Functions

template<typename OtherDerived >
InertiaMatrixDense< SCALAR > & operator= (const MatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
InertiaMatrixDense< SCALAR > & operator+= (const MatrixBase< OtherDerived > &other)
 
 InertiaMatrixDense ()
 
 InertiaMatrixDense (Scalar m, const Vec3 &com, const Mat33 &I)
 
void fill (Scalar m, const Vec3 &com, const Mat33 &tensor)
 
Components getters
Scalar getMass () const
 
Vec3 getCOM () const
 
const Block33_const get3x3Tensor () const
 
Modifiers
void changeMass (Scalar m)
 
void changeCOM (const Vec3 &newcom)
 
void changeRotationalInertia (const Mat33 &tensor)
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR Scalar
 

Protected Member Functions

void setTheFixedZeros ()
 
template<typename Vector >
void setSkewSymmetricBlock (const MatrixBase< Vector > &v, Block33_t block)
 

Detailed Description

template<typename SCALAR>
class iit::rbd::tpl::InertiaMatrixDense< SCALAR >

Dense 6x6 matrix that represents the 6D spatial inertia tensor. See chapther 2 of Featherstone's "Rigid body dynamics algorithms".

Constructor & Destructor Documentation

◆ InertiaMatrixDense() [1/2]

template<typename SCALAR>
iit::rbd::tpl::InertiaMatrixDense< SCALAR >::InertiaMatrixDense ( )

◆ InertiaMatrixDense() [2/2]

template<typename SCALAR>
iit::rbd::tpl::InertiaMatrixDense< SCALAR >::InertiaMatrixDense ( Scalar  m,
const Vec3 &  com,
const Mat33 &  I 
)

See fill()

Member Function Documentation

◆ operator=()

template<typename SCALAR>
template<typename OtherDerived >
InertiaMatrixDense<SCALAR>& iit::rbd::tpl::InertiaMatrixDense< SCALAR >::operator= ( const MatrixBase< OtherDerived > &  other)

◆ operator+=()

template<typename SCALAR>
template<typename OtherDerived >
InertiaMatrixDense<SCALAR>& iit::rbd::tpl::InertiaMatrixDense< SCALAR >::operator+= ( const MatrixBase< OtherDerived > &  other)

◆ fill()

template<typename SCALAR>
void iit::rbd::tpl::InertiaMatrixDense< SCALAR >::fill ( Scalar  m,
const Vec3 &  com,
const Mat33 &  tensor 
)

Sets this 6x6 inertia tensor according to the given inertia properties. All the values (ie the COM and the 3x3 tensor) must be expressed in the same reference frame.

No consistency checks are performed (Note: possibly changing in future).

Parameters
massthe total mass of the body
comthe 3D vector with the position of the center of mass
tensorthe classical 3x3 inertia tensor; this parameter should be expressed in the same coordinate frame as the center-of-mass vector. In other words, it is NOT treated as the inertia tensor with respect to a frame with origin in the center-of-mass, and the parallel axis theorem is NOT applied. The given tensor is copied as it is, in the appropriate 3x3 sub-block of this spatial tensor.

◆ getMass()

template<typename SCALAR>
Scalar iit::rbd::tpl::InertiaMatrixDense< SCALAR >::getMass ( ) const
Returns
the current value of the mass of the rigid body modeled by this tensor

Referenced by iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_LF_hipassembly(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_LF_lowerleg(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_LF_upperleg(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_LH_hipassembly(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_LH_lowerleg(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_LH_upperleg(), iit::testirb4600::dyn::tpl::InertiaProperties< TRAIT >::getMass_link1(), iit::testirb4600::dyn::tpl::InertiaProperties< TRAIT >::getMass_link2(), iit::testirb4600::dyn::tpl::InertiaProperties< TRAIT >::getMass_link3(), iit::testirb4600::dyn::tpl::InertiaProperties< TRAIT >::getMass_link4(), iit::testirb4600::dyn::tpl::InertiaProperties< TRAIT >::getMass_link5(), iit::testirb4600::dyn::tpl::InertiaProperties< TRAIT >::getMass_link6(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_RF_hipassembly(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_RF_lowerleg(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_RF_upperleg(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_RH_hipassembly(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_RH_lowerleg(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_RH_upperleg(), iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT >::getMass_trunk(), and iit::rbd::transformInertia().

◆ getCOM()

template<typename SCALAR>
Vec3 iit::rbd::tpl::InertiaMatrixDense< SCALAR >::getCOM ( ) const
Returns
the position of the center-of-mass of the rigid body modeled by this spatial tensor

◆ get3x3Tensor()

template<typename SCALAR>
const Block33_const iit::rbd::tpl::InertiaMatrixDense< SCALAR >::get3x3Tensor ( ) const
Returns
the 3x3 block of this spatial tensor which corresponds to the sole rotational inertia, that is, the classical inertia tensor

◆ changeMass()

template<typename SCALAR>
void iit::rbd::tpl::InertiaMatrixDense< SCALAR >::changeMass ( Scalar  m)

Scales the whole tensor according to the new value of the mass.

The changes guarantee that the matrix remains positive definite (assuming it was so before).

This method does NOT change the center-of-mass property, while it does change the moments of inertia. Intuitively, calling this method corresponds to changing the mass-density of the body leaving its size and geometry untouched.

Parameters
newMassthe new value of the mass (always expressed in Kilograms); it MUST be positive, no checks are performed

◆ changeCOM()

template<typename SCALAR>
void iit::rbd::tpl::InertiaMatrixDense< SCALAR >::changeCOM ( const Vec3 &  newcom)

Changes the position of the Center-Of-Mass of the rigid body modeled by this tensor.

In addition to the two off-diagonal 3x3 blocks, this method also modifies the 3x3 block that corresponds to the classical inertia tensor, to keep it consistent with the position of the center of mass. It does not change the mass property. Cfr. chapter 2 of Featherstone's book on rigid body dynamics algorithms. TODO show some equations

Parameters
newcoma 3D vector specifying the position of the center of mass, expressed in meters

◆ changeRotationalInertia()

template<typename SCALAR>
void iit::rbd::tpl::InertiaMatrixDense< SCALAR >::changeRotationalInertia ( const Mat33 &  tensor)

Simply sets the 3x3 block that corresponds to the classical rotational inertia

Parameters
tensorthe new 3x3 rotational inertia tensor

◆ setTheFixedZeros()

template<typename SCALAR>
void iit::rbd::tpl::InertiaMatrixDense< SCALAR >::setTheFixedZeros ( )
protected

◆ setSkewSymmetricBlock()

template<typename SCALAR>
template<typename Vector >
void iit::rbd::tpl::InertiaMatrixDense< SCALAR >::setSkewSymmetricBlock ( const MatrixBase< Vector > &  v,
Block33_t  block 
)
protected

Member Data Documentation

◆ Scalar

template<typename SCALAR>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR iit::rbd::tpl::InertiaMatrixDense< SCALAR >::Scalar

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