ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

roslaunch and ports [closed]

asked 2012-10-26 03:45:57 -0600

SL Remy gravatar image

I may be missing something, but if it's possible to start roslaunch (roscore) on a specific port.. shouldn't it be possible/necessary to pass a port to tools like rostopic so they can communicate with the "right" ros graph?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by SL Remy
close date 2013-01-30 11:26:02

1 Answer

Sort by ยป oldest newest most voted

answered 2012-10-26 04:21:18 -0600

Lorenz gravatar image

That's what ROS_MASTER_URI is for. You can start roscore on a different port with the --port parameter, e.g.:

roscore --port=11411

Then set the ROS_MASTER_URI to the new URI:

export ROS_MASTER_URI=http://localhost:11411

Now, all ros nodes should contact the core on port 11411. That way, you can run several ros cores on the same machine.

edit flag offensive delete link more


Ah yes.. thanks.. not sure why I forgot about the env var.. but this is how I'd use it (for reference) ROS_MASTER_URI=http://localhost:11411 rostopic list

SL Remy gravatar image SL Remy  ( 2012-10-26 09:19:40 -0600 )edit

Question Tools


Asked: 2012-10-26 03:45:57 -0600

Seen: 978 times

Last updated: Oct 26 '12