robot_msgs

Vector3

Metres, m/s, newtons... whatever the owning field says. Arithmetic returns Vector3.

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

Fields

NameTypeDefault
xfloat0.0
yfloat0.0
zfloat0.0

Example

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

Vector3(x=1.0, y=-2.0, z=0.5)
to_dict() as JSON
{
  "_type": "geometry/Vector3",
  "x": 1.0,
  "y": -2.0,
  "z": 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) -> Vector3

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.

cross(other: Vector3) -> Vector3

No docstring.

dot(other: Vector3) -> float

No docstring.

norm() -> float

No docstring.

normalized() -> Vector3

No docstring.

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) -> Vector3

No docstring.

__iter__() -> Iterator[float]

No docstring.

__mul__(scalar: object) -> Vector3

No docstring.

__neg__() -> Vector3

No docstring.

__rmul__(scalar: object) -> Vector3

No docstring.

__sub__(other: object) -> Vector3

No docstring.

__truediv__(scalar: object) -> Vector3

No docstring.

Used by

Types whose fields refer to it.

Accel Inertia Transform Twist Wrench Imu BoundingBox3D

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