rostopic info /topic/name and nodelets
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?
What do you mean by "actual ones subscribed" ? The output tells you that the
nodelet_manager1
publish data on the topic and thennodelet_manager2
,nodelet_manager3
andreal/actual/node
will have their own callback function called. They all get the data published bynodelet_manager1
.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.
To clarify things : Are your
/nodelet_manager1
and/nodelet_manager2
two different nodelets under thenodelet_manager
or are they two differentnodelet_manager
containingnodelets
?Then instead of
rostopic info
you should userosnode info
to have the correct topics.So you should see #q208574 to use the
rosnode
API in C++.Same frustration for 10 years now :) https://answers.ros.org/question/1001...