-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Which demo
turtlebot3_integration
Steps to reproduce
- Clone the repository
- Run
cd demos/turtlebot3_integration && bash run-demo.sh --headless - Docker build fails during
colcon buildat theros2_medkit_serializationpackage
Expected behavior
The Docker image builds successfully and the demo launches.
Actual behavior
The build fails with the following error:
--- stderr: ros2_medkit_serialization
CMake Error at CMakeLists.txt:10 (include):
include could not find requested file:
ROS2MedkitCompat
CMake Error at CMakeLists.txt:34 (medkit_find_yaml_cpp):
Unknown CMake command "medkit_find_yaml_cpp".
---
Failed <<< ros2_medkit_serialization [1.45s, exited with code 1]
Root cause
Same root cause as #28: the Dockerfile clones ros2_medkit, extracts individual packages from ros2_medkit/src/ into ${COLCON_WS}/src/, and then deletes the entire clone with rm -rf ros2_medkit. The shared ros2_medkit/cmake/ROS2MedkitCompat.cmake module — referenced by multiple packages via ../../cmake relative paths — is not preserved before deletion.
Proposed fix
Add a line to preserve the CMake module before removing the clone:
RUN git clone --depth 1 https://github.com/selfpatch/ros2_medkit.git && \
mv ros2_medkit/src/ros2_medkit_gateway . && \
mv ros2_medkit/src/ros2_medkit_msgs . && \
mv ros2_medkit/src/ros2_medkit_serialization . && \
mv ros2_medkit/src/ros2_medkit_fault_manager . && \
mv ros2_medkit/src/ros2_medkit_fault_reporter . && \
mv ros2_medkit/src/ros2_medkit_diagnostic_bridge . && \
+ mkdir -p ${COLCON_WS}/cmake && mv ros2_medkit/cmake/ROS2MedkitCompat.cmake ${COLCON_WS}/cmake/ && \
rm -rf ros2_medkitThis places ROS2MedkitCompat.cmake at ${COLCON_WS}/cmake/, which is exactly where the relative ../../cmake paths from packages in ${COLCON_WS}/src/<pkg>/ resolve to. The fix has been tested locally — all 7 packages build successfully and the demo launches correctly.
Environment
- ROS 2 distro: Jazzy
- OS: Ubuntu 24.04 on WSL 2
- ros2_medkit version: latest (HEAD of main)