Skip to content

feat(vda5050): add VDA 5050 msgs + ros2_medkit Service Interface plugin#331

Open
mfaferek93 wants to merge 8 commits intomainfrom
feat/vda5050-service-interface
Open

feat(vda5050): add VDA 5050 msgs + ros2_medkit Service Interface plugin#331
mfaferek93 wants to merge 8 commits intomainfrom
feat/vda5050-service-interface

Conversation

@mfaferek93
Copy link
Copy Markdown
Collaborator

@mfaferek93 mfaferek93 commented Mar 31, 2026

Summary

Add ros2_medkit_sovd_service_interface gateway plugin exposing medkit data via ROS 2 services, plus new service/message types in ros2_medkit_msgs.

Motivation

Exposes medkit entity tree, faults, and capabilities via ROS 2 services - reusable by VDA 5050 agent, BT.CPP, PlotJuggler, RTMaps, and any ROS 2 consumer without HTTP dependency.

Architecture

ROS 2 consumer (VDA 5050 agent, BT.CPP, etc.)
          |
     ROS 2 services (/medkit/*)
          |
SOVD Service Interface Plugin (this PR)
          |
     medkit gateway

New package: ros2_medkit_sovd_service_interface

Gateway plugin (PLUGIN_API_VERSION = 4, MODULE library, dlopen) with 4 ROS 2 service servers:

Service Description
ListEntities List all discovered entities (apps, components, areas)
ListFaultsForEntity Get faults with timestamps for an entity
GetEntityData Stub - requires PluginContext extension (#351)
GetCapabilities Get SOVD capabilities for an entity
  • 10 unit tests with FakePluginContext
  • README with usage docs

Changes to ros2_medkit_msgs

  • New: EntityInfo.msg, ListEntities.srv, GetEntityData.srv, GetCapabilities.srv

Test plan

  • ros2_medkit_msgs builds with new srvs
  • ros2_medkit_sovd_service_interface 10/10 unit tests pass
  • Test domain IDs: 1-9 (no collision with peer_aggregation at 230)
  • Review findings from @bburda addressed
  • CI matrix (Humble + Jazzy + Rolling)

Closes #330

Copilot AI review requested due to automatic review settings March 31, 2026 16:07
@mfaferek93 mfaferek93 self-assigned this Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces VDA 5050 v2.0.0 ROS 2 interface definitions and adds a gateway plugin that exposes the medkit entity tree, faults, and capabilities over ROS 2 services (intended for consumption by a VDA 5050 agent and other ROS 2 tools).

Changes:

  • Added new ros2_medkit_vda5050_msgs package providing VDA 5050 v2.0.0 message definitions.
  • Extended ros2_medkit_msgs with new service interfaces (ListEntities, GetEntityData, GetCapabilities) and EntityInfo for service responses.
  • Added ros2_medkit_sovd_service_interface plugin implementing ROS 2 service servers plus unit tests and test-domain allocation.

Reviewed changes

Copilot reviewed 58 out of 58 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/ros2_medkit_vda5050_msgs/package.xml Declares the new VDA 5050 message package metadata.
src/ros2_medkit_vda5050_msgs/CMakeLists.txt Builds/generates ROS 2 interfaces for the VDA 5050 message set.
src/ros2_medkit_vda5050_msgs/msg/WheelPosition.msg Adds WheelPosition factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/WheelDefinition.msg Adds WheelDefinition factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/Visualization.msg Adds Visualization top-level MQTT topic message.
src/ros2_medkit_vda5050_msgs/msg/Velocity.msg Adds Velocity message.
src/ros2_medkit_vda5050_msgs/msg/TypeSpecification.msg Adds TypeSpecification factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/Trajectory.msg Adds Trajectory message.
src/ros2_medkit_vda5050_msgs/msg/Timing.msg Adds Timing factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/State.msg Adds State top-level MQTT topic message.
src/ros2_medkit_vda5050_msgs/msg/SafetyState.msg Adds SafetyState message.
src/ros2_medkit_vda5050_msgs/msg/ProtocolLimits.msg Adds ProtocolLimits factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/ProtocolFeatures.msg Adds ProtocolFeatures factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/PhysicalParameters.msg Adds PhysicalParameters factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/Order.msg Adds Order top-level MQTT topic message.
src/ros2_medkit_vda5050_msgs/msg/OptionalParameter.msg Adds OptionalParameter factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/NodeState.msg Adds NodeState message.
src/ros2_medkit_vda5050_msgs/msg/NodePosition.msg Adds NodePosition message.
src/ros2_medkit_vda5050_msgs/msg/Node.msg Adds Node message.
src/ros2_medkit_vda5050_msgs/msg/MaxStringLens.msg Adds MaxStringLens factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/MaxArrayLens.msg Adds MaxArrayLens factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/LoadSpecification.msg Adds LoadSpecification factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/LoadSet.msg Adds LoadSet factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/LoadDimensions.msg Adds LoadDimensions message.
src/ros2_medkit_vda5050_msgs/msg/Load.msg Adds Load message.
src/ros2_medkit_vda5050_msgs/msg/InstantActions.msg Adds InstantActions top-level MQTT topic message.
src/ros2_medkit_vda5050_msgs/msg/InfoEntry.msg Adds InfoEntry message.
src/ros2_medkit_vda5050_msgs/msg/HeaderId.msg Adds HeaderId shared header message.
src/ros2_medkit_vda5050_msgs/msg/Factsheet.msg Adds Factsheet top-level MQTT topic message.
src/ros2_medkit_vda5050_msgs/msg/ErrorReference.msg Adds ErrorReference/InfoReference message.
src/ros2_medkit_vda5050_msgs/msg/ErrorEntry.msg Adds ErrorEntry message.
src/ros2_medkit_vda5050_msgs/msg/Envelope3d.msg Adds Envelope3d factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/Envelope2d.msg Adds Envelope2d factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/EdgeState.msg Adds EdgeState message.
src/ros2_medkit_vda5050_msgs/msg/Edge.msg Adds Edge message.
src/ros2_medkit_vda5050_msgs/msg/ControlPoint.msg Adds ControlPoint message.
src/ros2_medkit_vda5050_msgs/msg/Connection.msg Adds Connection top-level MQTT topic message.
src/ros2_medkit_vda5050_msgs/msg/BoundingBoxReference.msg Adds BoundingBoxReference message.
src/ros2_medkit_vda5050_msgs/msg/BatteryState.msg Adds BatteryState message.
src/ros2_medkit_vda5050_msgs/msg/AgvPosition.msg Adds AgvPosition message.
src/ros2_medkit_vda5050_msgs/msg/AgvGeometry.msg Adds AgvGeometry factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/AgvActionParameter.msg Adds AgvActionParameter factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/AgvAction.msg Adds AgvAction factsheet sub-type message.
src/ros2_medkit_vda5050_msgs/msg/ActionState.msg Adds ActionState message.
src/ros2_medkit_vda5050_msgs/msg/ActionParameter.msg Adds ActionParameter message.
src/ros2_medkit_vda5050_msgs/msg/Action.msg Adds Action message.
src/ros2_medkit_plugins/ros2_medkit_sovd_service_interface/package.xml Declares the new service-interface plugin package metadata.
src/ros2_medkit_plugins/ros2_medkit_sovd_service_interface/CMakeLists.txt Builds the dlopen’d plugin module and its gtest target; allocates test domain IDs.
src/ros2_medkit_plugins/ros2_medkit_sovd_service_interface/src/sovd_service_interface.hpp Declares the plugin class and service callbacks.
src/ros2_medkit_plugins/ros2_medkit_sovd_service_interface/src/sovd_service_interface.cpp Implements ROS 2 services for entity listing, fault listing, data, and capabilities.
src/ros2_medkit_plugins/ros2_medkit_sovd_service_interface/src/service_exports.cpp Exports plugin entry points for PluginManager loading.
src/ros2_medkit_plugins/ros2_medkit_sovd_service_interface/test/test_sovd_service_interface.cpp Adds unit tests using a fake PluginContext and in-process ROS 2 services.
src/ros2_medkit_msgs/msg/EntityInfo.msg Adds a message type for entity descriptors returned by services.
src/ros2_medkit_msgs/srv/ListEntities.srv Adds a service to list entities with type/parent filters.
src/ros2_medkit_msgs/srv/GetEntityData.srv Adds a service for retrieving entity data as JSON.
src/ros2_medkit_msgs/srv/GetCapabilities.srv Adds a service for querying SOVD capabilities.
src/ros2_medkit_msgs/CMakeLists.txt Registers the new msg/srv interfaces for code generation.
src/ros2_medkit_cmake/cmake/ROS2MedkitTestDomain.cmake Documents the newly reserved ROS_DOMAIN_ID range for this plugin’s tests.

@mfaferek93 mfaferek93 changed the title feat(vda5050): add VDA 5050 msgs + SOVD Service Interface plugin feat(vda5050): add VDA 5050 msgs + ros2_medkit Service Interface plugin Mar 31, 2026
…rface plugin

Add vendor-neutral VDA 5050 v2.0.0 message definitions (44 msg files)
and a gateway plugin exposing medkit entity/fault data via ROS 2 services.

New packages:
- ros2_medkit_vda5050_msgs: all VDA 5050 v2.0.0 types (Order, State,
  InstantActions, Connection, Visualization, Factsheet + sub-messages)
- ros2_medkit_sovd_service_interface: gateway plugin creating 4 ROS 2
  service servers (ListEntities, ListFaultsForEntity, GetEntityData,
  GetCapabilities) for consumption by VDA 5050 agent, BT.CPP, etc.

New services in ros2_medkit_msgs:
- ListEntities.srv, GetEntityData.srv, GetCapabilities.srv, EntityInfo.msg

Closes #330
@mfaferek93 mfaferek93 force-pushed the feat/vda5050-service-interface branch from 682e20a to 0392de9 Compare April 4, 2026 17:02
- GetEntityData: return explicit not-implemented error instead of
  silent empty JSON (B1)
- ListEntities.srv: fix parent_id comment to match code behavior -
  empty string means no filter, not top-level (B2)
- LoadSet.msg: add missing VDA 5050 v2.0.0 spec fields
  (bounding_box_reference, load_dimensions, load_positions, etc.) (M1)
- ActionState.msg: document PAUSED as forward-compat extension from
  v2.1+, not in v2.0.0 (M2)
- Add tests: entity-level GetCapabilities, type fallback, combined
  type+parent filter, GetEntityData not-found (M3)
- Extract entity_type_from_string() helper replacing inline ternary
  chain (m4)
- Use nlohmann::json value() with defaults for type-safe fault
  deserialization (m3)
- Functions: use empty FQN instead of duplicating id (m1)
- Use global rclcpp test environment instead of per-test init/shutdown
  (m5)
- Check spin_until_future_complete return code in all tests (m8)
- Add Required/Optional markers to Velocity.msg, WheelPosition.msg (m7)
@mfaferek93 mfaferek93 requested a review from bburda April 4, 2026 18:55
Copy link
Copy Markdown
Collaborator

@bburda bburda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Four findings to consider before merge. All APIs used in this PR were verified against the current codebase.

Copy link
Copy Markdown
Collaborator

@bburda bburda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second review focused on VDA 5050 v2.0.0 spec conformance. Cross-referenced against the canonical schemas at https://github.com/VDA5050/VDA5050/tree/2.0.0/json_schemas. Found several concrete interoperability bugs that would cause a strict v2.0.0 validator (fleet manager) to reject messages from these types.

VDA 5050 agent uses standalone C++ types with nlohmann/json serialization
(vda5050_types.hpp) instead of ROS 2 message types. The msgs package was
never imported by any package in the repo and had 6 interop-breaking
schema errors identified in review.

The SOVD Service Interface plugin (which stays) uses ros2_medkit_msgs
for its service types, not VDA 5050 msgs.
- Populate fault timestamps (first/last_occurred) from JSON response
- Fix TODO reference (removed stale #332 link)
- Add README.md for sovd_service_interface plugin
- Move test domain range from 230-232 to 1-9 (avoid collision with
  peer_aggregation secondary domains at 230)
@mfaferek93 mfaferek93 requested a review from bburda April 5, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add VDA 5050 message definitions and ros2_medkit Service Interface plugin

3 participants