osrf / docker_images

A repository to hold definitions of docker images maintained by OSRF
Apache License 2.0
578 stars 172 forks source link

create a ros bridge image for ros2 humble / ubuntu 22 #635

Closed ljburtz closed 2 years ago

ljburtz commented 2 years ago

Hello, Would it be possible to create a docker image that includes the ros2-ros1 bridge for noetic / humble? The same way it is done for foxy and galactic would be great! https://github.com/osrf/docker_images/blob/master/ros/foxy/ubuntu/focal/ros1-bridge/Dockerfile

mikaelarguedas commented 2 years ago

Unfortunately, there is no version of ROS1 officially upporting Ubuntu 22.04, so we would need to have all ROS Noetic ported and funtionnal on that version of Ubuntu (ideally with deb packages available) to have the raw material to craft a docker image supporting the association Ubuntu 22.04, ROS Noetic, ROS 2 Humble and the bridge

ljburtz commented 2 years ago

thank you for the prompt reply! I understand and thought the same but became optimistic from this guide. https://docs.ros.org/en/humble/How-To-Guides/Using-ros1_bridge-Jammy-upstream.html Unfortunately I was not successful trying to make a docker by following it (still had a catkin dependency mismatch)

mikaelarguedas commented 2 years ago

I was not aware of that tutorial, if I read correctly it looks like you need to start from a scratch ubuntu image, build ROS2 from source, then remove the ros2 apt repo and catkin-pkg-modules before installing ros1 from ubuntu and build the bridge. Maybe the easiest would be for you to build and use osrf/ros2:source as a base and then use a Dockerfile like the following:

FROM osrf/ros2:source

RUN rm /etc/apt/sources.list.d/ros2-latest.list

RUN apt-get update \
    && apt remove -y python3-catkin-pkg-modules \
    && apt-get install -q -y --no-install-recommends ros-core-dev \
    && rm -rf /var/lib/apt/lists/*

RUN mkdir -p $HOME/ros1_bridge/src
WORKDIR $HOME/ros1_bridge/src
RUN git clone https://github.com/ros2/ros1_bridge
RUN . /opt/ros2_ws/install/local_setup.sh \
  && MAKEFLAGS=-j1 colcon build
mikaelarguedas commented 2 years ago

Without further response I'll close those considering an answer has been provided. Feel free to comment here if that's not the case and we can reopen