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 imagetor ( 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 imageyangyangcv ( 2013-03-09 19:46:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 4,610 times

Last updated: Mar 09 '13