Ask Your Question
1

how to conect with roscore in docker?

asked 2019-07-26 01:50:10 -0500

yueweiliang gravatar image

As titles, how can I running a roscore in docker with ROS_MASTER_URI=XX.X.X.X. And make the nodes outside docker can connect with the docker roscore using specified ROS_MASTER_URI?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-26 05:25:43 -0500

alsora gravatar image

updated 2019-07-26 05:50:15 -0500

I think that you misunderstood the role of the environment variable ROS_MASTER_URI. If you have the ROS MASTER and a ROS NODE, the variable will be used by the ROS NODE to know where to look for the MASTER. It's not setting the master URI to a specific value.

In your example, you should just run roscore in the Docker, without setting any environment variable. roscore will print to screen the URI where the master can be reached.

In the terminal where you want to run your nodes, you will have to run export ROS_MASTER_URI=XX.X.X.X with the URI that has been previously printed.

Moreover, if using Docker, you should make sure that the Docker container has not been run in isolated mode.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

3 followers

Stats

Asked: 2019-07-26 01:50:10 -0500

Seen: 40 times

Last updated: Jul 26