ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
rosnode machine
will list the machines (ie: hosts) that the master knows about, and rosnode machine <hostname>
will list all nodes that run on a particular machine (ie: hostname).
As for how to do this with the Master API, take a look at how rosnode
does this internally, specifically the get_machines_by_nodes()
and get_nodes_by_machine()
methods (here).
If you're going to be using this often, consider that these methods incur quite some overhead:
This is a very costly procedure as it must do N lookups with the Master, where N is the number of nodes.