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

can I run ROS2 and ROS1 on one ubuntu at the same time?

asked 2020-06-22 08:55:08 -0600

pidan101 gravatar image

hi all,

on my ubuntu 16.04, I already have a ros1 system setup and up running. however, I need to launch a separate ros2 node at the same time. when I source the /opt/ros/$ros_version/setup.bash, it seems the system can only allow one version of ros up running. I am wondering how I could run ros1 and ros2 simultaneously?

Thanks!

edit retag flag offensive close merge delete

Comments

1

it seems the system can only allow one version of ros up running

Is there a specific error message? ROS 1 and ROS 2 can definitely be run at the same time. This is how the ros1 bridge works:

https://github.com/ros2/ros1_bridge

sloretz gravatar image sloretz  ( 2020-06-22 12:00:04 -0600 )edit

Note that ROS2 requires (or at least is prebuild for) at least Ubuntu 18.04. One solution I'm using right now is to install a ROS2 Docker image - I'm currently running Foxy in a Ubuntu 18.04 Docker container (built from source as Foxy is only offered for 20.04+) with ROS1 running rosbag play in the base 16.04. (In VSCode's terminal running on Windows+Remote SSH plugin)

KenYN gravatar image KenYN  ( 2020-06-23 00:42:13 -0600 )edit

thanks! very helpful. but to clarify, ROS2 has, for example, ardent, which can run perfectly on ubuntu 16.04. why do you say it requires at least 18.04? thanks

pidan101 gravatar image pidan101  ( 2020-06-23 02:22:10 -0600 )edit

ardent is quite old, but I was thinking of the versions I've worked on, eloquent (18.04) and foxy (20.04); looking at the ROS Docker repoardent is the only one offered for 16.04.

KenYN gravatar image KenYN  ( 2020-06-23 02:42:34 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
5

answered 2020-06-22 12:29:20 -0600

Use multiple terminals / sessions. You can certainly have multiple versions of ROS running but you should make sure to only source the one required in each terminal before running a launch / run command.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-06-22 08:55:08 -0600

Seen: 1,617 times

Last updated: Jun 22 '20