Robotics StackExchange | Archived questions

Subscribe to topic with a wildcard

Hi, I'm writing my own diagnostic node. I have multiple tasks that all publish a resource message, which contains information about CPU usage, RAM usage, etc to "task_name/resource" . I would like the diagnostic task to subscribe to every topic of this name. The way I plan on implenting this is to list all the topics published using getPublishedTopics(), search for the string "resource" and subscribe to those with the same callback. However I was wondering if there was a mechanism in place with the normal subscriber initialization to subscribe with a wildcard, something like "*/resource". If it matters I am writing in C++.

Thank you!

Asked by davidgitz on 2016-05-15 08:25:52 UTC

Comments

Answers