ros2_documentation icon indicating copy to clipboard operation
ros2_documentation copied to clipboard

Need example Docker invocation for distributed ROS systems

Open slowrunner opened this issue 8 months ago • 1 comments

There is great documentation on installing ROS 2 in a Docker container and running the demo_nodes talker/listener for a single container or two containers but lacks documentation of the needed parameter (--net=host) for ROS 2 in a container to communicate with distributed ROS 2 nodes.

The ROS 2 invocation to allow non-local topic communication is:

sudo docker run -it --net=host osrf/ros:humble-desktop

slowrunner avatar Oct 20 '23 17:10 slowrunner

Can you elaborate a bit why --net=host is required to the tutorial? i think it does not have to be using host network interface, but using docker bridge can allow the ROS 2 applications in the containers to communicate each other? binding host network would be more problem if the user's physical network does not support multicast?

fujitatomoya avatar Oct 20 '23 19:10 fujitatomoya