Mesh
vertices is (N, 3) float64 metres; triangles is (M, 3) int32 vertex indices (ROS's MeshTriangle.vertex_indices), counter-clockwise seen from outside.
Full docstring
The volume, centroid and inertia methods read the mesh as a solid, so they are exact for a closed mesh whose triangles face outward and meaningless for an open one.
Preview
The figure robot_msgs.viz.plot(example) draws for the example below.

Fields
| Name | Type | Default |
|---|---|---|
vertices | Array | required |
triangles | Array | required |
Example
One instance from the package's own test catalog; the output is its real repr().
Mesh(vertices=float64[14×3], triangles=int32[24×3])to_dict() as JSON
{
"_type": "shape/Mesh",
"vertices": {
"dtype": "<f8",
"shape": [14, 3],
"data": [0.2, 0.0, -0.25, 0.17320508075688776, 0.09999999999999999, -0.25, 0.10000000000000003, 0.17320508075688773, -0.25, 1.2246467991473533e-17, 0.2, -0.25, -0.09999999999999996, 0.17320508075688776, -0.25, -0.17320508075688776, "… 26 more values"]
},
"triangles": {
"dtype": "<i4",
"shape": [24, 3],
"data": [0, 1, 12, 13, 1, 0, 1, 2, 12, 13, 2, 1, 2, 3, 12, 13, "… 56 more values"]
}
}Long arrays are cut after 16 values and say so with “…”.
Functions
Constructors
Classmethods and staticmethods: ways to build one.
Methods
Return new values; messages are never mutated.
bounding_box() -> tuple[Point, Point](min, max) corners of the axis-aligned box around the vertices.
inertia(mass: float) -> InertiaInertia of the solid at uniform density, about its centroid (which is com).
transformed(pose: Pose) -> MeshThe mesh moved rigidly: every vertex rotated by pose.orientation, then shifted.
volume() -> floatSigned volume (m³) by the divergence theorem: positive when the triangles face
to_dict
from Msgto_dict() -> dict[str, Any]JSON-safe dict with a "_type" key; arrays keep their dtype and shape.
Related types
No other type refers to it, and it refers to none.