Inertia
Mass m (kg), centre of mass com (m) and the six independent tensor entries (kg·m²).
Fields
| Name | Type | Default |
|---|---|---|
m | float | 0.0 |
com | Vector3 | Vector3() |
ixx | float | 0.0 |
ixy | float | 0.0 |
ixz | float | 0.0 |
iyy | float | 0.0 |
iyz | float | 0.0 |
izz | float | 0.0 |
Example
One instance from the package's own test catalog; the output is its real repr().
Inertia(m=0.75, com=Vector3(x=0.0, y=0.01, z=0.04), ixx=0.0012, ixy=1e-06, ixz=-2e-06, iyy=0.0011, iyz=3e-06, izz=0.0004)to_dict() as JSON
{
"_type": "geometry/Inertia",
"m": 0.75,
"com": {
"_type": "geometry/Vector3",
"x": 0.0,
"y": 0.01,
"z": 0.04
},
"ixx": 0.0012,
"ixy": 1e-06,
"ixz": -2e-06,
"iyy": 0.0011,
"iyz": 3e-06,
"izz": 0.0004
}Long arrays are cut after 16 values and say so with “…”.
Functions
Constructors
Classmethods and staticmethods: ways to build one.
from_matrix(m: float, com: Vector3, matrix: Any) -> InertiaFrom a symmetric (3, 3) tensor; an asymmetric one is refused, never averaged.
Methods
Return new values; messages are never mutated.
is_physical() -> boolPositive mass, a positive semi-definite tensor and the triangle inequality on its
rotated(rotation: Quaternion) -> InertiaRe-expressed in a frame turned by rotation: I' = R·I·Rᵀ, com' = R·com.
to_dict
from Msgto_dict() -> dict[str, Any]JSON-safe dict with a "_type" key; arrays keep their dtype and shape.