0
$\begingroup$

Rosanswers logo

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!


Originally posted by pidan101 on ROS Answers with karma: 1 on 2020-06-22

Post score: 0


Original comments

Comment by sloretz on 2020-06-22:\

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

Comment by KenYN on 2020-06-23:
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)

Comment by pidan101 on 2020-06-23:
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

Comment by KenYN on 2020-06-23:
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 repo ardent is the only one offered for 16.04.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by stevemacenski with karma: 8272 on 2020-06-22

This answer was ACCEPTED on the original site

Post score: 5

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.