36 double E00 = X.
E(0, 0);
37 double E01 = X.
E(0, 1);
38 double E02 = X.
E(0, 2);
39 double E10 = X.
E(1, 0);
40 double E11 = X.
E(1, 1);
41 double E12 = X.
E(1, 2);
42 double E20 = X.
E(2, 0);
43 double E21 = X.
E(2, 1);
44 double E22 = X.
E(2, 2);
46 double alpha = 2. * hx * rx;
47 double beta = 2. * hy * ry;
48 double gamma = 2. * hz * rz;
49 double epsilon =
m * rx * rx;
50 double phi =
m * ry * ry;
51 double psi =
m * rz * rz;
52 double pi =
m * rx * ry;
53 double a =
m * rx * rz;
54 double b =
m * ry * rz;
62 double b00 =
Ixx - gamma - beta + psi + phi;
63 double b01 =
Iyx + f + c - pi;
64 double b02 =
Izx + g + d - a;
65 double b11 =
Iyy - gamma - alpha + psi + epsilon;
66 double b12 =
Izy + j + e - b;
67 double b22 =
Izz - beta - alpha + phi + epsilon;
69 double w00 = E00 * b00 + E01 * b01 + E02 * b02;
70 double w01 = E00 * b01 + E01 * b11 + E02 * b12;
71 double w02 = E00 * b02 + E01 * b12 + E02 * b22;
73 double w10 = E10 * b00 + E11 * b01 + E12 * b02;
74 double w11 = E10 * b01 + E11 * b11 + E12 * b12;
75 double w12 = E10 * b02 + E11 * b12 + E12 * b22;
77 double w20 = E20 * b00 + E21 * b01 + E22 * b02;
78 double w21 = E20 * b01 + E21 * b11 + E22 * b12;
79 double w22 = E20 * b02 + E21 * b12 + E22 * b22;
81 h = X.
E * (
h -
m * X.
r);
82 Ixx = w00 * E00 + w01 * E01 + w02 * E02;
83 Iyx = w00 * E10 + w01 * E11 + w02 * E12;
84 Iyy = w10 * E10 + w11 * E11 + w12 * E12;
85 Izx = w00 * E20 + w01 * E21 + w02 * E22;
86 Izy = w10 * E20 + w11 * E21 + w12 * E22;
87 Izz = w20 * E20 + w21 * E21 + w22 * E22;
93 h.
set(-Ic(1, 5), Ic(0, 5), -Ic(0, 4));
117 result.block<3, 3>(3, 3) = Matrix3d::Identity(3, 3) *
m;
void operator+=(const RigidBodyInertia &rbi)
Overloaded plus-equals operator. Adds two inertia matrices.
See V. Duindum p39-40 & Featherstone p32-33.
static Matrix3d toTildeForm(const Point3d &p)
void createFromMatrix(const SpatialMatrix &Ic)
Create a Math::RigidBodyInertia object from a 6x6 Math::SpatialMatrix.
This class stores a bodies mass, center of mass, and inertia information. The inertia elements are st...
void transform(const SpatialTransform &X)
Transform a Math::RigidBodyInertia matrix.
void set(const Eigen::Vector3d &v)
SpatialMatrix toMatrix() const
void setSpatialMatrix(SpatialMatrix &mat) const
Store a Math::RigidBodyInertia in the Math::SpatialMatrix.
Namespace for all structures of the RobotDynamics library.