6D Inertia of a rigid body More...
#include <rigidbodyinertia.hpp>
Public Member Functions | |
Vector | getCOG () const |
Get the center of gravity of the rigid body. | |
double | getMass () const |
Get the mass of the rigid body. | |
RotationalInertia | getRotationalInertia () const |
Get the rotational inertia expressed in the reference frame (not the cog). | |
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. | |
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. | |
~RigidBodyInertia () | |
Static Public Member Functions | |
static RigidBodyInertia | Zero () |
Creates an inertia with zero mass, and zero RotationalInertia. | |
Friends | |
class | ArticulatedBodyInertia |
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. | |
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. | |
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 | |
RigidBodyInertia | operator* (double a, const RigidBodyInertia &I) |
Scalar product: I_new = double * I_old. | |
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 |
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.
Definition at line 37 of file rigidbodyinertia.hpp.
KDL::RigidBodyInertia::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.
Definition at line 37 of file rigidbodyinertia.cpp.
References KDL::RotationalInertia::data, and KDL::Vector::data.
Referenced by RefPoint(), and Zero().
KDL::RigidBodyInertia::~RigidBodyInertia | ( | ) | [inline] |
Definition at line 54 of file rigidbodyinertia.hpp.
Vector KDL::RigidBodyInertia::getCOG | ( | ) | const [inline] |
Get the center of gravity of the rigid body.
Definition at line 99 of file rigidbodyinertia.hpp.
References Zero().
double KDL::RigidBodyInertia::getMass | ( | ) | const [inline] |
Get the mass of the rigid body.
Definition at line 92 of file rigidbodyinertia.hpp.
RotationalInertia KDL::RigidBodyInertia::getRotationalInertia | ( | ) | const [inline] |
Get the rotational inertia expressed in the reference frame (not the cog).
Definition at line 107 of file rigidbodyinertia.hpp.
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.
Definition at line 85 of file rigidbodyinertia.cpp.
References KDL::RotationalInertia::data, KDL::Vector::data, KDL::mhi, and RigidBodyInertia().
static RigidBodyInertia KDL::RigidBodyInertia::Zero | ( | ) | [inline, static] |
Creates an inertia with zero mass, and zero RotationalInertia.
Definition at line 49 of file rigidbodyinertia.hpp.
References RigidBodyInertia(), KDL::RotationalInertia::Zero(), and KDL::Vector::Zero().
Referenced by getCOG().
friend class ArticulatedBodyInertia [friend] |
Definition at line 117 of file rigidbodyinertia.hpp.
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.
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.
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
RigidBodyInertia operator* | ( | double | a, | |
const RigidBodyInertia & | I | |||
) | [friend] |
Scalar product: I_new = double * I_old.
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