ROS2 진단 메시지 시스템은 크게 Updater, Analyzer, Aggregator 세 가지 구성 요소로 이루어져 있다:
diagnostic_msgs/DiagnosticStatus 형태로 /diagnostics 토픽에 발행합니다. 보통 개별 Node로 작성되며 diagnostic_updater 패키지를 통해 구현된다.updater.add("Battery Status", this, &MyNode::checkBatteryStatus);
updater.update();
.yaml 설정 파일에 정의된다.analyzers:
hardware:
type: diagnostic_aggregator/GenericAnalyzer
path: Hardware
startswith: ['/camera', '/motor']
/diagnostics 토픽을 구독하여 Analyzer의 설정에 따라 이를 정리하고, 구조화된 /diagnostics_agg 토픽으로 다시 발행힌다. 이 토픽은 rqt_robot_monitor 등의 GUI 툴을 통해 시각적으로 확인할 수 있다.