Robotics StackExchange | Archived questions

Migration ROS1 to ROS2

Hi guys,

I am trying to control on mobile robot using ROS2/DDS

, but the original package is ROS1. I found some tutorials about migration tools but it seems that r not complete. My question is: is there any other method to use ROS2/DDS along with ROS1 to control the mobile robot (I am using ADLINK/DDS).

Looking forward for suggestions

Bests

Asked by amrani on 2019-10-08 21:04:20 UTC

Comments

If you do not want to migrate the package you could look at https://github.com/ros2/ros1_bridge . This package makes the messages from ROS1 nodes available in the ROS2 global data space. The README explains how to use it (source ROS1 environment, source ROS2 environment, build ros1_bridge). If your package uses custom messages, you'll have to make a ROS2 version of those messages.

Asked by MCornelis on 2019-10-09 03:39:20 UTC

Otherwise, you'll just have to dive deeper into ROS2 and make the proper API changes to the source code in your package. The migration tools do some of the steps for you, but as you indicated they don't fully migrate a package. It could help to make a couple of simple ROS2 packages first, to understand the differences between ROS1 and ROS2. This will give you an idea of what changes you'll have to make between the ROS1 and ROS2 version of your code.

Asked by MCornelis on 2019-10-09 03:42:01 UTC

@MCornelis thank you for the answer, i successfully make it work using ORS1_Bridge , now i am going to migrate the whole package using migration tools .

Asked by amrani on 2019-10-14 20:56:32 UTC

Answers