Ask Your Question

Which xml_rpc call performs rostopic list?

asked 2015-04-16 06:55:42 -0500

Wolf gravatar image

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....

edit retag flag offensive close merge delete


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.

gvdhoorn gravatar image gvdhoorn  ( 2015-04-16 07:09:39 -0500 )edit

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..

Wolf gravatar image Wolf  ( 2015-04-16 09:20:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-19 05:51:10 -0500

Wolf gravatar image

The xml_rpc list is here: . I guess rostopic list returns the topics of subscribers/publishers from getSystemState but not sure.... Should work for me ;)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-04-16 06:55:42 -0500

Seen: 136 times

Last updated: Apr 19 '15