Add sensor_health_node to saltybot_health_monitor package. Monitors 8 sensor topics for staleness, publishing DiagnosticArray on /saltybot/diagnostics and MQTT JSON on saltybot/health. Sensors monitored (configurable thresholds): /camera/color/image_raw, /camera/depth/image_rect_raw, /camera/color/camera_info, /scan, /imu/data, /saltybot/uwb/range, /saltybot/battery, /saltybot/motor_daemon/status Each sensor: OK/WARN/ERROR based on topic age vs warn_s/error_s thresholds. Critical sensors (camera, lidar, imu, motor_daemon) escalate overall status. Files added: sensor_health_node.py — SensorWatcher + SensorHealthNode config/sensor_health_params.yaml — per-sensor thresholds launch/sensor_health.launch.py test/test_sensor_health.py — 35 tests, all passing setup.py/package.xml updated: sensor_msgs, diagnostic_msgs deps + new entry point. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
from setuptools import setup
|
|
|
|
package_name = "saltybot_health_monitor"
|
|
|
|
setup(
|
|
name=package_name,
|
|
version="0.2.0",
|
|
packages=[package_name],
|
|
data_files=[
|
|
("share/ament_index/resource_index/packages", [f"resource/{package_name}"]),
|
|
(f"share/{package_name}", ["package.xml"]),
|
|
(f"share/{package_name}/launch", [
|
|
"launch/health_monitor.launch.py",
|
|
"launch/sensor_health.launch.py",
|
|
]),
|
|
(f"share/{package_name}/config", [
|
|
"config/health_config.yaml",
|
|
"config/sensor_health_params.yaml",
|
|
]),
|
|
],
|
|
install_requires=["setuptools", "pyyaml", "paho-mqtt"],
|
|
zip_safe=True,
|
|
maintainer="sl-jetson",
|
|
maintainer_email="sl-jetson@saltylab.local",
|
|
description=(
|
|
"System health monitor: node heartbeats + sensor topic staleness "
|
|
"detection with DiagnosticArray and MQTT (Issue #566)"
|
|
),
|
|
license="Apache-2.0",
|
|
tests_require=["pytest"],
|
|
entry_points={
|
|
"console_scripts": [
|
|
"health_monitor_node = saltybot_health_monitor.health_monitor_node:main",
|
|
"sensor_health_node = saltybot_health_monitor.sensor_health_node:main",
|
|
],
|
|
},
|
|
)
|