robot_msgs

JointTrajectoryPoint

trajectory_msgs/JointTrajectoryPoint; t is ROS's time_from_start.

Import
from robot_msgs.trajectory import JointTrajectoryPoint
ROS 2no ROS equivalent

Fields

NameTypeDefault
tfloatrequired
channelsMapping[str, Any]{}
headerHeaderHeader()
positionsArray | NoneNone
velocitiesArray | NoneNone
accelerationsArray | NoneNone
effortArray | NoneNone

Example

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

JointTrajectoryPoint(t=0.4, channels={'kp': [40., 40., 40.], 'mode': 1}, header=Header(stamp=12.0, frame_id='base_link'), positions=[-0.2813, -0.668 , -1.0552], velocities=[-0.0527,  1.4056,  0.7474])
to_dict() as JSON
{
  "_type": "trajectory/JointTrajectoryPoint",
  "t": 0.4,
  "channels": {
    "kp": {
      "dtype": "<f8",
      "shape": [3],
      "data": [40.0, 40.0, 40.0]
    },
    "mode": 1
  },
  "header": {
    "_type": "std/Header",
    "stamp": 12.0,
    "frame_id": "base_link",
    "meta": {}
  },
  "positions": {
    "dtype": "<f8",
    "shape": [3],
    "data": [-0.2812874181513504, -0.6680463461089501, -1.0551505512051214]
  },
  "velocities": {
    "dtype": "<f8",
    "shape": [3],
    "data": [-0.05274730824287927, 1.4055981660180925, 0.7474079874793504]
  },
  "accelerations": null,
  "effort": null
}

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.

Properties

Read-only views computed from the fields.

time_from_start: float

ROS's name for t.

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.

Operators

Python operators and protocols the type supports.

__getitem__(name: str) -> Any

No docstring.

Uses

Types its fields refer to.

Header

Extends

The base class it specialises.

TrajectoryPoint

Sample of

The trajectory whose samples this is.

JointTrajectory

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