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

Public Types

enum  { Options = _Options }
 
typedef Symmetric3::AlphaSkewSquare AlphaSkewSquare
 
typedef Eigen::Matrix< _Scalar, 10, 1, _Options > Vector10
 

Public Member Functions

 InertiaTpl (const InertiaTpl &clone)
 
template<int O2>
 InertiaTpl (const InertiaTpl< Scalar, O2 > &clone)
 
 InertiaTpl (const Matrix6 &I6)
 
 InertiaTpl (const Scalar mass, const Vector3 &com, const Matrix3 &rotational_inertia)
 
 InertiaTpl (Scalar mass, const Vector3 &com, const Symmetric3 &rotational_inertia)
 
InertiaTpl__equl__ (const InertiaTpl &clone)
 
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
 
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
 
InertiaTploperator= (const InertiaTpl &clone)
 
InertiaTpl se3Action_impl (const SE3 &M) const
 aI = aXb.act(bI)
 
InertiaTpl se3ActionInverse_impl (const SE3 &M) const
 bI = aXb.actInv(aI)
 
void setIdentity ()
 
void setRandom ()
 
void setZero ()
 
 SPATIAL_TYPEDEF_TEMPLATE (InertiaTpl)
 
Vector10 toDynamicParameters () const
 
Matrix6 variation (const Motion &v) const
 
Scalar vtiv_impl (const Motion &v) const
 
Force vxiv (const Motion &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 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 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 M6 >
static void ivx_impl (const Motion &v, const InertiaTpl &I, const Eigen::MatrixBase< M6 > &Iout)
 
static InertiaTpl Random ()
 
template<typename M6 >
static void vxi_impl (const Motion &v, const InertiaTpl &I, const Eigen::MatrixBase< M6 > &Iout)
 
static InertiaTpl Zero ()
 

Protected Attributes

Vector3 m_com
 
Symmetric3 m_inertia
 
Scalar m_mass
 

Friends

class InertiaBase< InertiaTpl< _Scalar, _Options > >
 

Detailed Description

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

Definition at line 52 of file fwd.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 588 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 298 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 279 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 355 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 260 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 247 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 335 of file inertia.hpp.


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