ros2_rust icon indicating copy to clipboard operation
ros2_rust copied to clipboard

Add rosidl_rust to a sourced overlay in the docker image

Open maspe36 opened this issue 4 months ago • 0 comments

Add rosidl_rust in an overlay sourced in the dev container via an entrypoint.

Move any logic that will change between distros into shell scripts for more flexibility.


Rather than for ros2_rust development, I find this image most useful for downstream development of packages. This way I can just add rclrs as a dep and everything "just works". There is probably a discussion to be had for moving this out of the repo as its more rclrs adjacent at this point.

Tested locally for Humble, Jazzy, Kilted, and Rolling with our ros2_rust workspace (described in the README) with a COLCON_IGNORE in the src/ros2-rust/rosidl_rust/rosidl_generator_rs package.

cd rust_ws/
docker build --build-arg ROS_DISTRO=jazzy -f src/ros2_rust/Dockerfile -t ros2_rust_dev:jazzy . 
docker run -it -v ./:/workspace ros2_rust_dev:jazzy

In the container

rm -rf build/ log/ install/
colcon build

maspe36 avatar Jun 29 '25 19:06 maspe36