ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Can I clear all topics after I kill all nodes?

asked 2012-08-06 23:42:56 -0500

bobliao gravatar image

I have kill all nodes by :rosnode kill -a however, when I type: rostopic list a list of topics are there ,so Can I remove the topics created before?

waiting for answers,thanks!

edit retag flag offensive close merge delete


Have you verified all nodes are gone via rosnode list afterwards? -- I regularly end up with zombie nodes and their topics, too, and the only way I found to get rid of them is restarting the roscore.

felix k gravatar image felix k  ( 2012-08-07 23:25:00 -0500 )edit

How to restart roscore?

bobliao gravatar image bobliao  ( 2012-08-09 03:00:23 -0500 )edit

Alternatively, you can do a rosnode cleanup. It will try to ping all nodes that are registered at the core and remove them if they are not running.

Lorenz gravatar image Lorenz  ( 2012-08-09 03:20:03 -0500 )edit

@Lorenz Great find, assuming it works. But why isn't there any documentation about this subcommand?

felix k gravatar image felix k  ( 2012-08-13 05:19:24 -0500 )edit
Lorenz gravatar image Lorenz  ( 2012-08-13 05:28:30 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2012-08-07 00:45:42 -0500

dornhege gravatar image

I guess it's only the /rosout topics? Those come from roscore, so all non-core topics are gone.

If others are left, the node might either be still running or the master hasn't realized it's gone properly.

edit flag offensive delete link more



There's a hidden command rosnode cleanup which might clear the extra state.

tfoote gravatar image tfoote  ( 2012-09-15 13:54:40 -0500 )edit

answered 2015-01-08 20:48:50 -0500

bluefolder54 gravatar image

rosnode cleanup

edit flag offensive delete link more

answered 2012-08-09 03:01:46 -0500

bobliao gravatar image

updated 2012-08-09 03:02:21 -0500

Here,I list my operation:bobliao@bobliao-ro:~$ rosnode list




bobliao@bobliao-ro:~$ rosnode kill audio_play

killing /audio_play


bobliao@bobliao-ro:~$ rosnode kill turtlebot_node

killing /turtlebot_node


bobliao@bobliao-ro:~$ rosnode list




why i can't kill these nodes?

edit flag offensive delete link more



Please don't create new answers that are not answering anything. Please edit your original question instead. This is not a forum.

Lorenz gravatar image Lorenz  ( 2012-08-09 03:20:45 -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


Asked: 2012-08-06 23:42:56 -0500

Seen: 8,722 times

Last updated: Aug 09 '12