-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Bug report
Steps to reproduce
- Configure gateway in hybrid mode with a manifest that defines entities with hyphenated IDs (e.g.,
lidar-sim,fault-manager) - Ensure
create_synthetic_components: falsein config (though the bug occurs regardless of this setting) - Start the gateway with ROS 2 nodes whose names match manifest
ros_bindingentries - Query entity collection endpoints (
GET /areas,/components,/apps)
Reproducible with any selfpatch_demos demo (sensor_diagnostics, moveit_pick_place, turtlebot3_integration).
Expected behavior
After runtime linking matches runtime nodes to manifest entities via ros_binding, the merge pipeline should emit only the manifest-defined entities. Linked runtime entities should be suppressed/merged into their manifest counterparts.
For sensor_diagnostics demo:
- Areas: 4 (sensors, processing, diagnostics, bridge)
- Components: 8 (lidar-unit, imu-unit, gps-unit, camera-unit, compute-unit, gateway, fault-manager, diagnostic-bridge-unit)
- Apps: 8 (lidar-sim, imu-sim, gps-sim, camera-sim, anomaly-detector, medkit-gateway, medkit-fault-manager, diagnostic-bridge)
Actual behavior
Both manifest entities AND linked runtime entities appear in API responses, creating duplicates:
Areas: 6 instead of 4
sensors, processing, diagnostics, bridge, fault_manager, root
Extra: fault_manager (synthetic area from runtime), root (synthetic area)
Components: 17 instead of 8
lidar-unit, imu-unit, gps-unit, camera-unit, compute-unit, gateway, fault-manager, diagnostic-bridge-unit,
lidar_sim, camera_sim, imu_sim, gps_sim, anomaly_detector, diagnostic_bridge, ros2_medkit_gateway, _param_client_node, fault_manager
The bottom 9 are runtime-created synthetic entities with underscored IDs that should have been merged.
Apps: 17 instead of 8
Same pattern - every manifest app has a corresponding unmerged runtime duplicate.
Gateway logs show linking succeeds but duplicates still appear:
Runtime linking: 8 linked, 9 unlinked, 1 orphan nodes
MergePipeline: 43 entities from 4 layers, 4 enriched, 0 conflicts
The merge pipeline likely compares entity IDs directly (underscored != hyphenated) instead of using the ros_binding linkage to identify duplicates.
Environment
- ros2_medkit version: main (v0.4.0)
- ROS 2 distro: Jazzy
- OS: Ubuntu 24.04 (Docker)
Additional information
create_synthetic_components: falsedoes not prevent this - it only changes the grouping strategy, not whether runtime entities are created- The graph_provider plugin is NOT the source of duplicates - it only enriches existing entities, does not create new ones
- Discovered while adding entity count assertions to selfpatch_demos smoke tests (test: extend smoke tests for v0.4.0 features and missing API coverage selfpatch_demos#53)