robot_msgs

ObjectHypothesis

class_id names the class (a label or an id string); score is the confidence.

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

Fields

NameTypeDefault
class_idstrrequired
scorefloatrequired

Example

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

ObjectHypothesis(class_id='bottle', score=0.91)
to_dict() as JSON
{
  "_type": "vision/ObjectHypothesis",
  "class_id": "bottle",
  "score": 0.91
}

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.

Used by

Types whose fields refer to it.

ObjectHypothesisWithPose

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