ros2_documentation
ros2_documentation copied to clipboard
Need example Docker invocation for distributed ROS systems
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
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?