-
Notifications
You must be signed in to change notification settings - Fork 23
Rethink runtime discovery entity mapping to align with SOVD entity model #325
Description
Summary
Runtime discovery maps ROS 2 namespaces to the wrong SOVD entity types. Namespaces become Areas and Components, but per the SOVD spec (ISO 17978-3, Clause 5) they should map to Functions.
Problem
Current mapping:
- ROS 2 namespace -> Area (wrong - Area = logical grouping like domains/zones, deployment-specific)
- ROS 2 namespace -> Component (wrong - Component = HW or SW platform like ECU, HPC, OS)
- ROS 2 node -> App (correct)
- Topic prefix -> Area/Component (wrong - same issue)
Correct SOVD semantics:
- Area - deployment topology (domains, zones, SDV architecture). Not inferrable from ROS 2 graph. For small robots with 1-3 ECUs, areas are just noise. Areas make sense at fleet/building level (e.g., floor_1, zone_a) not per-device.
- Component - execution platform. Should be extracted from the actual host system (OS, hostname, architecture), not from namespace groupings. A single-device deployment has one Component (the OS) with all Apps running on it. Multi-ECU setups define Components in manifest.
- Function - "Functional view spanning multiple components." THIS is where namespace grouping fits:
/diagnostics/gateway+/diagnostics/fault_manager-> Function "diagnostics". - App - ROS 2 node from graph introspection (not topic-based discovery).
Proposed changes
-
Deprecate synthetic areas -
create_synthetic_areasdefaults to false, eventually removed. Areas only from manifest. Empty areas collection is valid for single-device deployments. -
Change Component discovery - instead of per-namespace synthetic components, extract actual host info (OS, hostname). Single default Component for runtime_only mode. Manifest defines Component hierarchy for multi-ECU setups. Subcomponents model SW-on-HW (e.g., Component: Nvidia Orin -> Subcomponent: Ubuntu 24.04 -> Apps).
-
Map namespaces to Functions - repurpose existing namespace grouping logic to create Functions.
/sensors/*nodes -> Function "sensors". Works in both runtime_only and hybrid modes. -
Remove topic-based entity creation -
topic_only_policyshould not create Areas or Components from topic prefixes. Apps come from ROS 2 node graph only. -
Simplify config - most gap-fill flags (
allow_heuristic_areas,allow_heuristic_components,create_synthetic_areas,topic_only_policy) become unnecessary. Currently 5+ flags needed to suppress noise in hybrid mode with a complete manifest.
Context
Found during selfpatch_demos smoke test work (issues #307, #311, #312) where synthetic entities leaked into API responses. The root cause is incorrect entity mapping, not suppression logic.