ros-controls/ros2_controllers

Joint State Broadcaster print warning when unable to remap the interface properly

Open

#1,776 opened on Jun 25, 2025

 (3 comments) (0 reactions) (1 assignee)C++ (520 forks)auto 404
good first issue

Repository metrics

Stars
 (810 stars)
PR merge metrics
 (PR metrics pending)

Description

Joint State Broadcaster

In the Joint_state_broadcaster, when we use the map_interface_to_joint_state parameter, when the interface is not found, when the remapped interface is not found, then it rolls back to the default one. When it chooses the default one, it would be nice to have a warning printed to notify the user that the remapping is not happening on certain joints.

Moreover, when there is not even the default interface (position, velocity, effort), then it should also print that it is not present and NaN's will be obtained in the respective field.

https://github.com/ros-controls/ros2_controllers/blob/a88bf0af29308448424d0112cba2b0560d1a7305/joint_state_broadcaster/src/joint_state_broadcaster_parameters.yaml#L29-L41

https://github.com/ros-controls/ros2_controllers/blob/a88bf0af29308448424d0112cba2b0560d1a7305/joint_state_broadcaster/src/joint_state_broadcaster.cpp#L241-L245

Contributor guide