Obtain list of ros node name without calling ros::init

asked 2019-03-27 03:10:42 -0500

firesurfer gravatar image

Hi, i'd like to check the list of ros nodes whether a certain name already exists prior to initalising my local node (Avoiding using the same name). Is this somehow possible? The only way I could think of yet is to run "rosnode list" and parse the output in my program. But that is kind of ugly.

edit retag flag offensive close merge delete


The Master exposes an XML-RPC server that is used for every interaction with it.

You could use that to see whether a particular name has already been registered.

Edit: I know this is a vague comment, so I'll leave #q271776 here as an example of how this could be done using Python and various parts of other ROS Python libraries.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-27 04:15:01 -0500 )edit