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

How to run multiple roscore/master in a single machine?

asked 2013-03-08 14:57:26 -0500

tor gravatar image

updated 2013-03-08 21:35:04 -0500

Hi,

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/
$ echo $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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2013-03-09 00:04:13 -0500

dornhege gravatar image

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

edit flag offensive delete link more
0

answered 2013-03-08 19:10:52 -0500

AFAIK, there should be only one roscore running. why do you need two roscore?

edit flag offensive delete link more

Comments

tor gravatar image tor  ( 2013-03-08 21:30:41 -0500 )edit

@tor: according to my understanding, one roscore does nothing but opens a CORBA naming service such that other components can register on it and communicate with each other. So one roscore should be enough.

yangyangcv gravatar image yangyangcv  ( 2013-03-09 19:46:01 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2013-03-08 14:57:26 -0500

Seen: 7,767 times

Last updated: Mar 09 '13