Rosanswers logo


A superset question is here, where it is said that we have to change the ROS_MASTER_URI to run the 2nd master.

I have tried running the 1st master with ROS_MASTER_URI=http://localhost:11311 (default), then in another terminal did the following:

$ export ROS_MASTER_URI=http://torPC2:11315/
$ roscore
roscore cannot run as another roscore/master is already running. 
Please kill other roscore/master processes before relaunching.
The ROS_MASTER_URI is http://torPC2:11311/

So, how to make roscore know that the ROS_MASTER_URI now in the 2nd terminal is http://torPC2:11315/ ? or How to run multiple roscore/master in a single machine?

My use case requires completely independent roscores/masters and even they do not need to communicate each others. Simply, it is like having multiple isolated machines with one running roscore/master in each of them.

Thanks a lot in advance.

Originally posted by tor on ROS Answers with karma: 277 on 2013-03-08

Post score: 3


1 Answer 1


Rosanswers logo

You can use the -p port option to bring up another one on a different port.

Originally posted by dornhege with karma: 31395 on 2013-03-09

This answer was ACCEPTED on the original site

Post score: 4


Your Answer

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