robot_msgs

MeshResource

filename as the owner writes it (package://…, file://… or a path), unresolved; scale multiplies the file's x, y, z (URDF's default is 1, 1, 1).

Import
from robot_msgs.shape import MeshResource
ROS 2no ROS equivalent

Fields

NameTypeDefault
filenamestrrequired
scaleVector3Vector3(x=1.0, y=1.0, z=1.0)

Example

One instance from the package's own test catalog; the output is its real repr().

MeshResource(filename='package://bam_arm/meshes/link1.stl', scale=Vector3(x=0.001, y=0.001, z=0.001))
to_dict() as JSON
{
  "_type": "shape/MeshResource",
  "filename": "package://bam_arm/meshes/link1.stl",
  "scale": {
    "_type": "geometry/Vector3",
    "x": 0.001,
    "y": 0.001,
    "z": 0.001
  }
}

Long arrays are cut after 16 values and say so with “…”.

Functions

Constructors

Classmethods and staticmethods: ways to build one.

from_dict

from Msg
from_dict(data: Mapping[str, Any]) -> M

No docstring.

Methods

Return new values; messages are never mutated.

replace

from Msg
replace(**changes: Any) -> M

A copy with some fields changed. Validation runs again.

to_dict

from Msg
to_dict() -> dict[str, Any]

JSON-safe dict with a "_type" key; arrays keep their dtype and shape.

Uses

Types its fields refer to.

Vector3

robot_msgs 0.2.0 @ 22ec67fGitHub · MIT license · generated from the package, not written per type