diff --git a/CMakeLists.txt b/CMakeLists.txt index 578105e..3fad734 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ find_package(builtin_interfaces REQUIRED) find_package(action_msgs REQUIRED) find_package(geographic_msgs REQUIRED) find_package(nav_msgs REQUIRED) +find_package(ros2_medkit_msgs REQUIRED) set(dependencies std_msgs @@ -24,6 +25,7 @@ set(dependencies nav_msgs geographic_msgs action_msgs + ros2_medkit_msgs ) rosidl_generate_interfaces(${PROJECT_NAME} @@ -32,6 +34,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} "msg/CortexFeedback.msg" "msg/CortexStatus.msg" "msg/FlowCommand.msg" + "msg/HealthSummary.msg" "msg/HttpRequest.msg" "msg/HttpResponse.msg" "msg/KeyValue.msg" @@ -41,6 +44,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} "msg/Option.msg" "msg/ReferenceTarget.msg" "msg/RouteNavGoal.msg" + "msg/SubsystemHealth.msg" "msg/VehicleCommand.msg" "msg/VehicleFeedback.msg" diff --git a/msg/HealthSummary.msg b/msg/HealthSummary.msg new file mode 100644 index 0000000..120757d --- /dev/null +++ b/msg/HealthSummary.msg @@ -0,0 +1,26 @@ +# Aggregated robot health summary, published periodically by the health +# aggregator (polymath_health) from the ros2_medkit fault manager's active +# faults. Downstream consumers treat this as the single source of truth + +builtin_interfaces/Time timestamp + +# False when the fault source (fault manager) could not be reached; in that case +# the subsystems/fault arrays are empty. +bool fault_source_available + +# Templated, human-readable one-line summary of the overall health. +string summary + +# Severity of the worst active fault (ros2_medkit_msgs/msg/Fault SEVERITY_* values). +# Defaults to SEVERITY_INFO when there are no active faults or the fault source is +# unavailable; use fault_source_available to disambiguate. +uint8 highest_severity + +# fault_code of the worst active fault; empty when there are no active faults. +string highest_severity_alert + +# Number of active faults represented in this summary. +uint32 active_alert_count + +# Per-subsystem rollups, worst-first then alphabetical. +SubsystemHealth[] subsystems diff --git a/msg/SubsystemHealth.msg b/msg/SubsystemHealth.msg new file mode 100644 index 0000000..24ae8f7 --- /dev/null +++ b/msg/SubsystemHealth.msg @@ -0,0 +1,12 @@ +# Health rollup for a single subsystem, derived from its active faults. +# The subsystem name is the lower-cased prefix of a fault_code (text before the +# first underscore); faults without a prefix are grouped under "uncategorized". + +# Subsystem name (e.g. "localization", "compute", "uncategorized"). +string name + +# Severity of the worst active fault (ros2_medkit_msgs/msg/Fault SEVERITY_* values). +uint8 severity + +# Individual active faults (verbatim from the fault manager), worst-first then by fault_code. +ros2_medkit_msgs/Fault[] faults diff --git a/package.xml b/package.xml index 437badb..3a76d82 100644 --- a/package.xml +++ b/package.xml @@ -2,7 +2,7 @@ polymath_msgs - 0.18.0 + 0.19.0 Interface definitions for customer applications to communicate with Polymath Autonomy Software Dhruv Tyagi Apache-2.0 @@ -16,6 +16,7 @@ geometry_msgs sensor_msgs action_msgs + ros2_medkit_msgs rosidl_default_generators rosidl_default_runtime