ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Here is an example yaml file you can use to specify topic names to be connected to:
topics:
- topic1
- topic2
- topic3
- topic4
What you see here is a map with one key "topics", its value is a list with 4 string elements. That's pretty much all you need to know about yaml syntax to cover 90% use cases in ROS (both reading and writing config files).
To read those topic names in a ROS node using roscpp, see this page. Scroll all the way down to "Retrieving Lists".