Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,6 +25,7 @@ set(dependencies
nav_msgs
geographic_msgs
action_msgs
ros2_medkit_msgs
)

rosidl_generate_interfaces(${PROJECT_NAME}
Expand All @@ -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"
Expand All @@ -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"

Expand Down
26 changes: 26 additions & 0 deletions msg/HealthSummary.msg
Original file line number Diff line number Diff line change
@@ -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
Comment thread
davidt315 marked this conversation as resolved.
12 changes: 12 additions & 0 deletions msg/SubsystemHealth.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Health rollup for a single subsystem, derived from its active faults.
Comment thread
davidt315 marked this conversation as resolved.
# 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
3 changes: 2 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>polymath_msgs</name>
<version>0.18.0</version>
<version>0.19.0</version>
<description>Interface definitions for customer applications to communicate with Polymath Autonomy Software</description>
<maintainer email="dhruv@polymathrobotics.com">Dhruv Tyagi</maintainer>
<license>Apache-2.0</license>
Expand All @@ -16,6 +16,7 @@
<depend>geometry_msgs</depend>
<depend>sensor_msgs</depend>
<depend>action_msgs</depend>
<depend>ros2_medkit_msgs</depend>

<build_depend>rosidl_default_generators</build_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
Expand Down
Loading