robot_msgs

BoundingBox3D

center is the box pose in the parent frame; size is the extent along its own x, y, z.

Import
from robot_msgs.vision import BoundingBox3D
ROS 2vision_msgs/msg/BoundingBox3D

Preview

The figure robot_msgs.viz.plot(example) draws for the example below.

Plot of an example BoundingBox3D

Fields

NameTypeDefault
centerPoserequired
sizeVector3required

Example

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

BoundingBox3D(center=Pose(position=Point(x=0.4, y=-0.1, z=0.25), orientation=Quaternion(x=-0.10566871683993562, y=0.6991667342497077, z=0.10566871683993563, w=0.6991667342497078)), size=Vector3(x=0.07, y=0.07, z=0.25))
to_dict() as JSON
{
  "_type": "vision/BoundingBox3D",
  "center": {
    "_type": "geometry/Pose",
    "position": {
      "_type": "geometry/Point",
      "x": 0.4,
      "y": -0.1,
      "z": 0.25
    },
    "orientation": {
      "_type": "geometry/Quaternion",
      "x": -0.10566871683993562,
      "y": 0.6991667342497077,
      "z": 0.10566871683993563,
      "w": 0.6991667342497078
    }
  },
  "size": {
    "_type": "geometry/Vector3",
    "x": 0.07,
    "y": 0.07,
    "z": 0.25
  }
}

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.

Properties

Read-only views computed from the fields.

volume: float

No docstring.

Methods

Return new values; messages are never mutated.

contains(points: Array) -> Array

(N, 3) points in the parent frame → (N,) bool; box edges count as inside.

corners() -> Array

(8, 3) corners in the parent frame.

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.

Pose Vector3

Used by

Types whose fields refer to it.

Detection3D

robot_msgs 0.1.0 @ 2dc6666GitHub · MIT license · generated from the package, not written per type