Which xml_rpc call performs rostopic list?
I want to dynamically publish from a cpp node to some only subscribed topics in a namespace. I tried to retrieve those topics using ros::master::getTopic
, but noted that it does not find them. rostopic list
showed them properly. Which first sounded strange to me, was caused by ros::master::getTopic
internally calling the xmlrpc call "getPublishedTopics"
which does not return the topcis that are only subscribed. I found that xmlrpc "getTopicTypes"
also lists the topics I am interested in but it still lists them when the nodes are shut down, i. e. the topics are no longer subscribed (Which rostopic list does not). This leads to my question, which xmlrpc call is executed by rostopic list
? (Didn't find it in the src code...) Moreover, is there a list of xmlrpc call you can execute on the master? In my case I would be interested in something like "getSubscribedTopics", but executing this failed for me....
Just for my understanding: "dynamically publish .. only subscribed topics".
Publisher::getNumSubscribers(..)
seems to be able to return that information, so it's a bit unclear why you'd want to interrogate the master directly.I want to set up the publisher for that topic where a subscriber has yet been set up but no publisher has yet been created for.... I request the master for getting the topic name, of that "orphan" subscriber..