robot_msgs

Wrench

Force (N) and torque (N·m) applied to a body, both in the frame the header names.

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

Fields

NameTypeDefault
forceVector3Vector3()
torqueVector3Vector3()

Example

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

Wrench(force=Vector3(x=0.0, y=0.0, z=-9.81), torque=Vector3(x=0.1, y=0.0, z=0.0))
to_dict() as JSON
{
  "_type": "geometry/Wrench",
  "force": {
    "_type": "geometry/Vector3",
    "x": 0.0,
    "y": 0.0,
    "z": -9.81
  },
  "torque": {
    "_type": "geometry/Vector3",
    "x": 0.1,
    "y": 0.0,
    "z": 0.0
  }
}

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

Functions

Constructors

Classmethods and staticmethods: ways to build one.

from_array(array: Any) -> Wrench

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

(6,) = force xyz then torque xyz.

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

No docstring.

__mul__(scalar: object) -> Wrench

No docstring.

__rmul__(scalar: object) -> Wrench

No docstring.

__sub__(other: object) -> Wrench

No docstring.

Uses

Types its fields refer to.

Vector3

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