A class for inertial information about a rigid body consisting of the scalar mass, a 3x3 symmetric moment of inertia matrix, and center of mass reference frame pose. More...
#include <ignition/math/Inertial.hh>
Public Member Functions | |
Inertial () | |
Default Constructor. | |
Inertial (const Inertial< T > &_inertial) | |
Copy constructor. | |
Inertial (const MassMatrix3< T > &_massMatrix, const Pose3< T > &_pose) | |
Constructor. | |
virtual | ~Inertial () |
Destructor. | |
const MassMatrix3< T > & | MassMatrix () const |
Get the mass and inertia matrix. | |
Matrix3< T > | MOI () const |
Get the moment of inertia matrix expressed in the base coordinate frame. | |
bool | operator!= (const Inertial< T > &_inertial) const |
Inequality test operator. | |
const Inertial< T > | operator+ (const Inertial< T > &_inertial) const |
Adds inertial properties to current object. | |
Inertial< T > & | operator+= (const Inertial< T > &_inertial) |
Adds inertial properties to current object. | |
Inertial & | operator= (const Inertial< T > &_inertial) |
Equal operator. | |
bool | operator== (const Inertial< T > &_inertial) const |
Equality comparison operator. | |
const Pose3< T > & | Pose () const |
Get the pose of center of mass reference frame. | |
bool | SetInertialRotation (const Quaternion< T > &_q) |
Set the inertial pose rotation without affecting the MOI in the base coordinate frame. | |
bool | SetMassMatrix (const MassMatrix3< T > &_m) |
Set the mass and inertia matrix. | |
bool | SetMassMatrixRotation (const Quaternion< T > &_q, const T _tol=1e-6) |
Set the MassMatrix rotation (eigenvectors of inertia matrix) without affecting the MOI in the base coordinate frame. | |
bool | SetPose (const Pose3< T > &_pose) |
Set the pose of center of mass reference frame. | |
A class for inertial information about a rigid body consisting of the scalar mass, a 3x3 symmetric moment of inertia matrix, and center of mass reference frame pose.
|
inline |
Default Constructor.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::operator+().
|
inline |
Constructor.
[in] | _massMatrix | Mass and inertia matrix. |
[in] | _pose | Pose of center of mass reference frame. |
|
inline |
Copy constructor.
[in] | _inertial | Inertial element to copy |
|
inlinevirtual |
Destructor.
|
inline |
Get the mass and inertia matrix.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::operator+=(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::operator=(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::operator==(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::SetMassMatrixRotation().
|
inline |
Get the moment of inertia matrix expressed in the base coordinate frame.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::operator+=(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::SetInertialRotation().
|
inline |
Inequality test operator.
[in] | _inertial | Inertial<T> to test |
|
inline |
Adds inertial properties to current object.
The mass, center of mass location, and inertia matrix are updated as long as the total mass is positive.
[in] | _inertial | Inertial to add. |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::Inertial().
|
inline |
Adds inertial properties to current object.
The mass, center of mass location, and inertia matrix are updated as long as the total mass is positive.
[in] | _inertial | Inertial to add. |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::MassMatrix(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::MOI(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::Pose(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Vector3< T >::X(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Vector3< T >::Y(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Vector3< T >::Z().
|
inline |
Equal operator.
[in] | _inertial | Inertial to copy. |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::MassMatrix(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::Pose().
|
inline |
Equality comparison operator.
[in] | _inertial | Inertial to copy. |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::MassMatrix(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::Pose().
|
inline |
Get the pose of center of mass reference frame.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::operator+=(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::operator=(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::operator==().
|
inline |
Set the inertial pose rotation without affecting the MOI in the base coordinate frame.
[in] | _q | New rotation for inertial pose. |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::MOI().
|
inline |
Set the mass and inertia matrix.
[in] | _m | New MassMatrix3 object. |
|
inline |
Set the MassMatrix rotation (eigenvectors of inertia matrix) without affecting the MOI in the base coordinate frame.
Note that symmetries in inertia matrix may prevent the output of MassMatrix3::PrincipalAxesOffset to match this function's input _q, but it is guaranteed that the MOI in the base frame will not change. A negative value of _tol (such as -1e-6) can be passed to ensure that diagonal values are always sorted.
[in] | _q | New rotation. |
[in] | _tol | Relative tolerance given by absolute value of _tol. This is passed to the MassMatrix3 PrincipalMoments and PrincipalAxesOffset functions. |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Inverse(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Inertial< T >::MassMatrix().
|
inline |
Set the pose of center of mass reference frame.
[in] | _pose | New pose. |