JointTrajectoryPoint
trajectory_msgs/JointTrajectoryPoint; t is ROS's time_from_start.
Fields
| Name | Type | Default |
|---|---|---|
t | float | required |
channels | Mapping[str, Any] | {} |
header | Header | Header() |
positions | Array | None | None |
velocities | Array | None | None |
accelerations | Array | None | None |
effort | Array | None | None |
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.
Properties
Read-only views computed from the fields.
Methods
Return new values; messages are never mutated.
to_dict
from Msgto_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.