Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

For get_nodes_name yu can use ros::master::getNodes. But there is no full C++ API for rosnode as it is written in python. E. g. the src of rosnode ping can be found here:

But if you have to use C++ for your node it's still no problem because all rosnode methods in the end just perform plain vanilla xml_rpc calls to the Master or the node slaves. E. g. rosnode ping just performs the xml_rpc call get_pid . The ros Master and slave xml_rpc APIs are documented here:

xml_rpc is available in C++, too. As an example for its usage see e. g. the the implementation of ros::master::getNodes: