This project provides a Docker-based solution to establish a communication bridge between ROS 1 Noetic and ROS 2 Humble using ros1_bridge.
cd DIT-Ros1Bridge/docker
docker compose up -dThis will start two docker containers:
ros-core: Runs the ROS 1 Master (roscore) using the ros:noetic-ros-base image.ros1bridge: Runs the ros1_bridge (dynamic_bridge) with both ROS 1 and ROS 2 environments sourced.
If you have modified the Dockerfile or the installation scripts, you need to rebuild the image.
Note: The build process involves compiling ROS 2 Humble from source, which will take approximately 20-30 minutes depending on your hardware.
cd DIT-Ros1Bridge/docker
docker compose build
docker compose up -dWe also provide docker container for ROS1 and ROS2 environment, you can use the command to start the containers:
cd DIT-Ros1Bridge/docker
docker compose -f compose.example.yaml up -dThis will start two additional containers:
ros1: A container with the ROS Noetic environment.ros2: A container with the ROS Humble environment.
Open two terminals for testing:
Termianl 1 (ROS 1 Talker)
docker exec -it ros1 bash
source /opt/ros/noetic/setup.bash
rosrun rospy_tutorials talkerTermianl 2 (ROS 2 Listener)
docker exec -it ros2 bash
source /opt/ros/humble/setup.bash
ros2 run demo_nodes_cpp listenerVerification: If the bridge works correctly, you should see output in Terminal 2 similar to:
I heard: [hello world 1769646207.0724797]Open two terminals for testing:
Termianl 1 (ROS 2 Talker)
docker exec -it ros2 bash
source /opt/ros/humble/setup.bash
ros2 run demo_nodes_cpp listenerTermianl 2 (ROS 1 Listener)
docker exec -it ros1 bash
source /opt/ros/noetic/setup.bash
rosrun rospy_tutorials talkerVerification: If the bridge works correctly, you should see output in Terminal 2 similar to:
I heard: [Hello World: 13]