rostopic info /topic/name and nodelets

asked 2018-10-11 22:36:25 -0500

KenYN gravatar image

Running rostopic info /topic/name gives me output like:

Type: topic/Name

Publishers:
 * /nodelet_manager1 (http://...)

Subscribers:
 * /nodelet_manager2 (http://...)
 * /nodelet_manager3 (http://...)
 * /real/actual/node (http://...)

Using the C++ API, how can I drill down and find which nodelets within the three managers are the actual ones subscribed? Or can I instead develop a nodelet to query its nodelet manager to find out which nodelets actually publish and subscribe?

edit retag flag offensive close merge delete

Comments

What do you mean by "actual ones subscribed" ? The output tells you that the nodelet_manager1 publish data on the topic and then nodelet_manager2, nodelet_manager3 and real/actual/node will have their own callback function called. They all get the data published by nodelet_manager1.

Delb gravatar image Delb  ( 2018-10-12 02:08:26 -0500 )edit

I mean which actual nodelet - my managers can have up to 10 nodelets within them, so I wish to find out the actual nodelet, not merely the manager, that subscribes to the message.

KenYN gravatar image KenYN  ( 2018-10-12 02:51:17 -0500 )edit

To clarify things : Are your /nodelet_manager1 and /nodelet_manager2 two different nodelets under the nodelet_manager or are they two different nodelet_manager containing nodelets ?

Then instead of rostopic info you should use rosnode info to have the correct topics.

Delb gravatar image Delb  ( 2018-10-12 03:33:08 -0500 )edit

So you should see #q208574 to use the rosnode API in C++.

Delb gravatar image Delb  ( 2018-10-12 03:34:16 -0500 )edit

Same frustration for 10 years now :) https://answers.ros.org/question/1001...

stfn gravatar image stfn  ( 2019-08-13 14:12:53 -0500 )edit