From d53e542a6622bdaf20513160e1d5b60d91ea7292 Mon Sep 17 00:00:00 2001 From: rishitej04 <96513062+rishitej04@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:58:44 +0530 Subject: [PATCH] docs(joint_state_broadcaster): document /dynamic_joint_states (all interfaces) and add examples; note use_local_topics --- joint_state_broadcaster/doc/userdoc.rst | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/joint_state_broadcaster/doc/userdoc.rst b/joint_state_broadcaster/doc/userdoc.rst index 51d80b8040..a66ba98bb0 100644 --- a/joint_state_broadcaster/doc/userdoc.rst +++ b/joint_state_broadcaster/doc/userdoc.rst @@ -20,6 +20,42 @@ In the latter case, resulting interfaces is defined by a "matrix" of interfaces If some requested interfaces are missing, the controller will print a warning about that, but work for other interfaces. If none of the requested interface are not defined, the controller returns error on activation. +Published topics +---------------- + +* ``/joint_states`` (``sensor_msgs/msg/JointState``): + + Publishes *movement-related* interfaces only — ``position``, ``velocity``, + and ``effort`` — for joints that provide them. If a joint does not expose a given + movement interface, that field is omitted/left empty for that joint in the message. + +* ``/dynamic_joint_states`` (``control_msgs/msg/DynamicJointState``): + + Publishes **all available state interfaces** for each joint. This includes the + movement interfaces (position/velocity/effort) *and* any additional or custom + interfaces provided by the hardware (e.g., temperature, voltage, torque sensor + readings, calibration flags). + + The message maps ``joint_names`` to per-joint interface name lists and values. + Example payload:: + + joint_names: [joint1, joint2] + interface_values: + - interface_names: [position, velocity, effort] + values: [1.5708, 0.0, 0.20] + - interface_names: [position, temperature] + values: [0.7854, 42.1] + + Use this topic if you need *every* reported interface, not just movement. + +.. note:: + + If ``use_local_topics`` is set to ``true``, both topics are published in the + controller’s namespace (e.g., ``/my_state_broadcaster/joint_states`` and + ``/my_state_broadcaster/dynamic_joint_states``). If ``false`` (default), + they are published at the root (e.g., ``/joint_states``). + + Parameters ---------- This controller uses the `generate_parameter_library `_ to handle its parameters. The parameter `definition file located in the src folder `_ contains descriptions for all the parameters used by the controller.