Robotics StackExchange | Archived questions

ros2 topic empty with fastdds discovery server

Hello, I followed this tutorial to set up a discovery server for ros2. The talker and listener examples all worked fine.

However, when it came to

ros2 topic list
and
ros2 node list
which were not part of the tutorial exactly, I did not find any nodes or topics. I exported the Server as follows in every terminal session:
export ROSDISCOVERYSERVER=127.0.0.1:11811

It seems like this is enough for talker and listener nodes to find each other, but not for ros2 command line tools. Also, rqt did not show any nodes or topics either. Command line tools and rqt work fine with standard discovery.

Is there anything else I need to do for ros2 topic list to show the /chatter topic?

Asked by highmax1234 on 2021-03-02 03:43:35 UTC

Comments

I have the same issue on the same computer and on a remote computer.

Asked by mechatronics3d on 2021-04-21 19:16:35 UTC

Answers

I do not know exact mechanics of daemon caching data, but I sometimes see incomplete or even empty ros2 topic list, ros2 node list and ros2 param list.

Running with --no-daemon option or after ros2 daemon stop usually shows all data (topics, params, etc.)

Asked by volume_8091 on 2021-03-16 08:02:46 UTC

Comments

The corresponding issue mentions this question and can be followed under this link: https://discourse.ros.org/t/discovery-problems-with-the-discovery-server/19900

To sum it up, there currently is a rather complicated XML-way to make CLI-Tools work on foxy, but the next patch should make it work without that workaround.

This outlook together with https://answers.ros.org/question/373070/ros2-topic-empty-with-fastdds-discovery-server/?answer=374083#post-id-374083 should be enough to consider the topic done.

Asked by highmax1234 on 2021-05-11 15:18:10 UTC

Comments

I encounter the same behavior as described in the original question in May 2022 on ROS2 Galactic. Has this issue been fixed only for ROS2 Foxy? I followed the solution outlined here, but the discovery server crashes upon startup.

Asked by Georg Bartels on 2022-05-23 12:25:59 UTC