Skip to content

Commit c41c211

Browse files
committed
fix(config): update sensor manifest and medkit params for diagnostics demo
1 parent 79680b7 commit c41c211

4 files changed

Lines changed: 160 additions & 22 deletions

File tree

demos/sensor_diagnostics/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
# Sensor Diagnostics Demo
2-
# Lightweight ROS 2 image without Gazebo - fast build and startup
3-
# Image size: ~500MB vs ~4GB for TurtleBot3 demo
4-
# Startup time: ~5s vs ~60s
5-
62
FROM ros:jazzy-ros-base
73

84
ENV DEBIAN_FRONTEND=noninteractive

demos/sensor_diagnostics/config/medkit_params.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ diagnostics:
77
host: "0.0.0.0"
88
port: 8080
99

10-
refresh_interval_ms: 1000
10+
refresh_interval_ms: 10000 # 10 seconds (default), reduces log spam
1111

1212
cors:
1313
allowed_origins: ["*"]
@@ -18,7 +18,11 @@ diagnostics:
1818

1919
max_parallel_topic_samples: 10
2020

21-
# Manifest-based discovery
22-
manifest:
23-
enabled: true
24-
path: "" # Will be set via launch argument
21+
# Discovery configuration
22+
discovery_mode: "hybrid" # runtime_only, manifest_only, or hybrid
23+
manifest_path: "" # Will be set via launch argument
24+
manifest_strict_validation: true
25+
26+
discovery:
27+
runtime:
28+
create_synthetic_components: false # Manifest defines components

demos/sensor_diagnostics/config/sensor_manifest.yaml

Lines changed: 150 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ metadata:
77
description: "Simulated sensors for diagnostics demo (no Gazebo required)"
88
version: "0.1.0"
99

10+
config:
11+
unmanifested_nodes: warn
12+
inherit_runtime_resources: true
13+
14+
# =============================================================================
15+
# AREAS - Functional groupings
16+
# =============================================================================
1017
areas:
1118
- id: sensors
1219
name: "Sensors"
@@ -23,45 +30,176 @@ areas:
2330
description: "ros2_medkit gateway and monitoring"
2431
namespace: /diagnostics
2532

33+
- id: bridge
34+
name: "Bridge"
35+
description: "Legacy diagnostics bridge"
36+
namespace: /bridge
37+
38+
# =============================================================================
39+
# COMPONENTS - Hardware/logical units
40+
# =============================================================================
2641
components:
2742
- id: lidar-unit
2843
name: "LiDAR Unit"
44+
type: "sensor"
2945
description: "Simulated 2D LiDAR sensor with configurable fault injection"
3046
area: sensors
31-
apps:
32-
- lidar_sim
3347

3448
- id: imu-unit
3549
name: "IMU Unit"
50+
type: "sensor"
3651
description: "Simulated 9-DOF IMU sensor"
3752
area: sensors
38-
apps:
39-
- imu_sim
4053

4154
- id: gps-unit
4255
name: "GPS Unit"
56+
type: "sensor"
4357
description: "Simulated GPS receiver"
4458
area: sensors
45-
apps:
46-
- gps_sim
4759

4860
- id: camera-unit
4961
name: "Camera Unit"
62+
type: "sensor"
5063
description: "Simulated RGB camera"
5164
area: sensors
52-
apps:
53-
- camera_sim
5465

5566
- id: compute-unit
5667
name: "Compute Unit"
68+
type: "controller"
5769
description: "Data processing and anomaly detection"
5870
area: processing
59-
apps:
60-
- anomaly_detector
6171

6272
- id: gateway
6373
name: "SOVD Gateway"
74+
type: "controller"
6475
description: "ros2_medkit REST API gateway"
6576
area: diagnostics
66-
apps:
67-
- ros2_medkit_gateway
77+
78+
- id: fault-manager
79+
name: "Fault Manager"
80+
type: "controller"
81+
description: "ros2_medkit fault management service"
82+
area: diagnostics
83+
84+
- id: diagnostic-bridge-unit
85+
name: "Diagnostic Bridge"
86+
type: "controller"
87+
description: "Bridges legacy /diagnostics topic to fault manager"
88+
area: bridge
89+
90+
# =============================================================================
91+
# APPS - ROS 2 nodes with runtime binding
92+
# =============================================================================
93+
apps:
94+
# === Sensor Apps ===
95+
- id: lidar-sim
96+
name: "LiDAR Simulator"
97+
category: "sensor"
98+
is_located_on: lidar-unit
99+
description: "Publishes simulated LaserScan data with fault injection support"
100+
tags:
101+
- fault-reporter
102+
ros_binding:
103+
node_name: lidar_sim
104+
namespace: /sensors
105+
106+
- id: imu-sim
107+
name: "IMU Simulator"
108+
category: "sensor"
109+
is_located_on: imu-unit
110+
description: "Publishes simulated IMU data"
111+
ros_binding:
112+
node_name: imu_sim
113+
namespace: /sensors
114+
115+
- id: gps-sim
116+
name: "GPS Simulator"
117+
category: "sensor"
118+
is_located_on: gps-unit
119+
description: "Publishes simulated NavSatFix data"
120+
ros_binding:
121+
node_name: gps_sim
122+
namespace: /sensors
123+
124+
- id: camera-sim
125+
name: "Camera Simulator"
126+
category: "sensor"
127+
is_located_on: camera-unit
128+
description: "Publishes simulated camera images"
129+
tags:
130+
- fault-reporter
131+
ros_binding:
132+
node_name: camera_sim
133+
namespace: /sensors
134+
135+
# === Processing Apps ===
136+
- id: anomaly-detector
137+
name: "Anomaly Detector"
138+
category: "processing"
139+
is_located_on: compute-unit
140+
description: "Detects anomalies in sensor data and reports faults"
141+
depends_on:
142+
- lidar-sim
143+
- imu-sim
144+
- gps-sim
145+
ros_binding:
146+
node_name: anomaly_detector
147+
namespace: /processing
148+
149+
# === Diagnostics Apps ===
150+
- id: medkit-gateway
151+
name: "ros2_medkit Gateway"
152+
category: "gateway"
153+
is_located_on: gateway
154+
description: "REST API gateway for SOVD protocol"
155+
ros_binding:
156+
node_name: ros2_medkit_gateway
157+
namespace: /diagnostics
158+
159+
- id: medkit-fault-manager
160+
name: "Fault Manager"
161+
category: "diagnostics"
162+
is_located_on: fault-manager
163+
description: "Manages and stores fault information"
164+
ros_binding:
165+
node_name: fault_manager
166+
namespace: /
167+
168+
- id: diagnostic-bridge
169+
name: "Diagnostic Bridge"
170+
category: "diagnostics"
171+
is_located_on: diagnostic-bridge-unit
172+
description: "Bridges /diagnostics topic (DiagnosticArray) to fault_manager"
173+
ros_binding:
174+
node_name: diagnostic_bridge
175+
namespace: /bridge
176+
177+
# =============================================================================
178+
# FUNCTIONS - High-level capabilities
179+
# =============================================================================
180+
functions:
181+
- id: sensor-monitoring
182+
name: "Sensor Monitoring"
183+
category: "monitoring"
184+
description: "Monitor all simulated sensors"
185+
hosted_by:
186+
- lidar-sim
187+
- imu-sim
188+
- gps-sim
189+
- camera-sim
190+
191+
- id: anomaly-detection
192+
name: "Anomaly Detection"
193+
category: "diagnostics"
194+
description: "Detect and report sensor anomalies"
195+
hosted_by:
196+
- anomaly-detector
197+
198+
- id: fault-management
199+
name: "Fault Management"
200+
category: "diagnostics"
201+
description: "Collect and expose fault information via SOVD API"
202+
hosted_by:
203+
- medkit-gateway
204+
- medkit-fault-manager
205+
- diagnostic-bridge

demos/sensor_diagnostics/launch/demo.launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def generate_launch_description():
119119
parameters=[
120120
medkit_params_file,
121121
{"use_sim_time": use_sim_time},
122-
{"manifest.path": manifest_file},
122+
{"manifest_path": manifest_file},
123123
],
124124
),
125125
# ===== Fault Manager (at root namespace) =====

0 commit comments

Comments
 (0)