Robotics StackExchange | Archived questions

ROS2 multicast in Docker running on Windows

I am trying to perform ros2 multicast send in a Ubuntu (22.04) docker container running in Windows host, and ros2 multicast receive on a different PC natively running Ubuntu 22.04. I do this since, I wish to deploy a docker image that can run on both Windows and Ubuntu (considering versions other than 22.04). However, I am failing to achieve this, which on investigation I find the issue being on the Windows side.

Can anyone help me on this ?

Setup in brief:

Ideally the receiving end should get a "Hello World".

Thanks in advance.

Asked by paulvp on 2023-06-20 08:37:32 UTC

Comments

Quick note: is docker on Windows still running inside a VM (it's been a long time since I checked it). If it is (and HyperV would still count as a VM) you might need to configure the networking in a way that allows multicast traffic to pass and/or map required ports.

Unfortunately Docker and networking is never trivial.

Asked by gvdhoorn on 2023-06-22 04:55:59 UTC

Docker desktop in Windows runs on WSL2 (Windows Subsystem for Linux) which is essentially a virtualization like HyperV. I tried to keep the WSL's eth0 IP address and the gateway same as that of my static IP of the host (Windows) machine. And also forced the ROS2 to communicate through this eth0 interface of WSL. Maybe I am missing something - especially I am told that multicast may not be so straight forward. If you are aware of how to do this, could you please let me know the steps. Thanks in advance, for the help.

Asked by paulvp on 2023-06-22 05:11:52 UTC

Answers