ros-industrial / ros2_canopen

CANopen driver framework for ROS2
https://ros-industrial.github.io/ros2_canopen/manual/rolling/
140 stars 60 forks source link

Add device diagnostics messages #117

Closed ipa-vsp closed 1 year ago

ipa-vsp commented 1 year ago

This pull request introduces the implementation of the diagnostic messages publisher for the diagnostic_msgs/msg/DiagnosticArray.msg message type. The publisher is responsible for publishing device information, including:

Reference issue: #104 Depends on: #115

In order to send the device a diagnostic message, an additional timer callback must be added. Therefore by default, the diagnostic publisher is disabled. In order to enable it, add the following to the bus.yml file.

diagnostics:
    enable: true
    period: 1000 # in milliseconds

[or]

diagnostics:
    enable: true

Example: ros2 launch canopen_tests cia402_diagnostics_setup.launch.py

Todo: