Skip to content

Add ros2_medkit packages - #262

Merged
wolfv merged 5 commits into
RoboStack:mainfrom
baradejoo:add-ros2-medkit
Aug 2, 2026
Merged

Add ros2_medkit packages#262
wolfv merged 5 commits into
RoboStack:mainfrom
baradejoo:add-ros2-medkit

Conversation

@baradejoo

@baradejoo baradejoo commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Goal

Add the ros2_medkit diagnostic stack to the robostack-jazzy distribution.

Description

ros2_medkit (https://index.ros.org/r/ros2_medkit/) is a structured diagnostic model for ROS 2 robots that exposes faults over a REST/SOVD API. This PR adds the released 0.4.0 packages: the message/service interfaces, the fault manager and detection, the diagnostic/log/action bridges, the REST gateway SOVD plugins.

The dependency libcpp-httplib-dev is mapped to the conda-forge cpp-httplib package (used by the gateway's REST server).

Changes

  • Added the ros2_medkit packages to the jazzy build selection in vinca.yaml.
  • Added a rosdep mapping libcpp-httplib-dev -> cpp-httplib in robostack.yaml.
  • Added a patch fixing a std::vector<bool> build error in
    ros2_medkit_serialization on macOS (see Notes).

License

ros2_medkit is licensed under Apache-2.0 (per the upstream packages).

Notes

Build tested locally on osx-arm64.

macOS (serialization): ros2_medkit_serialization failed to compile on clang/libc++ with:
error: implicit instantiation of undefined template 'YAML::convert<std::__bit_const_reference<std::vector<bool>>>'. The vendored dynmsg code pushes a std::vector<bool>::operator[] proxy directly into a yaml-cpp node; clang has no conversion for that proxy type. Fixed with a one-line patch casting the proxy to bool before push_back (patch/ros-jazzy-ros2-medkit-serialization.patch). This is a genuine upstream bug (present in 0.4.0 through main).

@baradejoo

baradejoo commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Summary of platform status

After testing ros2_medkit on all platforms, there are a few upstream portability issues worth flagging before this is ready for review. tl;dr: everything builds on linux-64; the gateway stack is blocked on the other platforms for different reasons, each described below.

Version (0.6.0 via additional_recipes)

The jazzy snapshot pins ros2_medkit 0.4.0, which doesn't build against conda-forge's current cpp-httplib 0.51: the gateway used httplib::Request::get_file_value, removed from httplib after ~0.18. Upstream rewrote this to the MultipartFormData API in 0.6.0, so I pull in 0.6.0 via rosdistro_additional_recipes.yaml (which overrides the snapshot and is manually maintained, so it survives a snapshot regeneration) rather than editing the auto-generated rosdistro_snapshot.yaml. @traversaro @Tobias-Fischer — is that the right mechanism for a version override, or would you prefer another approach?

linux-aarch64 — only blocked by cpp-httplib

The only blocker on linux-aarch64 is that conda-forge doesn't ship cpp-httplib for ARM — the feedstock (https://github.com/conda-forge/cpp-httplib-feedstock) only builds linux-64, osx-64 and win-64. pipe2 and dlfcn.h are both available on linux-aarch64, so once cpp-httplib is available for linux-aarch64, the whole stack (including the gateway) should build on both linux-64 and linux-aarch64 with no further changes here. Since cpp-httplib is header-only, adding ARM should be straightforward. @wolfv, as the feedstock maintainer — would you be open to that?

macOS (osx-64 / osx-arm64) — pipe2 is Linux-only

The gateway fails on macOS with:

default_script_provider.cpp:437: error: use of undeclared identifier 'pipe2'
`pipe2()` is a Linux-specific extension; macOS/BSD only has `pipe()`. 

The gateway uses it unconditionally (plus a few other POSIX-only headers), so it can't build on macOS as-is — this is independent of the cpp-httplib issue so even with httplib on osx-arm64 the gateway would still need a pipe2 fix.

Windows — dlfcn.h is POSIX-only

ros2_medkit_serialization vendors dynmsg, whose typesupport.cpp includes <dlfcn.h> and uses dlopen/dlsym/dlclose with no Windows fallback, so it fails on MSVC with:

typesupport.cpp(16): error C1083: Cannot open include file: 'dlfcn.h'

Since serialization is a core dependency, this blocks most of the stack on win-64.

Note on package count

index.ros.org lists 19 ros2_medkit packages for jazzy, but only 16 are actually bloomed to ros2-gbp/ros2_medkit-release — fault_detection, graph_watchdog and opcua have no release tag, so this PR adds the 16 available ones.

@baradejoo baradejoo closed this Aug 1, 2026
@baradejoo baradejoo reopened this Aug 1, 2026
@wolfv

wolfv commented Aug 1, 2026

Copy link
Copy Markdown
Member

I can take care of cpp-httplib!

@wolfv
wolfv merged commit 1e6037b into RoboStack:main Aug 2, 2026
13 of 15 checks passed
@baradejoo
baradejoo deleted the add-ros2-medkit branch August 4, 2026 20:06
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