ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

can ros packages be directly used in ROS2?

asked 2021-05-12 04:27:51 -0500

toSeek_toLearn gravatar image

can all packages developed in ROS be used directly in ROS2? or is there migration of code needed as per suitability of ROS2 needs?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-05-12 10:37:07 -0500

sgvandijk gravatar image

No, you can't directly run ROS 1 nodes in ROS 2, ROS 2 is a complete rewrite without built-in backwards compatibility with ROS 1. A quick search would have pointed you to the comprehensive migration guide:

https://docs.ros.org/en/foxy/Contribu...

Having said that, you could run ROS 1 nodes next to ROS 2 using the ROS 1 bridge

edit flag offensive delete link more

Comments

Adding to this: Many of the "little" things have changed with ROS2 (e.g. declaring parameters before their use, how the "spin" function should be handled, launch files are now python files, the DDS for message sending/receiving).

Check out the ROS2 Foxy tutorials. Run through them at least once and try making a quick and easy publisher+subscriber setup. They're very easy, and should give you a good gauge of how to work with ROS2!

Spectre gravatar image Spectre  ( 2021-05-12 15:46:09 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-05-12 04:27:51 -0500

Seen: 471 times

Last updated: May 12 '21