Skip to content

Instantly share code, notes, and snippets.

@cardboardcode
Last active May 25, 2024 12:18
Show Gist options
  • Save cardboardcode/e59a597f6b37212c615387ddb2ab08f4 to your computer and use it in GitHub Desktop.
Save cardboardcode/e59a597f6b37212c615387ddb2ab08f4 to your computer and use it in GitHub Desktop.
For People In A Hurry: Setting up ros1_bridge for ROS2 <=> ROS1 Communication [Ubuntu 20.04]

For People In A Hurry: Setting up ros1_bridge in ROS2 [Ubuntu 20.04]

TLDR: This is a set of instructions to help set up necessary ROS2 packages in order to run ros1_bridge.

Why?

ros1_bridge allows nodal communication between ROS1 and ROS2 packages, providing higher flexibility in setting up an overall ROS system.

Dependencies

  1. Ubuntu 20.04 Focal Fossa ( Operating System )
  2. ROS2 Foxy Fitzroy ( ROS2 )
  3. ROS1 Noetic Ninjemys (ROS1)

Setup

  1. Download the following 2 ROS2 packages: . ros1_bridge . image_transport_plugins
cd $HOME
mkdir -p ~/ros1_bridge_ws/src
cd ~/ros1_bridge_ws/src
git clone https://github.com/ros2/ros1_bridge.git --branch foxy --single-branch --depth 1
  1. Build the packages:
cd ~/ros1_bridge_ws
source /opt/ros/noetic/setup.bash
source /opt/ros/foxy/setup.bash
colcon build --symlink-install --packages-select ros1_bridge

Run

cd ~/ros1_bridge_ws
source install/setup.bash
ros2 run ros1_bridge dynamic_bridge --bridge-all-topics

References

  1. ros2/ros1_bridge - https://github.com/ros2/ros1_bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment