robot_msgs

Point

Metres. Arithmetic returns Point, as the ROS type has no separate displacement type.

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

Fields

NameTypeDefault
xfloat0.0
yfloat0.0
zfloat0.0

Example

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

Point(x=0.1, y=0.2, z=0.3)
to_dict() as JSON
{
  "_type": "geometry/Point",
  "x": 0.1,
  "y": 0.2,
  "z": 0.3
}

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

Functions

Constructors

Classmethods and staticmethods: ways to build one.

from_array(array: Any) -> Point

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

No docstring.

distance_to(other: Point) -> float

No docstring.

dot(other: Point) -> float

No docstring.

norm() -> float

Distance from the frame origin.

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.

Operators

Python operators and protocols the type supports.

__add__(other: object) -> Point

No docstring.

__iter__() -> Iterator[float]

No docstring.

__mul__(scalar: object) -> Point

No docstring.

__neg__() -> Point

No docstring.

__rmul__(scalar: object) -> Point

No docstring.

__sub__(other: object) -> Point

No docstring.

__truediv__(scalar: object) -> Point

No docstring.

Used by

Types whose fields refer to it.

Pose

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