Public Member Functions | Public Attributes | List of all members
RobotDynamics::Math::RigidBodyInertia Class Reference

This class stores a bodies mass, center of mass, and inertia information. The inertia elements are stored individually since the inertia matrix is a 3x3 symmetric matrix. The bodies inertia matrix, expressed about its center of mass, can be reconstructed as

\[ I_c = \begin{bmatrix} I_xx & I_yx & I_zx \\ I_yx & I_yy & I_zy \\ I_zx & I_zy & I_zz \end{bmatrix} \]

The full RigidBodyInertia matrix has the following structure,

\[ \begin{bmatrix} I_c + (h\times)h & h\times \\ -h\times & \mathbf{1}_{3\times3}m \end{bmatrix} \]

where $ \mathbf{1}_{3\times 3} $ is a 3x3 identity matrix. More...

#include <RigidBodyInertia.hpp>

Inheritance diagram for RobotDynamics::Math::RigidBodyInertia:
Inheritance graph
[legend]

Public Member Functions

void createFromMatrix (const SpatialMatrix &Ic)
 Create a Math::RigidBodyInertia object from a 6x6 Math::SpatialMatrix. More...
 
Matrix63 multiplyMatrix63 (Matrix63 m) const
 A helper method that returns a 6x3 matrix that is a Math::RigidBodyInertia multiplied by a 6x3 matrix. More...
 
void operator+= (const RigidBodyInertia &rbi)
 Overloaded plus-equals operator. Adds two inertia matrices. More...
 
RigidBodyInertiaoperator= (const RigidBodyInertia &other)
 
 RigidBodyInertia ()
 Constructor. More...
 
 RigidBodyInertia (double mass, const Vector3d &com_mass, const Matrix3d &inertia)
 Constructor. More...
 
 RigidBodyInertia (double m, const Vector3d &h, const double Ixx, const double Iyx, const double Iyy, const double Izx, const double Izy, const double Izz)
 Constructor. More...
 
 RigidBodyInertia (const RigidBodyInertia &inertia)
 Copy constructor. More...
 
void set (const RigidBodyInertia &I)
 Setter. More...
 
void set (double m, const Vector3d &h, const double Ixx, const double Iyx, const double Iyy, const double Izx, const double Izy, const double Izz)
 Setter. More...
 
void setSpatialMatrix (SpatialMatrix &mat) const
 Store a Math::RigidBodyInertia in the Math::SpatialMatrix. More...
 
SpatialMatrix subtractSpatialMatrix (const SpatialMatrix &m) const
 Given Math::RigidBodyInertia $ I_r $ ad Math::SpatialMatrix $ M_I $, returns Math::SpatialMatrix $ M_r $ such that $ M_r = I_r - M_I $. More...
 
SpatialVector timesSpatialVector (const SpatialVector &v) const
 Multiply a Math::RigidBodyInertia by a Math::SpatialVector and return the result as a new Math::SpatialVector. More...
 
SpatialMatrix toMatrix () const
 
void transform (const SpatialTransform &X)
 Transform a Math::RigidBodyInertia matrix. More...
 
RigidBodyInertia transform_copy (const SpatialTransform &X) const
 Copy, transform, and return a Math::RigidBodyInertia. More...
 

Public Attributes

Vector3d h
 
double Ixx
 
double Iyx
 
double Iyy
 
double Izx
 
double Izy
 
double Izz
 
double m
 

Detailed Description

This class stores a bodies mass, center of mass, and inertia information. The inertia elements are stored individually since the inertia matrix is a 3x3 symmetric matrix. The bodies inertia matrix, expressed about its center of mass, can be reconstructed as

\[ I_c = \begin{bmatrix} I_xx & I_yx & I_zx \\ I_yx & I_yy & I_zy \\ I_zx & I_zy & I_zz \end{bmatrix} \]

The full RigidBodyInertia matrix has the following structure,

\[ \begin{bmatrix} I_c + (h\times)h & h\times \\ -h\times & \mathbf{1}_{3\times3}m \end{bmatrix} \]

where $ \mathbf{1}_{3\times 3} $ is a 3x3 identity matrix.

Definition at line 45 of file RigidBodyInertia.hpp.

Constructor & Destructor Documentation

RobotDynamics::Math::RigidBodyInertia::RigidBodyInertia ( )
inline

Constructor.

Definition at line 51 of file RigidBodyInertia.hpp.

RobotDynamics::Math::RigidBodyInertia::RigidBodyInertia ( double  mass,
const Vector3d com_mass,
const Matrix3d inertia 
)
inline

Constructor.

Parameters
massBody mass
com_massVector pointing to center of mass scaled by the body mass
inertia3x3 Inertia tensor about the bodies center of mass

Definition at line 61 of file RigidBodyInertia.hpp.

RobotDynamics::Math::RigidBodyInertia::RigidBodyInertia ( double  m,
const Vector3d h,
const double  Ixx,
const double  Iyx,
const double  Iyy,
const double  Izx,
const double  Izy,
const double  Izz 
)
inline

Constructor.

Parameters
mBody mass
hVector pointing to center of mass scaled by the body mass
Ixx
Iyx
Iyy
Izx
Izy
Izz

Definition at line 77 of file RigidBodyInertia.hpp.

RobotDynamics::Math::RigidBodyInertia::RigidBodyInertia ( const RigidBodyInertia inertia)
inline

Copy constructor.

Parameters
inertia

Definition at line 86 of file RigidBodyInertia.hpp.

Member Function Documentation

void RobotDynamics::Math::RigidBodyInertia::createFromMatrix ( const SpatialMatrix Ic)

Create a Math::RigidBodyInertia object from a 6x6 Math::SpatialMatrix.

Parameters
Ic

Definition at line 90 of file RigidBodyInertia.cpp.

Matrix63 RobotDynamics::Math::RigidBodyInertia::multiplyMatrix63 ( Matrix63  m) const
inline

A helper method that returns a 6x3 matrix that is a Math::RigidBodyInertia multiplied by a 6x3 matrix.

Parameters
m
Returns
The result of multiplying a Math::RigidBodyInertia by a 6x3 matrix

Definition at line 199 of file RigidBodyInertia.hpp.

void RobotDynamics::Math::RigidBodyInertia::operator+= ( const RigidBodyInertia rbi)

Overloaded plus-equals operator. Adds two inertia matrices.

Parameters
rbi

Definition at line 14 of file RigidBodyInertia.cpp.

RigidBodyInertia& RobotDynamics::Math::RigidBodyInertia::operator= ( const RigidBodyInertia other)
inline

Definition at line 207 of file RigidBodyInertia.hpp.

void RobotDynamics::Math::RigidBodyInertia::set ( const RigidBodyInertia I)
inline

Setter.

Parameters
I

Definition at line 95 of file RigidBodyInertia.hpp.

void RobotDynamics::Math::RigidBodyInertia::set ( double  m,
const Vector3d h,
const double  Ixx,
const double  Iyx,
const double  Iyy,
const double  Izx,
const double  Izy,
const double  Izz 
)
inline

Setter.

Parameters
mBody mass
hVector pointing to center of mass scaled by the body mass
Ixx
Iyx
Iyy
Izx
Izy
Izz

Definition at line 111 of file RigidBodyInertia.hpp.

void RobotDynamics::Math::RigidBodyInertia::setSpatialMatrix ( SpatialMatrix mat) const

Store a Math::RigidBodyInertia in the Math::SpatialMatrix.

Parameters
matModified to store a Math::RigidBodyInertia in the Math::SpatialMatrix

Definition at line 122 of file RigidBodyInertia.cpp.

SpatialMatrix RobotDynamics::Math::RigidBodyInertia::subtractSpatialMatrix ( const SpatialMatrix m) const
inline

Given Math::RigidBodyInertia $ I_r $ ad Math::SpatialMatrix $ M_I $, returns Math::SpatialMatrix $ M_r $ such that $ M_r = I_r - M_I $.

Parameters
m
Returns
New Math::SpatialMatrix that is the Math::SpatialMatrix subtracted from a Math::RigidBodyInertia

Definition at line 173 of file RigidBodyInertia.hpp.

SpatialVector RobotDynamics::Math::RigidBodyInertia::timesSpatialVector ( const SpatialVector v) const
inline

Multiply a Math::RigidBodyInertia by a Math::SpatialVector and return the result as a new Math::SpatialVector.

Parameters
v
Returns
The result of a Math::RigidBodyInertia multiplied by a Math::SpatialVector

Definition at line 187 of file RigidBodyInertia.hpp.

SpatialMatrix RobotDynamics::Math::RigidBodyInertia::toMatrix ( ) const

Get a Math::RigidBodyInertia as a 6x6 Math::SpatialMatrix

Returns
A 6x6 matrix representing a Math::SpatialInertia matrix

Definition at line 102 of file RigidBodyInertia.cpp.

void RobotDynamics::Math::RigidBodyInertia::transform ( const SpatialTransform X)
virtual

Transform a Math::RigidBodyInertia matrix.

Parameters
X

Implements RobotDynamics::Math::TransformableGeometricObject.

Definition at line 26 of file RigidBodyInertia.cpp.

RigidBodyInertia RobotDynamics::Math::RigidBodyInertia::transform_copy ( const SpatialTransform X) const
inline

Copy, transform, and return a Math::RigidBodyInertia.

Parameters
X
Returns
Returns a copied and transformed Math::RigidBodyInertia

Definition at line 141 of file RigidBodyInertia.hpp.

Member Data Documentation

Vector3d RobotDynamics::Math::RigidBodyInertia::h

Vector pointing to body center of mass in body frame, scaled by body mass

Definition at line 222 of file RigidBodyInertia.hpp.

double RobotDynamics::Math::RigidBodyInertia::Ixx

Element in body's inertia matrix

Definition at line 224 of file RigidBodyInertia.hpp.

double RobotDynamics::Math::RigidBodyInertia::Iyx

Element in body's inertia matrix

Definition at line 225 of file RigidBodyInertia.hpp.

double RobotDynamics::Math::RigidBodyInertia::Iyy

Element in body's inertia matrix

Definition at line 226 of file RigidBodyInertia.hpp.

double RobotDynamics::Math::RigidBodyInertia::Izx

Element in body's inertia matrix

Definition at line 227 of file RigidBodyInertia.hpp.

double RobotDynamics::Math::RigidBodyInertia::Izy

Element in body's inertia matrix

Definition at line 228 of file RigidBodyInertia.hpp.

double RobotDynamics::Math::RigidBodyInertia::Izz

Element in body's inertia matrix

Definition at line 229 of file RigidBodyInertia.hpp.

double RobotDynamics::Math::RigidBodyInertia::m

Mass

Definition at line 220 of file RigidBodyInertia.hpp.


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


rdl_dynamics
Author(s):
autogenerated on Tue Apr 20 2021 02:25:28