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

Creating publishers and subscribers based on a config file

asked 2011-10-29 07:37:35 -0500

I am creating a ROS bridge to an network of devices (think serial network). The serial network connection must be managed by a single process (i.e. a single interface node). I would like to create a flexible bridge node that would allow for any configuration of devices on the serial network. As a result, I cannot hardcode topics the interface node will publish and subcribe to. One solution is to load a yaml file on startup that would specify the topics, but I have not seen this done before. Has anybody dynamically created multiple topics from a yaml file? Are there any issues with this approach? Is there a good example that I could look at?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-10-29 08:25:50 -0500

dornhege gravatar image

This should work without any problems. You can use the yaml file directly or alternately use it to load params and read out these params to create the topics.

For the creation topics are just strings that can come from anywhere.

edit flag offensive delete link more

Question Tools


Asked: 2011-10-29 07:37:35 -0500

Seen: 401 times

Last updated: Oct 29 '11