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

roslaunch and ports [closed]

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

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
2

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

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

Comments

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 -0500 )edit

Question Tools

Stats

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

Seen: 1,282 times

Last updated: Oct 26 '12