Difficulty: 🟢 Easy
Category: Debugging Tools
Tags: diagnostics, debugging, monitoring, health
Execution Type: ros2_publisher
Frequency: high
System health monitoring is vital. If a camera driver fails or overheats, it should report distinct diagnostic errors so the supervisor system can take action (reboot, stop robot).
Publish diagnostic data to standard topics usually monitored by tools like rqt_runtime_monitor.
- Create node
diagnostics_publisher - Publish to
/diagnosticstopic - Message type:
diagnostic_msgs/DiagnosticArray - Add a status with level: OK, name: "My Node", message: "Running"
- Rate: 1 Hz
Output:
- Diagnostic messages on
/diagnostics.
- Incorrect Log Levels (0=OK, 1=WARN, 2=ERROR).
- Diagnostic publisher: Diagnostics topic created
- Status levels: OK/WARN/ERROR used
- Key-value data: Diagnostic info included
Publish diagnostic health data to the /diagnostics topic
- Problem #37
Found an issue with this problem's description, or have a better hint?
Open a PR or report it in Discussions.
Note: TestScripts and reference solutions are maintained by the SimuCode team
and are not part of this open spec. This ensures grading integrity on simucode.online.