ros2_control broadcaster that publishes selected hardware interfaces for diagnostics
https://releases.ubuntu.com/jammy/
git clone https://github.com/KNR-PW/LRT_diagnostic_broadcaster.gitcolcon build --packages-up-to diagnostics --cmake-args -DCMAKE_BUILD_TYPE=Release
Important
You need to put your interfaces and joints in /include/diagnostic_broadcaster/diagnostic_broadcaster.hpp in their respective
string arrays joint_names_ and interface_names
Warning
For new interfaces you need to update diagnostic_msgs/diagnotics.msg by adding new variable and diagnostic_broadcaster/src/diagnostic_broadcaster.cpp where you add new line in init_joint_data() function (read the comments for more information).
Note
For joint_names_ = {"joint1", "joint2"} interface_names = {temperature} broadcasted will be interfaces "joint1/temperature" and "joint2/temperature"
This broadcaster uses generate_parameters_library to handle parameters. You can specify which joints and interfaces you want to be broadcasted.
diagnostic_broadcaster:
joint_names:
- "joint_name_1"
- "joint_name_2"
- "joint_name_3"
interface_names:
- "temperature"
- "motor_effort"
- "fault"
interface_params:
temperature:
update_threshold: 0.1
motor_effort:
update_threshold: 0.1- joint_names - Names of joints [string]
- interface_names - Names of diagnostic interfaces [string]
- interface_params - Parameters mapped to interfaces
- update_threshold - When interface (currently temperature and motor_effort) values change by this amount, this will be noticed [double]
Note
By specifying which joints should be broadcasted state_interfaces_config.type changes from controller_interface::interface_configuration_type::ALL to controller_interface::interface_configuration_type::INDIVIDUAL;.
update_treshold parameter is currently used for setting up data update threshold for temperature and motor_effort interfaces