Context
ros2_medkit_opcua (added in #365) currently pulls open62541pp v0.16.0 via CMake FetchContent at configure time. This works for source builds (colcon build) and for the plugin's own CI workflow (opcua-plugin.yml), but it is incompatible with the bloom release pipeline used by rosdistro:
- Bloom builds source packages in a clean chroot with no network access
- FetchContent tries to clone from github.com at configure time → fails
- Debian release policy requires reproducible offline builds
This is why ros2_medkit_gateway vendored jwt-cpp and tl::expected as source trees inside src/vendored/ instead of using FetchContent (see feat(gateway): vendor jwt-cpp v0.7.0).
As a result, ros2_medkit_opcua is deliberately not in the rosdistro release.packages list in jazzy/distribution.yaml. Users install it from source only.
This issue tracks the work needed to make the package release-ready so it can be added to rosdistro and bloom-released alongside the rest of the medkit packages.
Scope
-
Choose vendoring layout (discussion needed):
- Option A: vendor inside plugin package at
src/ros2_medkit_plugins/ros2_medkit_opcua/src/vendored/open62541pp/ (matches jwt-cpp pattern used by gateway)
- Option B: create a standalone
src/open62541pp_vendor/ colcon package that exports the library via find_package(open62541pp_vendor) (matches ROS 2 ecosystem *_vendor pattern like nlohmann_json_vendor, yaml_cpp_vendor)
-
Strip the source tree to a manageable size:
- Clean clone of
open62541pp v0.16.0 with recursive submodules is ~127 MB
- The biggest offender is
3rdparty/open62541/deps/ua-nodeset at 96 MB (OPC-UA information model XML files)
- Our tank demo does not use any OPC-UA information models beyond namespace 0, so this can likely be stripped by disabling
UA_ENABLE_DA, UA_ENABLE_DI, etc. and removing the XML sources
- Target footprint after strip: ~10-15 MB
-
Replace fetchcontent_declare / fetchcontent_makeavailable in src/ros2_medkit_plugins/ros2_medkit_opcua/CMakeLists.txt with add_subdirectory(...) pointing at the vendored tree (or find_package for Option B).
-
Verify the existing tricks still work with the new layout:
- Clearing directory-level
COMPILE_OPTIONS around add_subdirectory so strict warnings do not fire on upstream C sources
- Marking
open62541pp interface includes as INTERFACE_SYSTEM_INCLUDE_DIRECTORIES so -Wsign-conversion noise does not propagate to consumers
-
Add NOTICE / license attribution for MPLv2 compliance (open62541pp and open62541 are MPLv2).
-
Update this package's README ## Third-party Dependencies section to reflect the vendored layout.
-
Add ros2_medkit_opcua (and open62541pp_vendor if Option B) to jazzy/distribution.yaml in a PR against ros/rosdistro. Bump the version: field accordingly.
Acceptance criteria
References
Context
ros2_medkit_opcua(added in #365) currently pullsopen62541ppv0.16.0 via CMakeFetchContentat configure time. This works for source builds (colcon build) and for the plugin's own CI workflow (opcua-plugin.yml), but it is incompatible with the bloom release pipeline used by rosdistro:This is why
ros2_medkit_gatewayvendoredjwt-cppandtl::expectedas source trees insidesrc/vendored/instead of using FetchContent (seefeat(gateway): vendor jwt-cpp v0.7.0).As a result,
ros2_medkit_opcuais deliberately not in the rosdistrorelease.packageslist injazzy/distribution.yaml. Users install it from source only.This issue tracks the work needed to make the package release-ready so it can be added to rosdistro and bloom-released alongside the rest of the medkit packages.
Scope
Choose vendoring layout (discussion needed):
src/ros2_medkit_plugins/ros2_medkit_opcua/src/vendored/open62541pp/(matchesjwt-cpppattern used by gateway)src/open62541pp_vendor/colcon package that exports the library viafind_package(open62541pp_vendor)(matches ROS 2 ecosystem*_vendorpattern likenlohmann_json_vendor,yaml_cpp_vendor)Strip the source tree to a manageable size:
open62541ppv0.16.0 with recursive submodules is ~127 MB3rdparty/open62541/deps/ua-nodesetat 96 MB (OPC-UA information model XML files)UA_ENABLE_DA,UA_ENABLE_DI, etc. and removing the XML sourcesReplace
fetchcontent_declare/fetchcontent_makeavailableinsrc/ros2_medkit_plugins/ros2_medkit_opcua/CMakeLists.txtwithadd_subdirectory(...)pointing at the vendored tree (orfind_packagefor Option B).Verify the existing tricks still work with the new layout:
COMPILE_OPTIONSaroundadd_subdirectoryso strict warnings do not fire on upstream C sourcesopen62541ppinterface includes asINTERFACE_SYSTEM_INCLUDE_DIRECTORIESso-Wsign-conversionnoise does not propagate to consumersAdd
NOTICE/ license attribution for MPLv2 compliance (open62541ppandopen62541are MPLv2).Update this package's README
## Third-party Dependenciessection to reflect the vendored layout.Add
ros2_medkit_opcua(andopen62541pp_vendorif Option B) tojazzy/distribution.yamlin a PR againstros/rosdistro. Bump theversion:field accordingly.Acceptance criteria
opcua-plugin.ymlopen62541pp/open62541LICENSE files are present and attributed inNOTICEros-jazzy-ros2-medkit-opcuaapt packageReferences
ros/rosdistro/jazzy/distribution.yaml-ros2_medkit.release.packageslist