- 3.0.2 rigid body dynamics module.
|
#include <InertiaMatrix.h>
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) |
Dense 6x6 matrix that represents the 6D spatial inertia tensor. See chapther 2 of Featherstone's "Rigid body dynamics algorithms".
iit::rbd::tpl::InertiaMatrixDense< SCALAR >::InertiaMatrixDense | ( | ) |
iit::rbd::tpl::InertiaMatrixDense< SCALAR >::InertiaMatrixDense | ( | Scalar | m, |
const Vec3 & | com, | ||
const Mat33 & | I | ||
) |
See fill()
InertiaMatrixDense<SCALAR>& iit::rbd::tpl::InertiaMatrixDense< SCALAR >::operator= | ( | const MatrixBase< OtherDerived > & | other | ) |
InertiaMatrixDense<SCALAR>& iit::rbd::tpl::InertiaMatrixDense< SCALAR >::operator+= | ( | const MatrixBase< OtherDerived > & | other | ) |
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).
mass | the total mass of the body |
com | the 3D vector with the position of the center of mass |
tensor | the 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. |
Scalar iit::rbd::tpl::InertiaMatrixDense< SCALAR >::getMass | ( | ) | const |
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().
Vec3 iit::rbd::tpl::InertiaMatrixDense< SCALAR >::getCOM | ( | ) | const |
const Block33_const iit::rbd::tpl::InertiaMatrixDense< SCALAR >::get3x3Tensor | ( | ) | const |
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.
newMass | the new value of the mass (always expressed in Kilograms); it MUST be positive, no checks are performed |
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
newcom | a 3D vector specifying the position of the center of mass, expressed in meters |
void iit::rbd::tpl::InertiaMatrixDense< SCALAR >::changeRotationalInertia | ( | const Mat33 & | tensor | ) |
Simply sets the 3x3 block that corresponds to the classical rotational inertia
tensor | the new 3x3 rotational inertia tensor |
|
protected |
|
protected |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR iit::rbd::tpl::InertiaMatrixDense< SCALAR >::Scalar |