From 59ba8feda64df0a8bd73dd3bdb426470845464a0 Mon Sep 17 00:00:00 2001 From: David Tarazi Date: Wed, 22 Jul 2026 12:59:25 -0700 Subject: [PATCH 1/4] added health messages based on ros2_medkit --- CMakeLists.txt | 4 ++++ msg/HealthSummary.msg | 38 ++++++++++++++++++++++++++++++++++++++ msg/SubsystemHealth.msg | 22 ++++++++++++++++++++++ package.xml | 3 ++- 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 msg/HealthSummary.msg create mode 100644 msg/SubsystemHealth.msg 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..b7f464d --- /dev/null +++ b/msg/HealthSummary.msg @@ -0,0 +1,38 @@ +# 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 +# state is "UNKNOWN" and the subsystems/fault arrays are empty. +bool fault_source_available + +# Overall derived state: OK < WARN < DEGRADED < CRITICAL (or "UNKNOWN"). +string state + +# Templated, human-readable one-line summary of the overall state. +string summary + +# Severity of the worst active fault (use SEVERITY_* constants below, which mirror +# ros2_medkit_msgs/msg/Fault). Defaults to SEVERITY_INFO when there are no active faults +# or the fault source is unavailable; use fault_source_available / state 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 + +# Individual active faults (verbatim from the fault manager), worst-first then by fault_code. +ros2_medkit_msgs/Fault[] faults + +# Severity level constants (mirror ros2_medkit_msgs/msg/Fault SEVERITY_*). +uint8 SEVERITY_INFO = 0 +uint8 SEVERITY_WARN = 1 +uint8 SEVERITY_ERROR = 2 +uint8 SEVERITY_CRITICAL = 3 diff --git a/msg/SubsystemHealth.msg b/msg/SubsystemHealth.msg new file mode 100644 index 0000000..b63d2b5 --- /dev/null +++ b/msg/SubsystemHealth.msg @@ -0,0 +1,22 @@ +# 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 + +# Derived subsystem state: OK < WARN < DEGRADED < CRITICAL (worst active fault). +string state + +# Severity of the worst active fault (use SEVERITY_* constants below, which mirror +# ros2_medkit_msgs/msg/Fault). +uint8 severity + +# fault_codes of the active faults attributed to this subsystem. +string[] active_alert_ids + +# Severity level constants (mirror ros2_medkit_msgs/msg/Fault SEVERITY_*). +uint8 SEVERITY_INFO = 0 +uint8 SEVERITY_WARN = 1 +uint8 SEVERITY_ERROR = 2 +uint8 SEVERITY_CRITICAL = 3 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 From 0ffa932bd666acfb956667164dd601c1b8f28b8b Mon Sep 17 00:00:00 2001 From: David Tarazi Date: Wed, 22 Jul 2026 16:15:46 -0700 Subject: [PATCH 2/4] add lyrical --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b82d4f..9068006 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - ros: [humble, jazzy, kilted, rolling] + ros: [humble, jazzy, kilted, lyrical, rolling] name: ROS 2 ${{ matrix.ros }} container: image: polymathrobotics/ros:${{ matrix.ros }}-builder-ubuntu From 8413cfc5e15c07d861cc17470c48310fce8a8e95 Mon Sep 17 00:00:00 2001 From: David Tarazi Date: Thu, 23 Jul 2026 11:46:59 -0700 Subject: [PATCH 3/4] move alerts to subsystem instead of cross-reference, remove the mirrored declared consts --- msg/HealthSummary.msg | 15 +++------------ msg/SubsystemHealth.msg | 13 +++---------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/msg/HealthSummary.msg b/msg/HealthSummary.msg index b7f464d..0d58d16 100644 --- a/msg/HealthSummary.msg +++ b/msg/HealthSummary.msg @@ -14,9 +14,9 @@ string state # Templated, human-readable one-line summary of the overall state. string summary -# Severity of the worst active fault (use SEVERITY_* constants below, which mirror -# ros2_medkit_msgs/msg/Fault). Defaults to SEVERITY_INFO when there are no active faults -# or the fault source is unavailable; use fault_source_available / state to disambiguate. +# 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 / state to disambiguate. uint8 highest_severity # fault_code of the worst active fault; empty when there are no active faults. @@ -27,12 +27,3 @@ uint32 active_alert_count # Per-subsystem rollups, worst-first then alphabetical. SubsystemHealth[] subsystems - -# Individual active faults (verbatim from the fault manager), worst-first then by fault_code. -ros2_medkit_msgs/Fault[] faults - -# Severity level constants (mirror ros2_medkit_msgs/msg/Fault SEVERITY_*). -uint8 SEVERITY_INFO = 0 -uint8 SEVERITY_WARN = 1 -uint8 SEVERITY_ERROR = 2 -uint8 SEVERITY_CRITICAL = 3 diff --git a/msg/SubsystemHealth.msg b/msg/SubsystemHealth.msg index b63d2b5..0122b32 100644 --- a/msg/SubsystemHealth.msg +++ b/msg/SubsystemHealth.msg @@ -8,15 +8,8 @@ string name # Derived subsystem state: OK < WARN < DEGRADED < CRITICAL (worst active fault). string state -# Severity of the worst active fault (use SEVERITY_* constants below, which mirror -# ros2_medkit_msgs/msg/Fault). +# Severity of the worst active fault (ros2_medkit_msgs/msg/Fault SEVERITY_* values). uint8 severity -# fault_codes of the active faults attributed to this subsystem. -string[] active_alert_ids - -# Severity level constants (mirror ros2_medkit_msgs/msg/Fault SEVERITY_*). -uint8 SEVERITY_INFO = 0 -uint8 SEVERITY_WARN = 1 -uint8 SEVERITY_ERROR = 2 -uint8 SEVERITY_CRITICAL = 3 +# Individual active faults (verbatim from the fault manager), worst-first then by fault_code. +ros2_medkit_msgs/Fault[] faults From 5a457299f7ae94324f912eeab3267d5708ccfdd4 Mon Sep 17 00:00:00 2001 From: David Tarazi Date: Thu, 23 Jul 2026 12:26:24 -0700 Subject: [PATCH 4/4] remove state --- msg/HealthSummary.msg | 9 +++------ msg/SubsystemHealth.msg | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/msg/HealthSummary.msg b/msg/HealthSummary.msg index 0d58d16..120757d 100644 --- a/msg/HealthSummary.msg +++ b/msg/HealthSummary.msg @@ -5,18 +5,15 @@ builtin_interfaces/Time timestamp # False when the fault source (fault manager) could not be reached; in that case -# state is "UNKNOWN" and the subsystems/fault arrays are empty. +# the subsystems/fault arrays are empty. bool fault_source_available -# Overall derived state: OK < WARN < DEGRADED < CRITICAL (or "UNKNOWN"). -string state - -# Templated, human-readable one-line summary of the overall state. +# 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 / state to disambiguate. +# unavailable; use fault_source_available to disambiguate. uint8 highest_severity # fault_code of the worst active fault; empty when there are no active faults. diff --git a/msg/SubsystemHealth.msg b/msg/SubsystemHealth.msg index 0122b32..24ae8f7 100644 --- a/msg/SubsystemHealth.msg +++ b/msg/SubsystemHealth.msg @@ -5,9 +5,6 @@ # Subsystem name (e.g. "localization", "compute", "uncategorized"). string name -# Derived subsystem state: OK < WARN < DEGRADED < CRITICAL (worst active fault). -string state - # Severity of the worst active fault (ros2_medkit_msgs/msg/Fault SEVERITY_* values). uint8 severity