JointState
position[i] (rad or m), velocity[i] and effort[i] belong to joint name[i].
Full docstring
`velocity` and `effort` are `None` when not measured (ROS sends empty arrays).
Preview
The figure robot_msgs.viz.plot(example) draws for the example below.

Fields
| Name | Type | Default |
|---|---|---|
name | tuple[str, ...] | required |
position | Array | required |
velocity | Array | None | None |
effort | Array | None | None |
header | Header | Header() |
Example
One instance from the package's own test catalog; the output is its real repr().
JointState(name=('j1', 'j2', 'j3'), position=[0.1, 0.2, 0.3], velocity=[0. , 0.1, 0. ], header=Header(stamp=1761600000.25, frame_id='camera_color_optical_frame'))to_dict() as JSON
{
"_type": "sensor/JointState",
"name": ["j1", "j2", "j3"],
"position": {
"dtype": "<f8",
"shape": [3],
"data": [0.1, 0.2, 0.3]
},
"velocity": {
"dtype": "<f8",
"shape": [3],
"data": [0.0, 0.1, 0.0]
},
"effort": null,
"header": {
"_type": "std/Header",
"stamp": 1761600000.25,
"frame_id": "camera_color_optical_frame",
"meta": {}
}
}Long arrays are cut after 16 values and say so with “…”.
Functions
Constructors
Classmethods and staticmethods: ways to build one.