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