0
$\begingroup$

Rosanswers logo

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
  1. 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.0.0:*              
udp    UNCONN  0       0                                 0.0.0.0:mdns                   0.0.0.0:*              
udp    UNCONN  0       0                                    [::]:44486                     [::]:*              
udp    UNCONN  0       0         [fe80::79:fbba:db15:6c00]%ens33:dhcpv6-client             [::]:*              
udp    UNCONN  0       0                                    [::]:mdns                      [::]:*              
tcp    LISTEN  0       4096                        127.0.0.53%lo:domain                 0.0.0.0:*              
tcp    LISTEN  0       5                               127.0.0.1:ipp                    0.0.0.0:*              
tcp    LISTEN  0       5                                   [::1]:ipp                       [::]:*              

Ideas to try?

Update: It worked and then it didn't again:

Well - when you need some magic, update everything on both systems!

sudo apt-get update
sudo apt-get upgrade

Voila:

pi@ROSbot:~/rosbot-on-gopigo3$ ros2 run demo_nodes_cpp listener
[INFO] [1625930607.244627442] [listener]: I heard: [Hello World: 9]
[INFO] [1625930608.245326225] [listener]: I heard: [Hello World: 10]
[INFO] [1625930609.245479175] [listener]: I heard: [Hello World: 11]
[INFO] [1625930610.244978271] [listener]: I heard: [Hello World: 12]
[INFO] [1625930611.245139866] [listener]: I heard: [Hello World: 13]
[INFO] [1625930612.245483542] [listener]: I heard: [Hello World: 14]

ubuntu@rosdesk:~/handsonros2$ ros2 run demo_nodes_cpp listener
[INFO] [1625930576.490056884] [listener]: I heard: [Hello World: 1]
[INFO] [1625930577.489776977] [listener]: I heard: [Hello World: 2]
[INFO] [1625930578.489909352] [listener]: I heard: [Hello World: 3]
[INFO] [1625930579.489984629] [listener]: I heard: [Hello World: 4]
[INFO] [1625930580.489982903] [listener]: I heard: [Hello World: 5]
[INFO] [1625930581.490141665] [listener]: I heard: [Hello World: 6]

Magic.

BUT WHAT DO YOU DO WHEN IT STOPS WORKING AGAIN AND NOTHING TO UPDATE?

I guess I used up all my luck and magic. Tried again today and it's back to no worky!


Originally posted by RobotDreams on ROS Answers with karma: 327 on 2021-07-09

Post score: 1


Original comments

Comment by vinny on 2021-07-09:
Can you try running the multicast test as listed here: https://docs.ros.org/en/foxy/Guides/Installation-Troubleshooting.html#enable-multicast

I wonder if there is something in the VM network driver.

Comment by RobotDreams on 2021-07-09:
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

Comment by vinny on 2021-07-09:\

Comment by gvdhoorn on 2021-07-09:
Is the VM configured with a bridged network adaptor? Or a host-only? Or a NAT one?

Comment by RobotDreams on 2021-07-11:
Wow - hope and then hopes dashed. @gvdhoom - tried both bridged ethernet and bridged WiFi - does not fix.

Comment by RobotDreams on 2021-07-11:
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.

Comment by RobotDreams on 2021-07-11:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Currently, ROSbot Dave

has successfully booted up with full ssh, ping, arp, and ROS2 dynamic discovery Data Distribution System DDS working

  • 12 out of 12 attempts
  • since the change of 2.4GHz band WiFi access point
    • from the xFinity Technicolor CGM4331COM XB7 router
    • to my ancient DLink DIR-825 (last firmware released was 2013).

While I can say Carl and DeskPi have had fitful connections with the xFinity router(s), neither has shown the “cannot remote in” (ssh) issue that Dave exhibited, nor did I attempt distributed data messaging across the network when Carl was trying out ROS (1).

Carl has always been a Raspberry Pi 3B based GoPiGo3, but DeskPi was in fact using the exact Raspberry Pi 3B+ (plus) board that GoPiGo3 ROSbot Dave is running, except DeskPi has always run Raspbian/PiOS.

All these tests seem to point the finger at Ubuntu 20.04.2 on RaspberryPi 3B+ (or at least this particular 3B+) having unreliable ICMP, ARP, or UDP handling during the DHCP link establishment phase with the xFinity router configured with a reserved IPv4 address for the board’s WiFi MAC address.

I don’t know enough to be able to diagnose this deeper, and having found a solution that enables me to progress with my ROS2 learning (through migrating the “Hands On ROS for Robotic Programming” exercises), I am leaving this mystery of the universe unsolved.

I do have a new WiFi 6 router on order, (that has ongoing firmware update support), to minimize the chance my network will become a crypto-bot or participant in the next distributed denial of service attack on internet democracy.

Calling this success - Onward with ROS2

image description


Originally posted by RobotDreams with karma: 327 on 2021-07-13

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.