Skip to content

EEEManchester/ros2_bridge_ros1

Repository files navigation

ROS2 bridge for ros1 noetic

This rep is a ros2 humble package in Docker that transfer ros1 noetic topics into ros2 humble ones. It is the implementation of https://github.com/TommyChangUMD/ros-humble-ros1-bridge-builder. In fact, it contains two Docker images:

1 Build Docker images

Step 1.1 get source code of this rep

    git clone --recurse-submodules git@github.com:EEEManchester/ros2_bridge_ros1.git

Step 1.2 build ros-humble-ros1-bridge-builder image

    cd humble_bridge_builder
    docker build . -t ros-humble-ros1-bridge-builder

then we should obtain a Docker image ros-humble-ros1-bridge-builder, and then we run create_bridge_pkg.sh to create the ros-humble-ros1-bridge-builder pkg in the folder ros_bridge_shared

Step 1.3 build ros-humble-desktop image

    bash build_image.sh

which will create a ros-humble-desktop image whos name is ros2_humble_bridge.

Step 1.4 run ros-humble-desktop container using the pkg ros-humble-ros1-bridge-builder image

we run the following command

    bash run_container

and we share the folder ros_bridge_shared inside ros-humble-desktop container. In this case, the container's name is ros2_humble_bridge_container. Note that, we use the host network setting to enable the container use the network of the host machine.

2. Run bridge to enable communication

2.1 Run your ros1 noetic roscore

Lets assume that you run a ros1 noetic application also in a Docker container on your host machine with its ros master uri being ROS_MASTER_URI=http://localhost:11311/

2.1 Run bridge node in ros-humble-desktop container created in Step 1.4

In side ros2_humble_bridge_container, we first run two source commands which are

    source /opt/ros/humble/setup.bash
    source /bridge/ros-humble-ros1-bridge/install/local_setup.bash 

and we set ROS_MASTER_URI as the address in Step 2.1, after which we can run the node as

    export ROS_MASTER_URI=http://localhost:11311
    ros2 run ros1_bridge dynamic_bridge --bridge-all-topics

Till now, all the ros1 noetic topics should be transfered into ros2 humble. We should be able to see them in the container ros2_humble_bridge_container.

About

This repository provides a ROS 2 package for bridging ROS 1 Noetic topics to ROS 2.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors