Class Aggregator
Defined in File aggregator.hpp
Class Documentation
-
class Aggregator
Aggregator processes /diagnostics, republishes on /diagnostics_agg.
Aggregator is a node that subscribes to /diagnostics, processes it and republishes aggregated data on /diagnostics_agg. The aggregator creates a series of analyzers according to the specifications of its private parameters. The aggregated diagnostics data is organized in a tree structure. For example:
The analyzer should always output a DiagnosticStatus with the name of the prefix. Any other data output is up to the analyzer developer.Input (status names): tilt_hokuyo_node: Frequency tilt_hokuyo_node: Connection Output: /Robot /Robot/Sensors /Robot/Sensors/Tilt Hokuyo/Frequency /Robot/Sensors/Tilt Hokuyo/Connection
Analyzer’s are loaded by specifying the private parameters of the aggregator.
Each analyzer is created according to the “type” parameter in its namespace. Any other parameters in the namespace can by used to specify the analyzer. If any analyzer is not properly specified, or returns false on initialization, the aggregator will report the error and publish it in the aggregated output.base_path: My Robot pub_rate: 1.0 other_as_errors: false analyzers: sensors: type: GenericAnalyzer path: Tilt Hokuyo find_and_remove_prefix: tilt_hokuyo_node motors: type: PR2MotorsAnalyzer joints: type: PR2JointsAnalyzer
Public Functions
-
DIAGNOSTIC_AGGREGATOR_PUBLIC Aggregator()
Constructor initializes with main prefix (ex: ‘/Robot’)
-
virtual DIAGNOSTIC_AGGREGATOR_PUBLIC ~Aggregator()
- DIAGNOSTIC_AGGREGATOR_PUBLIC void publishData ()
Processes, publishes data. Should be called at pub_rate.
- DIAGNOSTIC_AGGREGATOR_PUBLIC rclcpp::Node::SharedPtr get_node () const
-
DIAGNOSTIC_AGGREGATOR_PUBLIC Aggregator()