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

Revision history [back]

click to hide/show revision 1
initial version

You should be able to run docker with the host network "--net=host".

i.e. roscore rostopic echo /test docker run -it --rm --net=host ros:indigo-ros-base rostopic pub /test std_msgs/String "hello"

You should be able to run docker with the host network "--net=host".

i.e.

roscore
 rostopic echo /test
 docker run -it --rm --net=host ros:indigo-ros-base rostopic pub /test std_msgs/String "hello"

"hello"

You should be able to run docker with the host network "--net=host".--net=host.

roscore
rostopic echo /test
docker run -it --rm --net=host ros:indigo-ros-base rostopic pub /test std_msgs/String "hello"

As pointed out below, this will remove the network level isolation that docker provides. If you need to preserve isolation then it becomes more complicated as you need to explicitly expose the ports ROS uses in the docker command and it uses a very wide range of ports (normally 32768 to 61000).

This page should point you in the right direction if you need it https://docs.docker.com/engine/userguide/networking/default_network/binding/