Skip to content

Apply client workspace compatibility patches for newer ROS 2 interface packages#815

Open
EugenioCollado wants to merge 6 commits into
jazzyfrom
5.0.2-vulcanexus
Open

Apply client workspace compatibility patches for newer ROS 2 interface packages#815
EugenioCollado wants to merge 6 commits into
jazzyfrom
5.0.2-vulcanexus

Conversation

@EugenioCollado

Copy link
Copy Markdown
Contributor

This PR adds compatibility patching in micro_ros_setup for imported ROS 2 client workspaces so they can be built successfully with Micro XRCE-DDS typesupport.

Recent ROS 2 interface packages use patterns that work in a full ROS 2 build but can break in the micro-ROS firmware workspace. In particular:

  • some foundational interface packages use rosidl_core_generators, which prevents the Micro XRCE-DDS generators from producing the required typesupport for downstream action-related dependencies in this environment
  • some action-containing interface packages do not explicitly declare the dependencies that become relevant once Micro XRCE-DDS typesupport is generated and linked in the firmware workspace

This PR keeps those fixes local to micro-ROS by shipping patch files in micro_ros_setup and applying them when the workspace is created/imported, instead of requiring direct changes in upstream ROS 2 repositories as part of the normal micro-ROS flow.

What changed

  • Add patch assets for imported ROS 2 packages
  • Apply those patches from the workspace creation flow
  • Cover the interface packages needed for successful Micro XRCE-DDS client firmware builds

Patch scope

The compatibility patches address:

  • switching selected interface packages from rosidl_core_generators to rosidl_default_generators
  • updating matching runtime dependencies where needed
  • adding explicit action-related dependencies in packages that otherwise resolve incorrectly in the micro-ROS workspace

Why
As a micro-ROS maintainer, we need the fix to live in micro-ROS-owned repositories while still allowing the generated firmware workspace to build against current ROS 2 interface definitions.

Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a patching step to the micro_ros_setup client workspace import flow so newer ROS 2 interface packages can be made compatible with Micro XRCE-DDS typesupport generation/linking, without requiring upstream ROS 2 repo changes.

Changes:

  • Introduce a new apply_patches.sh script and invoke it during create_ws.sh.
  • Add patch assets under patches/ for generator/runtime and action-dependency compatibility fixes.
  • Install the patch assets and the new script via CMake.

Reviewed changes

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

Show a summary per file
File Description
scripts/create_ws.sh Calls the patch-application step after importing repositories.
scripts/apply_patches.sh New helper to locate patch assets and apply them idempotently to a workspace.
patches/ros2-test-msgs-action-deps.patch Patch asset adding action-related deps for test_msgs.
patches/ros2-example-interfaces-action-deps.patch Patch asset adding action-related deps for example_interfaces.
patches/ros2-core-generators-to-default-generators.patch Patch asset switching selected interface packages from core to default generators/runtime.
CMakeLists.txt Installs the patches/ directory and the new script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/create_ws.sh Outdated
Comment thread scripts/apply_patches.sh
EugenioCollado and others added 5 commits June 16, 2026 10:26
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
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.

2 participants