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

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

Comments

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
2

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
3

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

Comments

1

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
1

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

bluefolder54 gravatar image

rosnode cleanup

edit flag offensive delete link more
-1

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

/audio_play

/rosout

/turtlebot_node

bobliao@bobliao-ro:~$ rosnode kill audio_play

killing /audio_play

killed

bobliao@bobliao-ro:~$ rosnode kill turtlebot_node

killing /turtlebot_node

killed

bobliao@bobliao-ro:~$ rosnode list

/audio_play

/rosout

/turtlebot_node

why i can't kill these nodes?

edit flag offensive delete link more

Comments

1

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

Question Tools

1 follower

Stats

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

Seen: 9,634 times

Last updated: Aug 09 '12