robot_msgs

Pose2D

Metres and radians; theta is the heading about +Z, stored as given (not wrapped).

Import
from robot_msgs.geometry import Pose2D
ROS 2geometry_msgs/msg/Pose2D

Fields

NameTypeDefault
xfloat0.0
yfloat0.0
thetafloat0.0

Example

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

Pose2D(x=1.0, y=2.0, theta=0.5)
to_dict() as JSON
{
  "_type": "geometry/Pose2D",
  "x": 1.0,
  "y": 2.0,
  "theta": 0.5
}

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

Functions

Constructors

Classmethods and staticmethods: ways to build one.

from_array(array: Any) -> Pose2D

No docstring.

from_dict

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

No docstring.

Methods

Return new values; messages are never mutated.

as_array() -> np.ndarray

(3,) = x y theta.

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.

BoundingBox2D

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