danzimmerman / dz_rpi_config

Bash and other linux config tools, version controlled.
0 stars 0 forks source link

Add instructions to get ROS 2 communicating with WSL2 #4

Open danzimmerman opened 1 month ago

danzimmerman commented 1 month ago

So far I tried to create a %USERPROFILE\.wslconfig file with the following:

[wsl2]
networkingMode=mirrored

This does not seem to be enough. I'm on Win 11 Pro 23H2, which should support mirrored mode networking, and a look at ip addr does seem to suggest it is "mirroring," in the sense that the WSL2 IP is the same as the machine's native IP.

However, running the talker C++ node on WSL2 and listener on the Raspberry Pi doesn't work.

danzimmerman commented 1 month ago

See https://robotics.stackexchange.com/questions/105511/fastdds-demo-nodes-cpp-between-wsl2-and-raspberry-pi

danzimmerman commented 2 weeks ago

https://superuser.com/questions/1762729/multicast-from-wsl2-to-win-does-not-work https://answers.ros.org/question/300370/ros2-talker-cannot-communicate-with-listener/ https://www.reddit.com/r/ROS/comments/185gz5e/ros2_wsl2_not_communicating_with_base_ubuntu_ros2/

I can't get this working right away, but I think I understand the issue better with some help from our network team. Windows is dropping the multicast traffic because it doesn't know WSL wants it. I need to make a multicast consumer in windows for it to even register the data. I think port mirroring will solve this, but for now I'm going to spin up a cheap multicast consumer so it at least gets to the next step.