KDL  1.4.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
KDL::RigidBodyInertia Class Reference

6D Inertia of a rigid body More...

#include <src/rigidbodyinertia.hpp>

Collaboration diagram for KDL::RigidBodyInertia:
Collaboration graph
[legend]

Public Member Functions

 RigidBodyInertia (double m=0, const Vector &oc=Vector::Zero(), const RotationalInertia &Ic=RotationalInertia::Zero())
 This constructor creates a cartesian space inertia matrix, the arguments are the mass, the vector from the reference point to cog and the rotational inertia in the cog. More...
 
 ~RigidBodyInertia ()
 
RigidBodyInertia RefPoint (const Vector &p)
 Reference point change with v the vector from the old to the new point expressed in the current reference frame. More...
 
double getMass () const
 Get the mass of the rigid body. More...
 
Vector getCOG () const
 Get the center of gravity of the rigid body. More...
 
RotationalInertia getRotationalInertia () const
 Get the rotational inertia expressed in the reference frame (not the cog) More...
 

Static Public Member Functions

static RigidBodyInertia Zero ()
 Creates an inertia with zero mass, and zero RotationalInertia. More...
 

Private Member Functions

 RigidBodyInertia (double m, const Vector &h, const RotationalInertia &I, bool mhi)
 

Private Attributes

double m
 
Vector h
 
RotationalInertia I
 

Friends

class ArticulatedBodyInertia
 
RigidBodyInertia operator* (double a, const RigidBodyInertia &I)
 Scalar product: I_new = double * I_old. More...
 
RigidBodyInertia operator+ (const RigidBodyInertia &Ia, const RigidBodyInertia &Ib)
 addition I: I_new = I_old1 + I_old2, make sure that I_old1 and I_old2 are expressed in the same reference frame/point, otherwise the result is worth nothing More...
 
Wrench operator* (const RigidBodyInertia &I, const Twist &t)
 calculate spatial momentum: h = I*v make sure that the twist v and the inertia are expressed in the same reference frame/point More...
 
RigidBodyInertia operator* (const Frame &T, const RigidBodyInertia &I)
 Coordinate system transform Ia = T_a_b*Ib with T_a_b the frame from a to b. More...
 
RigidBodyInertia operator* (const Rotation &R, const RigidBodyInertia &I)
 Reference frame orientation change Ia = R_a_b*Ib with R_a_b the rotation of b expressed in a. More...
 

Detailed Description

6D Inertia of a rigid body

The inertia is defined in a certain reference point and a certain reference base. The reference point does not have to coincide with the origin of the reference frame.

Constructor & Destructor Documentation

§ RigidBodyInertia() [1/2]

KDL::RigidBodyInertia::RigidBodyInertia ( double  m = 0,
const Vector oc = Vector::Zero(),
const RotationalInertia Ic = RotationalInertia::Zero() 
)
explicit

This constructor creates a cartesian space inertia matrix, the arguments are the mass, the vector from the reference point to cog and the rotational inertia in the cog.

References KDL::RotationalInertia::data, KDL::Vector::data, and I.

Referenced by getRotationalInertia(), KDL::operator*(), KDL::operator+(), RefPoint(), and Zero().

§ ~RigidBodyInertia()

KDL::RigidBodyInertia::~RigidBodyInertia ( )
inline

References I, operator*, operator+, and RefPoint().

§ RigidBodyInertia() [2/2]

KDL::RigidBodyInertia::RigidBodyInertia ( double  m,
const Vector h,
const RotationalInertia I,
bool  mhi 
)
private

Member Function Documentation

§ getCOG()

Vector KDL::RigidBodyInertia::getCOG ( ) const
inline

Get the center of gravity of the rigid body.

References h, m, and KDL::Vector::Zero().

§ getMass()

double KDL::RigidBodyInertia::getMass ( ) const
inline

Get the mass of the rigid body.

References m.

§ getRotationalInertia()

RotationalInertia KDL::RigidBodyInertia::getRotationalInertia ( ) const
inline

Get the rotational inertia expressed in the reference frame (not the cog)

References h, I, m, KDL::mhi, and RigidBodyInertia().

§ RefPoint()

RigidBodyInertia KDL::RigidBodyInertia::RefPoint ( const Vector p)

Reference point change with v the vector from the old to the new point expressed in the current reference frame.

References KDL::RotationalInertia::data, KDL::Vector::data, KDL::Vector::dot, h, I, m, and RigidBodyInertia().

Referenced by ~RigidBodyInertia().

§ Zero()

static RigidBodyInertia KDL::RigidBodyInertia::Zero ( )
inlinestatic

Creates an inertia with zero mass, and zero RotationalInertia.

References RigidBodyInertia(), KDL::RotationalInertia::Zero(), and KDL::Vector::Zero().

Friends And Related Function Documentation

§ ArticulatedBodyInertia

friend class ArticulatedBodyInertia
friend

§ operator* [1/4]

RigidBodyInertia operator* ( double  a,
const RigidBodyInertia I 
)
friend

Scalar product: I_new = double * I_old.

Referenced by ~RigidBodyInertia().

§ operator* [2/4]

Wrench operator* ( const RigidBodyInertia I,
const Twist t 
)
friend

calculate spatial momentum: h = I*v make sure that the twist v and the inertia are expressed in the same reference frame/point

§ operator* [3/4]

RigidBodyInertia operator* ( const Frame T,
const RigidBodyInertia I 
)
friend

Coordinate system transform Ia = T_a_b*Ib with T_a_b the frame from a to b.

§ operator* [4/4]

RigidBodyInertia operator* ( const Rotation R,
const RigidBodyInertia I 
)
friend

Reference frame orientation change Ia = R_a_b*Ib with R_a_b the rotation of b expressed in a.

§ operator+

RigidBodyInertia operator+ ( const RigidBodyInertia Ia,
const RigidBodyInertia Ib 
)
friend

addition I: I_new = I_old1 + I_old2, make sure that I_old1 and I_old2 are expressed in the same reference frame/point, otherwise the result is worth nothing

Referenced by ~RigidBodyInertia().

Member Data Documentation

§ h

Vector KDL::RigidBodyInertia::h
private

§ I

RotationalInertia KDL::RigidBodyInertia::I
private

§ m

double KDL::RigidBodyInertia::m
private

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