ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
7

Get list of running nodes

asked 2014-05-14 04:14:47 -0600

Hendrik Wiese gravatar image

updated 2016-07-28 01:55:22 -0600

Hi guys,

is there a way to retrieve a list of all running nodes from within a node (rospy preferably)? I've already taken a look at rosgraph.masterapi. It seems appropriate but pretty complex. Is there an easier way than to dismantle the getSystemState call result?

Thanks a lot!

Cheers, Hendrik

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
13

answered 2014-05-14 05:19:28 -0600

import rosnode
rosnode.get_node_names()

More detail in the rosnode API reference.

edit flag offensive delete link more

Comments

Ah, missing the forest for the trees... Thanks, pal!

Hendrik Wiese gravatar image Hendrik Wiese  ( 2014-05-14 23:06:37 -0600 )edit

anything for c++

james P M gravatar image james P M  ( 2021-10-12 02:27:03 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-05-14 04:14:47 -0600

Seen: 10,300 times

Last updated: May 14 '14