Robotics StackExchange | Archived questions

How can ros2 know all topic information?

I'm just starting out with ros2.

I can obtain all topic information by using the "ros2 topic list" command. Q1. How can ros2 know all topic information? One of the ros2 application discovery all topics?

Q2. How can ros2 send messages dynamically? by building dynamic topic?? As far as I know, in order to exchange topic data, they need to know each other's specific types (IDL).

ex command) ros2 topic pub /chatter std_msgs/msg/String "{data: "Helloworld"}"

Could you also share the location of the source code related to this command?

Thank you in advance

Asked by keepgoingxxx on 2023-08-04 03:08:57 UTC

Comments

Answers

The tools are at https://github.com/ros2/ros2cli You can explore there to your hearts content.

Your questions are deep in the heart of the ROS2 + DDS middleware. I suggest you start your reading with ROS2 Concepts, and then ask more focused questions in this forum.

As worded your question sounds more like "teach me this". Start by reading the general ROS 2 documentation, and then ask specific clarifying questions related to that documentation and you are likely to get more responses here.

Good luck in your learning; ROS requires jumping in to deep water and can be overwhelming at first.

Asked by dcconner on 2023-08-04 09:37:39 UTC

Comments