Skip to content

ROS1 Bridge

Effie Daum edited this page Feb 4, 2024 · 1 revision

Introduction

Before using the ros1_bridge, it is recommended to read this overview document of how it works: https://github.com/ros2/ros1_bridge/blob/master/doc/index.rst

Instructions

These are the steps that were required to pass warthog_msgs through the ros1_bridge. Adjust these instructions to your custom message type.

  • close the terminal and reopen it
  • source /opt/ros/noetic/setup.bash
  • make sure that the /home/ubuntu/ros1_ws workspace contains the ros 1 version of the warthog_msgs package
  • catkin_make in /home/ubuntu/ros1_ws/
  • close the terminal and reopen it
  • source /opt/ros/foxy/setup.bash
  • make sure that the /home/ubuntu/ros2_ws workspace contains the ros 2 version of the warthog_msgs package
  • create a file named ros_bridge_mapping.yaml in /home/ubuntu/ros2_ws/src/warthog_msgs/ with the following content:
-
  ros1_package_name: 'warthog_msgs'
  ros2_package_name: 'warthog_msgs'
  • In /home/ubuntu/ros2_ws/src/warthog_msgs/CMakeLists.txt, add the following lines:
install(FILES ros_bridge_mapping.yaml
	DESTINATION share/${PROJECT_NAME}
)
  • In /home/ubuntu/ros2_ws/src/warthog_msgs/package.xml, add the following lines in the <export> section:
<ros1_bridge mapping_rules="ros_bridge_mapping.yaml"/>
  • colcon build in /home/ubuntu/ros2_ws/
  • close the terminal and reopen it
  • make sure that the /home/ubuntu/bridge_ws workspace contains the ros1_bridge package
  • install the necessary dependencies for the bridge (see https://github.com/ros2/ros1_bridge/tree/foxy#building-the-bridge-from-source)
  • close the terminal and reopen it
  • source /home/ubuntu/ros1_ws/devel/setup.bash
  • source /home/ubuntu/ros2_ws/install/setup.bash
  • In /home/ubuntu/bridge_ws/src/ros1_bridge/CMakeLists.txt, add the following line:
find_ros1_package(warthog_msgs REQUIRED)
  • colcon build --cmake-force-configure in /home/ubuntu/bridge_ws/

Known issues

Parameter_bridge will not work if the ROS1 and ROS2 packages do not have the same name, although it will work with the dynamic bridge: https://github.com/ros2/ros1_bridge/issues/327

Norlab's Robots

Protocols

Templates

Resources

Grants

Datasets

Mapping

Deep Learning

ROS

Ubuntu

Docker (work in progress)

Tips & tricks

Clone this wiki locally