Ask Your Question
7

Get list of running nodes

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

Hendrik Wiese gravatar image

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

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 -0500

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 -0500 )edit

anything for c++

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 6,941 times

Last updated: May 14 '14