main
Diagnostic master entry point and main class.
Classes:
-
DiagMaster–Diagnostic master providing a web UI and ROS 2 diagnostics.
Functions:
-
initialize_master–Create and configure the diagnostic master from args.
-
main–Entry point for the diagnostic master.
-
parse_args–Parse command-line arguments.
-
read_configs_raw–Read and merge multiple YAML config files.
DiagMaster
DiagMaster(
topic: str,
sync_graph_factory: Callable[[], SyncGraph],
update_expiry: timedelta,
enable_ros2_diagnostics: bool,
enable_web_ui: bool,
)
Diagnostic master providing a web UI and ROS 2 diagnostics.
The master subscribes to graph updates on a given ROS 2 topic, builds a synchronization graph from the received updates, and provides diagnostics via ROS 2 and a web UI.
To guarantee stable performance in the presence of network or scheduling delays, graph
updates are accumulated over a short time window (given by update_expiry), and merged
to build a synchronization graph. Newer updates overwrite older ones for the same entities.
Any updates received earlier than update_expiry are automatically dropped.
Parameters:
-
topic(str) –ROS 2 topic to subscribe to for graph updates.
-
sync_graph_factory(Callable[[], SyncGraph]) –Factory function to create SyncGraph instances.
-
update_expiry(timedelta) –How long to keep updates before expiring them.
-
enable_ros2_diagnostics(bool) –Whether to publish ROS 2 diagnostics.
-
enable_web_ui(bool) –Whether to start the web UI server.
Methods:
-
on_diagnostic_timer–Periodic callback to run diagnostics, update the web UI and publish ROS 2 diagnostics.
-
on_graph_update–Handle an incoming graph update.
-
shutdown–Clean up resources and shut down the node.
Attributes:
-
sync_graph–Build and return the current sync graph from queued updates.
on_diagnostic_timer
Periodic callback to run diagnostics, update the web UI and publish ROS 2 diagnostics.
initialize_master
Create and configure the diagnostic master from args.