ROS2 Distributed Nodes Not Communicating
ROS2 - FOXY
I have setup two ROS2-Foxy environments with ROS_DOMAIN_ID=0:
1) RaspberryPi 3B+ Ubuntu 20.04 64-bit Server
- - Ubuntu ufw is disabled
2) VMware Fusion running Ubuntu 20.04 64-bit Desktop
- - ROS2 Foxy
- - on Ubuntu 20.04.2 LTS 64-bit Desktop
- - in an 8 GB Ram 3-cores available to VMware Fusion virtual machine
- - on a 32GB 3.2GHz 6-Core Intel Core i7 2018 MacMini
- - running macOS Big Sur 11.0.1
- - Bridged Network Adapter (same if Bridged Ethernet or Bridged WiFi)
- - Ubuntu ufw is disabled
Each system will successfully communicate (localhost) for
"T1: ros2 run demo_nodes_cpp talker" and
"T2: ros2 run demo_nodes_py listener"
(any combination of cpp/cpp, py/cpp, cpp/py, py/py )Each system is able to ping to the other
Both systems ifconfig report
UP,BROADCAST,RUNNING,MULTICAST
Multicast test works one way - to the VM
ROS-VM: ros2 multicast recieve
Waiting for UDP multicast datagram...
Received from 10.0.0.11:43044: 'Hello World!'ROSbot: ros2 multicast recieve does not succeed
Both systems have ROS_DOMAIN_ID=0
- Both systems have ROS_LOCALHOST_ONLY=0
BUT when I run a talker on one system and listener on the other, the listener never reports receiving the "Hello World" topic.
On RaspberryPi ROSbot running the talker, "ss -tulw" reports:
pi@ROSbot:~$ ss -tulw
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
icmp6 UNCONN 0 0 *%wlan0:ipv6-icmp *:*
udp UNCONN 0 0 0.0.0.0:7400 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:7412 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:7413 0.0.0.0:*
udp UNCONN 0 0 127.0.0.1:58641 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:34723 0.0.0.0:*
udp UNCONN 0 0 127.0.0.53%lo:domain 0.0.0.0:*
udp UNCONN 0 0 10.0.0.11%wlan0:bootpc 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.1:45585 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.53%lo:domain 0.0.0.0:*
tcp LISTEN 0 128 0.0.0.0:ssh 0.0.0.0:*
tcp LISTEN 0 128 [::]:ssh [::]:*
tcp LISTEN 0 100 *:8888 *:*
and the ROS2 virtual machine reports:
ubuntu@rosdesk:~$ ss -tulw
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
icmp6 UNCONN 0 0 *:ipv6-icmp *:*
udp UNCONN 0 0 127.0.0.1:39592 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:60176 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:7400 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:7412 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:7413 0.0.0.0:*
udp UNCONN 0 0 127.0.0.53%lo:domain 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:37045 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:631 0.0 ...
Can you try running the multicast test as listed here: https://docs.ros.org/en/foxy/Guides/I...
I wonder if there is something in the VM network driver.
multicast worked one-way: to the VM only.
I performed the sudo ufw commands substituting my local net 10.0.0.0/4 not 224.0.0.0/4 - correct? No change in send from VM no RX on ROSbot
Is the VM configured with a bridged network adaptor? Or a host-only? Or a NAT one?
Wow - hope and then hopes dashed. @gvdhoom - tried both bridged ethernet and bridged WiFi - does not fix.
What should I check on WiFi router? I'm wondering if something there is blocking DDS - it is strange that the multicast test works only one way.
Thought I had it by setting optional: false in /etc/netplan/50-cloud-init.yaml - booted 7 times with ping, ssh, and DDS success. Went to celebrate. Came back and couldn't ssh in first boot. Too much to solve.