robot_msgs

TrajectoryPoint

One sample: its time and the value of every per-sample field at that time.

Full docstring
`header` is the trajectory's: `t` counts from its stamp, and its frame and meta say what the
values are relative to. WHY a point carries it (ROS's points don't): a point taken out with
`traj[i]` or `traj.at(t)` would otherwise lose its frame, origin and units.
Import
from robot_msgs.trajectory import TrajectoryPoint
ROS 2no ROS equivalent

Fields

NameTypeDefault
tfloatrequired
channelsMapping[str, Any]{}
headerHeaderHeader()

Example

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

TrajectoryPoint(t=0.0, channels={'x': 1.0})
to_dict() as JSON
{
  "_type": "trajectory/TrajectoryPoint",
  "t": 0.0,
  "channels": {
    "x": 1.0
  },
  "header": {
    "_type": "std/Header",
    "stamp": 0.0,
    "frame_id": "",
    "meta": {}
  }
}

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

Extended by

Types that specialise it.

JointTrajectoryPoint PoseTrajectoryPoint

Sample of

The trajectory whose samples this is.

Trajectory

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