ROS2 Fast-DDS Discovery Server

129 views
Skip to first unread message

camp .

unread,
May 7, 2024, 11:04:27 AM5/7/24
to HomeBrew Robotics Club

Mark Rose

unread,
May 7, 2024, 1:41:39 PM5/7/24
to hbrob...@googlegroups.com
One of the points of switching to DDS in ROS2 was the auto-discovery features in the UDP wire protocol. However, by default those rely on UDP multicasting. It's possible the network hardware "upgrades" you went through disabled UDP multicasting (which would not be an entirely unexpected change, possibly because of security concerns). It's disappointing to have to run a discovery server when DDS shouldn't need it. You might see if there is a setting to enable UDP multicasting, and see if things start working better.
 
I'm not that familiar with Fast-DDS since we don't use it in our project - our division has years of experience with RTI, long prior to ROS2 - but it may have features similar to RTI to configure the "peers" manually, avoiding the need for discovery for those peers. That might also eliminate the need to run a separate discovery server.


--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/1038234397.337693.1715094257895%40mail.yahoo.com.

camp .

unread,
May 7, 2024, 2:30:40 PM5/7/24
to hbrob...@googlegroups.com
    Oops, I meant to send this to myself (https://robofoundry.medium.com/how-to-setup-ros2-fast-dds-discovery-server-3843c3a4adec) regardless, I'm currently wrestling with it... setting up the Discovery Server that is.

    After modifying ".bashrc" on the user computer (workstation) and robot compute (Pi with LD06 lidar) with the below:

export ROS_DOMAIN_ID=0
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export ROS_DISCOVERY_SERVER=192.168.12.190:11811
export FASTRTPS_DEFAULT_PROFILES_FILE=~/super_client_configuration_file.xml

    And downloading the "Super Client XML Config file" into the home directory of the computer and Pi.

    I start with "ros2 daemon stop;ros2 daemon start;" on both systems (workstation and Pi).

    My User Computer (192.168.12.190) will be the "Discovery Server" so I launch "fastdds discovery -i 0 -l 192.168.12.190 -p 11811"

    After which I launch the LD06 launch file on the robot Pi; which publishes the /scan topic run "ros2 topic hz /scan" on the workstation it tells me "WARNING: topic [/scan] does not appear to be published yet." So... it doesn't even miss the message, it doesn't even detect it as being sent.

    I undo everything and launch the DL06 launch file and the /scan topics come through until I launch slam_toolbox or the localization launch file from nav2_bringup.

This will be the topic of discussion at the ROS Discussion Group this evening.

Thanks,
Camp

Marco Walther

unread,
May 7, 2024, 8:30:25 PM5/7/24
to hbrob...@googlegroups.com, camp .
On 5/7/24 11:30, camp . wrote:
>     Oops, I meant to send this to myself
> (https://robofoundry.medium.com/how-to-setup-ros2-fast-dds-discovery-server-3843c3a4adec <https://robofoundry.medium.com/how-to-setup-ros2-fast-dds-discovery-server-3843c3a4adec>) regardless, I'm currently wrestling with it... setting up the Discovery Server that is.
>
>     After modifying ".bashrc" on the user computer (workstation) and
> robot compute (Pi with LD06 lidar) with the below:
>
> export ROS_DOMAIN_ID=0
> export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
> export ROS_DISCOVERY_SERVER=192.168.12.190:11811
> export FASTRTPS_DEFAULT_PROFILES_FILE=~/super_client_configuration_file.xml
>
>     And downloading the "Super Client XML Config file" into the home
> directory of the computer and Pi.

Did you actually check, that this file is usable for your configuration?
The download link has the server listed on 127.0.0.1 and I believe,
there was also something with the 'prefix'?!

-- Marco
> mark...@acm.org <mailto:mark...@acm.org>
> 925.922.7263
>
>
>
> On Tue, May 7, 2024 at 8:05 AM camp . <ca...@camppeavy.com
> <mailto:ca...@camppeavy.com>> wrote:
>
> How to setup ROS2 Fast-DDS Discovery Server
> How to setup ROS2 Fast-DDS Discovery Server
> <https://robofoundry.medium.com/how-to-setup-ros2-fast-dds-discovery-server-3843c3a4adec>
>
>
>
>
>
>
> How to setup ROS2 Fast-DDS Discovery Server
>
> RoboFoundry
>
> If you have worked with ROS2 enough and tried to run your ROS2 nodes
> across multiple machines, like your host co...
>
> <https://robofoundry.medium.com/how-to-setup-ros2-fast-dds-discovery-server-3843c3a4adec>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/1038234397.337693.1715094257895%40mail.yahoo.com <https://groups.google.com/d/msgid/hbrobotics/1038234397.337693.1715094257895%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/CAFAtoD2qqhvemz3sUMbgN0iL8HQbjOW_CuKMRwHeOTM-d5BnBQ%40mail.gmail.com <https://groups.google.com/d/msgid/hbrobotics/CAFAtoD2qqhvemz3sUMbgN0iL8HQbjOW_CuKMRwHeOTM-d5BnBQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/1183495312.8061343.1715106633508%40mail.yahoo.com <https://groups.google.com/d/msgid/hbrobotics/1183495312.8061343.1715106633508%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

camp .

unread,
May 7, 2024, 8:55:58 PM5/7/24
to hbrob...@googlegroups.com
> The download link has the server listed on 127.0.0.1 and I believe, there was also something with the 'prefix'?!

Thanks, I see the localhost 127.0.0.1. I'll try changing that to the discovery server: 192.168.12.190. Don't know what the "prefix" is... too many digits for the MAC address.

Thanks,
Camp

To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/bc16776b-767d-473a-80e9-8f48ea6c03e2%40gmail.com.

camp .

unread,
May 7, 2024, 9:09:15 PM5/7/24
to hbrob...@googlegroups.com
Don't know what the "prefix" is... too many digits for the MAC address.

    The 12 byte prefix is the "GuidPrefix" and is apparently a key for the DomainParticipant used in the DDS domain.

camp .

unread,
May 8, 2024, 11:43:45 AM5/8/24
to hbrob...@googlegroups.com
    Thanks to Marco catching "localhost" in the "super_client_configuration_file.xml" file, we changed it to what we wanted to be the Discovery Server (192.168.12.190), and it works... sometimes. Like Simple Discovery, you must sometimes reset the network connection for the /scan topics to come through. For now, I'm taking the system (robot, computer, Pi) back to my Phone Hotspot, where the /scan message comes through consistently, and will return the TMobile 5G Gateway and ask for a replacement; recall I returned a previous one that did not have this problem. To be continued...

Thanks,
Camp

hipp...@gmail.com

unread,
May 8, 2024, 3:22:26 PM5/8/24
to HomeBrew Robotics Club
For the T-mobile gateway issue, you may connect a spare wifi AP/router to the RJ45 on the back of the T-mobile gateway. Set to a different SSID for ROS2/robots.

- Thomas
camp . 在 2024年5月8日 星期三上午8:43:45 [UTC-7] 的信中寫道:

hipp...@gmail.com

unread,
May 8, 2024, 3:22:30 PM5/8/24
to HomeBrew Robotics Club
Sorry, I forgot to mention the server IP in the super client xml. The super client is needed for the "ros2 topic" and "rqt" viewing only. Those nodes running nav2/slam/rviz do not need to become super clients.

Cheers,
Thomas
camp . 在 2024年5月8日 星期三上午8:43:45 [UTC-7] 的信中寫道:
    Thanks to Marco catching "localhost" in the "super_client_configuration_file.xml" file, we changed it to what we wanted to be the Discovery Server (192.168.12.190), and it works... sometimes. Like Simple Discovery, you must sometimes reset the network connection for the /scan topics to come through. For now, I'm taking the system (robot, computer, Pi) back to my Phone Hotspot, where the /scan message comes through consistently, and will return the TMobile 5G Gateway and ask for a replacement; recall I returned a previous one that did not have this problem. To be continued...

Thanks,
Camp

camp .

unread,
May 11, 2024, 1:11:52 PM5/11/24
to HomeBrew Robotics Club
    I got a Linksys router (MR5500) and literally applauded when I switched it on, connected the computer, the  Pi (lidar), and Create3 (robot), and got the robot nodes to appear when  running the "ros2 node list." *

    After launching slam_toolbox, I saw the scans THROUGH RVIZ! But alas, the /map topic would not come through. I set the system up as a Discovery Server, and the same symptom. I let it marinate over a day or two... (you laugh. I don't know what it is, some kind of caching or something time-dependent). **

    No map topic.

    My perseverance paid off when I  connected my new router to the TMobile 5G Gateway (not just local wifi). Miraculously, the map started coming through (HALLELUJAH!). However, this victory was short-lived as the map only appeared briefly (still better than not at all). The "hz" reading was 0.200, far from the desired 5.000. ***

    Noticed the "OccupancyGrid" subscriber was "RELIABLE" Quality of Service (QoS)... changed it to "BEST_EFFORT"... no diff.

I will keep you posted.
Thanks
Camp

*  Recall when we last left off the /scan topic would disappear from the workstation when slam_toolbox or the localization routine were launched.

** With Internet using "sudo ntpd server pool.ntp.org" otherwise tying it to the user workstation's IP.

*** No idea why connecting to the Internet (modem) would make this difference. It should pass the messages fine with just a local wifi.


hipp...@gmail.com

unread,
May 11, 2024, 6:13:26 PM5/11/24
to HomeBrew Robotics Club
1. check the wifi signal with 'iwconfig', the rx signal level should be better than -65dBm. preferred above -60dBm.
eg. My laptop got "Link Quality=56/70  Signal level=-54 dBm"

2. check local network speed between the computers with 'iperf'

3. check internet speed with 'speedtest-cli'
sudo apt install speedtest-cli
speedtest-cli --secure

Recommended wifi router/ap: tp-link ax21. The wifi signal is very strong and stable.

Cheers,
Thomas


camp . 在 2024年5月11日 星期六上午10:11:52 [UTC-7] 的信中寫道:

Chris Albertson

unread,
May 11, 2024, 6:44:27 PM5/11/24
to hbrob...@googlegroups.com
I assume you have moved the WiFi router into the same room as the robot. You can determine if the problem is poor WiFi very quickly. Connect a long Ethernet cable between the robot and the router and turn off the WiFi. If this fixes the problem, you can blame WiFi and look for solutions. If the problem is still there then you have some kind of hardware limitation, you have run out of CPU, RAM, Buss bandwidth, or whatever. You will have to not send high bandwidth data. Perhaps write a filter node to reduce the data to 5%. After all, does Rviz really need to show every scan? Process the scans on the robot but keep the high bandwidth data off the WiFi

Most people do run robots in the lab via an ubilical cable that has DC power and data. This eliminates the problem of battery charging and WiFi.
Reply all
Reply to author
Forward
0 new messages