ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

FastRTPS Topic & ROS2 Topic list

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

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
2

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

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

Comments

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 -0500 )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 http://design.ros2.org/articles/topic... 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 -0500 )edit

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

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

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

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:

https://github.com/ros2/rclpy/blob/60...

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

import rclpy
rclpy.init()
node = rclpy.create_node('list_all_topics_example')
print(node.get_topic_names_and_types(no_demangle=True))
edit flag offensive delete link more

Comments

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

Thanks!

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

Super cool... Thank you for the script!

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

Question Tools

1 follower

Stats

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

Seen: 1,716 times

Last updated: Jun 21 '18