Ravelin
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SPATIAL_RB_INERTIA Class Reference

A 6x6 spatial algebra matrix used for dynamics calculations. More...

#include <SpatialRBInertia.h>

Public Member Functions

 SPATIAL_RB_INERTIA (boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >())
 
 SPATIAL_RB_INERTIA (boost::shared_ptr< POSE3 > pose)
 
 SPATIAL_RB_INERTIA (REAL m, const VECTOR3 &h, const MATRIX3 &J, boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >())
 
 SPATIAL_RB_INERTIA (REAL m, const VECTOR3 &h, const MATRIX3 &J, boost::shared_ptr< POSE3 > pose)
 
 SPATIAL_RB_INERTIA (const SPATIAL_RB_INERTIA &source)
 
void set_zero ()
 Creates a zero matrix.
 
SACCEL inverse_mult (const SFORCE &v) const
 Multiplies the inverse of this spatial matrix by a force.
 
SVELOCITY inverse_mult (const SMOMENTUM &m) const
 Multiplies the inverse of this spatial matrix by a momentum.
 
std::vector< SACCEL > & inverse_mult (const std::vector< SFORCE > &v, std::vector< SACCEL > &result) const
 Multiplies the inverse of this spatial matrix by a force.
 
SPATIAL_RB_INERTIAoperator= (const SPATIAL_RB_INERTIA &source)
 Copies a spatial matrix to this one.
 
SPATIAL_RB_INERTIAoperator+= (const SPATIAL_RB_INERTIA &m)
 Adds m to this in place.
 
SPATIAL_RB_INERTIAoperator-= (const SPATIAL_RB_INERTIA &m)
 Subtracts m from this in place.
 
SPATIAL_RB_INERTIAoperator*= (const SPATIAL_RB_INERTIA &m)
 
SPATIAL_RB_INERTIAoperator*= (REAL scalar)
 
SPATIAL_RB_INERTIAoperator/= (REAL scalar)
 
SPATIAL_RB_INERTIA operator+ (const SPATIAL_RB_INERTIA &m) const
 Adds two spatial matrices.
 
SPATIAL_RB_INERTIA operator- (const SPATIAL_RB_INERTIA &m) const
 Subtracts two spatial matrices.
 
SPATIAL_RB_INERTIA operator* (const SPATIAL_RB_INERTIA &m) const
 
SPATIAL_RB_INERTIA operator* (REAL scalar) const
 
SPATIAL_RB_INERTIA operator/ (REAL scalar) const
 
SFORCE operator* (const SACCEL &s) const
 Multiplies this inertia by an acceleration and returns a force.
 
std::vector< SFORCE > & mult (const std::vector< SACCEL > &s, std::vector< SFORCE > &result) const
 Multiplies this inertia by a vector of accelerations and returns a vector of forces.
 
SMOMENTUM operator* (const SVELOCITY &s) const
 Multiplies this inertia by a velocity and returns a momentum.
 
SMOMENTUM mult (const SVELOCITY &s) const
 
std::vector< SMOMENTUM > & mult (const std::vector< SVELOCITY > &s, std::vector< SMOMENTUM > &result) const
 Multiplies this inertia by a vector of accelerations and returns a vector of forces.
 
SPATIAL_RB_INERTIA operator- () const
 Returns the negation of this matrix.
 
template<class Mat >
Mat & to_matrix (Mat &M) const
 Converts this to a matrix.
 
template<class Mat >
Mat & to_PD_matrix (Mat &M) const
 Converts this to a positive-definite matrix.
 

Static Public Member Functions

static SPATIAL_RB_INERTIA zero ()
 

Public Attributes

REAL m
 The rigid body mass.
 
ORIGIN3 h
 The position of the center-of-mass times the mass.
 
MATRIX3 J
 The rigid body moment of inertia matrix.
 
boost::shared_ptr< const POSE3pose
 The pose that this inertia is defined in.
 

Detailed Description

A 6x6 spatial algebra matrix used for dynamics calculations.

The matrix is represented by: | -hx*m I*m | | J - hx*hx*m hx*m | where hx is the skew symmetric matrix determined by h (h is the vector from the origin of the reference frame to the center of mass) and I is the identity matrix. The inverse of this matrix is: | -inv(J)*hx inv(J) | | I/m - hx*inv(J)*hx hx*inv(J) |


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