Subscribing to a message type regardless of the topic name
Is there a way to subscribe to all messages of a given type without knowing their topic names? It would be perfect, if the callback function could additionally see the related topic name.
My application: I would like to write a node, which is supposed to do some administrative work and therefor collects all sensor_msgs/CameraInfo messages from every camera on my robot. But I don't know how many cameras my robot has.
This question comes close to what I need, but I'd still have to maintain a list of all my cameras separately. Any ideas?