ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

FastRTPS Topic & ROS2 Topic list

asked 2018-06-21 09:55:24 -0600

Kei gravatar image

Hi, All.

When using the HelloWorld example of the C++ example in ROS2, it appears in the node list, but not in the topic list. Of course, when node_demos_cpp is used, it appears in the Topic list.

But I would like to use another DDS topic other than ROS2. (E. G., Using microRTPS, FastRTPS, etc.) Is there anything I have to do separately?

Does not the topic list of ROS2 fetch the topic list registered in DDS?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-06-21 10:35:44 -0600

Dirk Thomas gravatar image

Can you please link to the example you are referring to or share the code. Otherwise it is unclear what are a referencing.

Yes, it is supposed to show all ROS 2 specific DDS topics. But it doesn't show all native DDS topics.

edit flag offensive delete link more


Thanks for your answer!

Can you tell me the difference between ROS2 specific DDS topics and native DDS topics? Are the ROS2 specific DDS topics such as std_msgs in ROS2?

Kei gravatar image Kei  ( 2018-06-21 10:48:40 -0600 )edit

The referenced example is not from ROS 2 but from FastRTPS - it doesn't contain any ROS specific code an won't appear in the ROS topic list. Please see how ROS topic names are represented in DDS. Only those are reported by ros2 topic.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-06-21 11:08:50 -0600 )edit

Oh, thank you! The link you gave me was a great help :)

Kei gravatar image Kei  ( 2018-06-21 11:16:31 -0600 )edit

answered 2018-06-21 13:48:56 -0600

William gravatar image

Just FYI, the ros2 topic command is not capable of this right now, but you can use ROS 2 to list all topics even the ones not formatted as ROS 2 topics. See the Node.get_topic_names_and_types() method in rclpy has a no_demangle option:

Here's a short Python script that should list all topics, even non-ROS 2 ones:

import rclpy
node = rclpy.create_node('list_all_topics_example')
edit flag offensive delete link more


Cool! It can check native DDS topics! It has really been a lot of help :)


Kei gravatar image Kei  ( 2018-06-21 18:53:57 -0600 )edit

Super cool... Thank you for the script!

mhallak gravatar image mhallak  ( 2020-07-21 09:59:49 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-06-21 09:55:24 -0600

Seen: 1,476 times

Last updated: Jun 21 '18