pinocchio  3.3.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
InertiaTpl< _Scalar, _Options > Struct Template Reference
Inheritance diagram for InertiaTpl< _Scalar, _Options >:
Collaboration diagram for InertiaTpl< _Scalar, _Options >:

Public Types

enum  { Options = _Options }
 
typedef Symmetric3::AlphaSkewSquare AlphaSkewSquare
 
typedef LogCholeskyParametersTpl< Scalar, Options > LogCholeskyParameters
 
typedef Eigen::Matrix< Scalar, 10, 10, Options > Matrix10
 
typedef PseudoInertiaTpl< Scalar, Options > PseudoInertia
 
typedef Eigen::Matrix< Scalar, 10, 1, Options > Vector10
 
- Public Types inherited from NumericalBase< Derived >
typedef traits< Derived >::Scalar Scalar
 

Public Member Functions

 InertiaTpl (const InertiaTpl &clone)
 
template<typename S2 , int O2>
 InertiaTpl (const InertiaTpl< S2, O2 > &clone)
 
 InertiaTpl (const Matrix6 &I6)
 
 InertiaTpl (const Scalar &mass, const Vector3 &com, const Matrix3 &rotational_inertia)
 
 InertiaTpl (const Scalar &mass, const Vector3 &com, const Symmetric3 &rotational_inertia)
 
InertiaTpl__equl__ (const InertiaTpl &clone)
 
InertiaTpl__mequ__ (const InertiaTpl &Yb)
 
InertiaTpl __minus__ (const InertiaTpl &Yb) const
 
template<typename MotionDerived >
ForceTpl< typename traits< MotionDerived >::Scalar, traits< MotionDerived >::Options > __mult__ (const MotionDense< MotionDerived > &v) const
 
template<typename MotionDerived , typename ForceDerived >
void __mult__ (const MotionDense< MotionDerived > &v, ForceDense< ForceDerived > &f) const
 
InertiaTpl__pequ__ (const InertiaTpl &Yb)
 
InertiaTpl __plus__ (const InertiaTpl &Yb) const
 
template<typename NewScalar >
InertiaTpl< NewScalar, Options > cast () const
 
void disp_impl (std::ostream &os) const
 
Symmetric3inertia ()
 
const Symmetric3inertia () const
 
Matrix6 inverse_impl () const
 
template<typename Matrix6Like >
void inverse_impl (const Eigen::MatrixBase< Matrix6Like > &M_) const
 
bool isApprox_impl (const InertiaTpl &other, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
 
bool isEqual (const InertiaTpl &Y2) const
 
bool isZero_impl (const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
 
Vector3 & lever ()
 
const Vector3 & lever () const
 
Scalar & mass ()
 
Scalar mass () const
 
Matrix6 matrix_impl () const
 
template<typename Matrix6Like >
void matrix_impl (const Eigen::MatrixBase< Matrix6Like > &M_) const
 
InertiaTploperator= (const InertiaTpl &clone)
 
template<typename S2 , int O2>
InertiaTpl se3Action_impl (const SE3Tpl< S2, O2 > &M) const
 aI = aXb.act(bI)
 
template<typename S2 , int O2>
InertiaTpl se3ActionInverse_impl (const SE3Tpl< S2, O2 > &M) const
 bI = aXb.actInv(aI)
 
void setIdentity ()
 
void setRandom ()
 
void setZero ()
 
 SPATIAL_TYPEDEF_TEMPLATE (InertiaTpl)
 
Vector10 toDynamicParameters () const
 
PseudoInertia toPseudoInertia () const
 Convert the InertiaTpl object to a 4x4 pseudo inertia matrix. More...
 
template<typename MotionDerived >
Matrix6 variation (const MotionDense< MotionDerived > &v) const
 
template<typename MotionDerived >
Scalar vtiv_impl (const MotionDense< MotionDerived > &v) const
 
template<typename MotionDerived >
Force vxiv (const MotionDense< MotionDerived > &v) const
 
- Public Member Functions inherited from InertiaBase< InertiaTpl< _Scalar, _Options > >
InertiaTpl< _Scalar, _Options > & const_cast_derived () const
 
InertiaTpl< _Scalar, _Options > & derived ()
 
const InertiaTpl< _Scalar, _Options > & derived () const
 
void disp (std::ostream &os) const
 
Symmetric3inertia ()
 
const Symmetric3inertia () const
 
Matrix6 inverse () const
 
void inverse (const Eigen::MatrixBase< Matrix6Like > &mat) const
 
bool isApprox (const InertiaTpl< _Scalar, _Options > &other, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
 
bool isZero (const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
 
Matrix6 ivx (const MotionDense< MotionDerived > &v) const
 
Vector3 & lever ()
 
const Vector3 & lever () const
 
Scalar & mass ()
 
Scalar mass () const
 
Matrix6 matrix () const
 
void matrix (const Eigen::MatrixBase< Matrix6Like > &mat) const
 
 operator Matrix6 () const
 
bool operator!= (const InertiaTpl< _Scalar, _Options > &other) const
 
ForceTpl< typename traits< MotionDerived >::Scalar, traits< MotionDerived >::Options > operator* (const MotionDense< MotionDerived > &v) const
 
InertiaTpl< _Scalar, _Options > operator+ (const InertiaTpl< _Scalar, _Options > &Yb) const
 
InertiaTpl< _Scalar, _Options > & operator+= (const InertiaTpl< _Scalar, _Options > &Yb)
 
InertiaTpl< _Scalar, _Options > operator- (const InertiaTpl< _Scalar, _Options > &Yb) const
 
InertiaTpl< _Scalar, _Options > & operator-= (const InertiaTpl< _Scalar, _Options > &Yb)
 
InertiaTpl< _Scalar, _Options > & operator= (const InertiaTpl< _Scalar, _Options > &clone)
 
bool operator== (const InertiaTpl< _Scalar, _Options > &other) const
 
InertiaTpl< _Scalar, _Options > se3Action (const SE3Tpl< S2, O2 > &M) const
 aI = aXb.act(bI)
 
InertiaTpl< _Scalar, _Options > se3ActionInverse (const SE3Tpl< S2, O2 > &M) const
 bI = aXb.actInv(aI)
 
void setIdentity ()
 
void setRandom ()
 
void setZero ()
 
 SPATIAL_TYPEDEF_TEMPLATE (InertiaTpl< _Scalar, _Options >)
 
Matrix6 variation (const MotionDense< MotionDerived > &v) const
 
Scalar vtiv (const MotionDense< MotionDerived > &v) const
 
Matrix6 vxi (const MotionDense< MotionDerived > &v) const
 

Static Public Member Functions

static InertiaTpl FromBox (const Scalar mass, const Scalar x, const Scalar y, const Scalar z)
 Computes the Inertia of a box defined by its mass and main dimensions (x,y,z). More...
 
static InertiaTpl FromCapsule (const Scalar mass, const Scalar radius, const Scalar height)
 Computes the Inertia of a capsule defined by its mass, radius and length along the Z axis. Assumes a uniform density. More...
 
static InertiaTpl FromCylinder (const Scalar mass, const Scalar radius, const Scalar length)
 Computes the Inertia of a cylinder defined by its mass, radius and length along the Z axis. More...
 
template<typename Vector10Like >
static InertiaTpl FromDynamicParameters (const Eigen::MatrixBase< Vector10Like > &params)
 
static InertiaTpl FromEllipsoid (const Scalar mass, const Scalar x, const Scalar y, const Scalar z)
 Computes the Inertia of an ellipsoid defined by its mass and main semi-axis dimensions (x,y,z). More...
 
static InertiaTpl FromLogCholeskyParameters (const LogCholeskyParameters &log_cholesky)
 Create an InertiaTpl object from log Cholesky parameters. More...
 
static InertiaTpl FromPseudoInertia (const PseudoInertia &pseudo_inertia)
 Create an InertiaTpl object from a PseudoInertia object. More...
 
static InertiaTpl FromSphere (const Scalar mass, const Scalar radius)
 Computes the Inertia of a sphere defined by its mass and its radius. More...
 
static InertiaTpl Identity ()
 
template<typename MotionDerived , typename M6 >
static void ivx_impl (const MotionDense< MotionDerived > &v, const InertiaTpl &I, const Eigen::MatrixBase< M6 > &Iout)
 
static InertiaTpl Random ()
 
template<typename MotionDerived , typename M6 >
static void vxi_impl (const MotionDense< MotionDerived > &v, const InertiaTpl &I, const Eigen::MatrixBase< M6 > &Iout)
 
static InertiaTpl Zero ()
 
- Static Public Member Functions inherited from InertiaBase< InertiaTpl< _Scalar, _Options > >
static void ivx (const MotionDense< MotionDerived > &v, const InertiaTpl< _Scalar, _Options > &I, const Eigen::MatrixBase< M6 > &Iout)
 Time variation operator. It computes the time derivative of an inertia I corresponding to the formula \( \dot{I} = v \times^{*} I \). More...
 
static void vxi (const MotionDense< MotionDerived > &v, const InertiaTpl< _Scalar, _Options > &I, const Eigen::MatrixBase< M6 > &Iout)
 Time variation operator. It computes the time derivative of an inertia I corresponding to the formula \( \dot{I} = v \times^{*} I \). More...
 

Protected Attributes

Vector3 m_com
 
Symmetric3 m_inertia
 
Scalar m_mass
 

Detailed Description

template<typename _Scalar, int _Options>
struct pinocchio::InertiaTpl< _Scalar, _Options >

Definition at line 264 of file inertia.hpp.

Member Function Documentation

◆ cast()

InertiaTpl<NewScalar, Options> cast ( ) const
inline
Returns
An expression of *this with the Scalar type casted to NewScalar.

Definition at line 911 of file inertia.hpp.

◆ FromBox()

static InertiaTpl FromBox ( const Scalar  mass,
const Scalar  x,
const Scalar  y,
const Scalar  z 
)
inlinestatic

Computes the Inertia of a box defined by its mass and main dimensions (x,y,z).

Parameters
[in]massof the box.
[in]xdimension along the local X axis.
[in]ydimension along the local Y axis.
[in]zdimension along the local Z axis.

Definition at line 423 of file inertia.hpp.

◆ FromCapsule()

static InertiaTpl FromCapsule ( const Scalar  mass,
const Scalar  radius,
const Scalar  height 
)
inlinestatic

Computes the Inertia of a capsule defined by its mass, radius and length along the Z axis. Assumes a uniform density.

Parameters
[in]massof the capsule.
[in]radiusof the capsule.
[in]heightof the capsule.

Definition at line 439 of file inertia.hpp.

◆ FromCylinder()

static InertiaTpl FromCylinder ( const Scalar  mass,
const Scalar  radius,
const Scalar  length 
)
inlinestatic

Computes the Inertia of a cylinder defined by its mass, radius and length along the Z axis.

Parameters
[in]massof the cylinder.
[in]radiusof the cylinder.
[in]lengthof the cylinder.

Definition at line 406 of file inertia.hpp.

◆ FromDynamicParameters()

static InertiaTpl FromDynamicParameters ( const Eigen::MatrixBase< Vector10Like > &  params)
inlinestatic

Builds and inertia matrix from a vector of dynamic parameters.

Parameters
[in]paramsThe dynamic parameters.

The parameters are given as \( v = [m, mc_x, mc_y, mc_z, I_{xx}, I_{xy}, I_{yy}, I_{xz}, I_{yz}, I_{zz}]^T \) where \( I = I_C + mS^T(c)S(c) \) and \( I_C \) has its origin at the barycenter.

Definition at line 561 of file inertia.hpp.

◆ FromEllipsoid()

static InertiaTpl FromEllipsoid ( const Scalar  mass,
const Scalar  x,
const Scalar  y,
const Scalar  z 
)
inlinestatic

Computes the Inertia of an ellipsoid defined by its mass and main semi-axis dimensions (x,y,z).

Parameters
[in]massof the ellipsoid.
[in]xsemi-axis dimension along the local X axis.
[in]ysemi-axis dimension along the local Y axis.
[in]zsemi-axis dimension along the local Z axis.

Definition at line 389 of file inertia.hpp.

◆ FromLogCholeskyParameters()

static InertiaTpl FromLogCholeskyParameters ( const LogCholeskyParameters log_cholesky)
inlinestatic

Create an InertiaTpl object from log Cholesky parameters.

Parameters
log_choleskyA log cholesky parameters object
Returns
An InertiaTpl object.

Definition at line 604 of file inertia.hpp.

◆ FromPseudoInertia()

static InertiaTpl FromPseudoInertia ( const PseudoInertia pseudo_inertia)
inlinestatic

Create an InertiaTpl object from a PseudoInertia object.

Parameters
pseudo_inertiaA PseudoInertia object.
Returns
An InertiaTpl object.

Definition at line 581 of file inertia.hpp.

◆ FromSphere()

static InertiaTpl FromSphere ( const Scalar  mass,
const Scalar  radius 
)
inlinestatic

Computes the Inertia of a sphere defined by its mass and its radius.

Parameters
[in]massof the sphere.
[in]radiusof the sphere.

Definition at line 374 of file inertia.hpp.

◆ toDynamicParameters()

Vector10 toDynamicParameters ( ) const
inline

Returns the representation of the matrix as a vector of dynamic parameters. The parameters are given as \( v = [m, mc_x, mc_y, mc_z, I_{xx}, I_{xy}, I_{yy}, I_{xz}, I_{yz}, I_{zz}]^T \) where \( c \) is the center of mass, \( I = I_C + mS^T(c)S(c) \) and \( I_C \) has its origin at the barycenter and \( S(c) \) is the the skew matrix representation of the cross product operator.

Definition at line 541 of file inertia.hpp.

◆ toPseudoInertia()

PseudoInertia toPseudoInertia ( ) const
inline

Convert the InertiaTpl object to a 4x4 pseudo inertia matrix.

Returns
A 4x4 pseudo inertia matrix.

Definition at line 591 of file inertia.hpp.


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