joint_state_broadcaster
The broadcaster reads all state interfaces and reports them on /joint_states and /dynamic_joint_states.
Commands
Broadcasters are not real controllers, and therefore take no commands.
Hardware interface type
By default, all available joint state interfaces are used, unless configured otherwise.
In the latter case, resulting interfaces is defined by a “matrix” of interfaces defined by the cross-product of the joints and interfaces parameters.
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.
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.
List of parameters
An example parameter file
Order of the joints in the message
The order of the joints in the message can determined by 3 different parameter settings:
- No defined
jointsparameter anduse_urdf_to_filterset tofalse: The order of the joints in the message is the same as the order of the joints’ state interfaces registered in the resource manager. This is typically the order in which the hardware components are loaded and configured.
- No defined
- No defined
jointsparameter anduse_urdf_to_filterset totrue: The order of the joints in the message is the same as the order of the joints in the URDF file, which is inherited from the loaded URDF model and independent of the order in the ros2_control tag.
- No defined
- Defined
jointsparameter along withinterfacesparameter: The order of the joints in the message is the same as the order of the joints in the
jointsparameter.If the
jointsparameter is a subset of the total available joints in the URDF (or) the total available state interfaces, then only the joints in thejointsparameter are published in the message.If any of the combinations of the defined
jointsparameter andinterfacesparameter are not in the available state interfaces, the controller will fail to activate.
- Defined
Note
If the extra_joints parameter is set, the joints in the extra_joints parameter are appended to the end of the joint names in the message.