7 #ifndef SPATIAL_RB_INERTIA
8 #error This class is not to be included by the user directly. Use SpatialRBInertiad.h or SpatialRBInertiaf.h instead.
37 std::vector<SACCEL>&
inverse_mult(
const std::vector<SFORCE>& v, std::vector<SACCEL>& result)
const;
48 SPATIAL_RB_INERTIA operator/(REAL scalar)
const {
return operator*((REAL) 1.0/scalar); }
50 std::vector<SFORCE>&
mult(
const std::vector<SACCEL>& s, std::vector<SFORCE>& result)
const;
53 std::vector<SMOMENTUM>&
mult(
const std::vector<SVELOCITY>& s, std::vector<SMOMENTUM>& result)
const;
66 boost::shared_ptr<const POSE3>
pose;
72 const unsigned X = 0, Y = 1, Z = 2, SPATIAL_DIM = 6;
75 M.resize(SPATIAL_DIM, SPATIAL_DIM);
83 M.set_sub_mat(0,0, hxm, eTranspose);
84 M.set_sub_mat(3,0, J-hx*hxm);
85 M.set_sub_mat(0,3,
MATRIX3(m, 0, 0, 0, m, 0, 0, 0, m));
86 M.set_sub_mat(3,3, hxm);
95 const unsigned X = 0, Y = 1, Z = 2, SPATIAL_DIM = 6;
98 M.resize(SPATIAL_DIM, SPATIAL_DIM);
105 M.set_sub_mat(0,3, mhx, eTranspose);
106 M.set_sub_mat(3,3, J - (mhx*hx));
107 M.set_sub_mat(0,0,
MATRIX3(m, 0, 0, 0, m, 0, 0, 0, m));
108 M.set_sub_mat(3,0, mhx);
SPATIAL_RB_INERTIA operator+(const SPATIAL_RB_INERTIA &m) const
Adds two spatial matrices.
Definition: SpatialRBInertia.cpp:246
SPATIAL_RB_INERTIA & operator-=(const SPATIAL_RB_INERTIA &m)
Subtracts m from this in place.
Definition: SpatialRBInertia.cpp:308
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.
Definition: SpatialRBInertia.cpp:320
boost::shared_ptr< const POSE3 > pose
The pose that this inertia is defined in.
Definition: SpatialRBInertia.h:66
SPATIAL_RB_INERTIA & operator+=(const SPATIAL_RB_INERTIA &m)
Adds m to this in place.
Definition: SpatialRBInertia.cpp:296
SACCEL inverse_mult(const SFORCE &v) const
Multiplies the inverse of this spatial matrix by a force.
Definition: SpatialRBInertia.cpp:137
A spatial (six dimensional) momentum.
Definition: SMomentum.h:12
SPATIAL_RB_INERTIA operator-() const
Returns the negation of this matrix.
Definition: SpatialRBInertia.cpp:235
MATRIX3 J
The rigid body moment of inertia matrix.
Definition: SpatialRBInertia.h:63
REAL m
The rigid body mass.
Definition: SpatialRBInertia.h:57
SPATIAL_RB_INERTIA & operator=(const SPATIAL_RB_INERTIA &source)
Copies a spatial matrix to this one.
Definition: SpatialRBInertia.cpp:46
A spatial velocity (a twist)
Definition: SVelocity.h:15
A rigid body pose.
Definition: Pose3.h:15
A 6-dimensional floating-point vector for use with spatial algebra.
Definition: SVector6.h:22
A 6x6 spatial algebra matrix used for dynamics calculations.
Definition: SpatialRBInertia.h:25
A spatial (six dimensional) acceleration.
Definition: SAccel.h:14
ORIGIN3 h
The position of the center-of-mass times the mass.
Definition: SpatialRBInertia.h:60
A three-dimensional floating point vector used for representing points and vectors in 3D with associa...
Definition: Vector3.h:15
A spatial force (a wrench)
Definition: SForce.h:14
A three-dimensional floating point vector used for representing points and vectors in 3D and without ...
Definition: Origin3.h:16
static MATRIX3 skew_symmetric(REAL a, REAL b, REAL c)
Constructs a skew-symmetric matrix from the given values.
Definition: Matrix3.cpp:260
Mat & to_matrix(Mat &M) const
Converts this to a matrix.
Definition: SpatialRBInertia.h:70
Mat & to_PD_matrix(Mat &M) const
Converts this to a positive-definite matrix.
Definition: SpatialRBInertia.h:93
A 3x3 matrix that may be used for orientation, inertia tensors, etc.
Definition: Matrix3.h:20
void set_zero()
Creates a zero matrix.
Definition: SpatialRBInertia.cpp:56