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

How to totally reset ROS

asked 2018-01-26 14:11:19 -0500

pitosalas gravatar image

I am experimenting with many different tutorials and from time to time I find that things start hanging up or getting stuck. So I kill all my terminal windows and jobs expecting to come back to a clean initial condition. Everything including ROSCORE. Everything that I am aware of of having started. But that doesn't seem to help, things still act a little strange. And in fact at that point (with all the terminal windows killed) if I do a ps -ax I see a number of processes still mentioning ../kinetic/...

However I have found that rebooting my computer altogether and then doing the tutorial again often does the trick. Ok, I know, computers can be like that.

Is there a way short of rebooting to basically kill all ROS related stuff?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-01-31 01:43:25 -0500

tfoote gravatar image

I'd recommend getting to know about process control on linux more generally. http://www.hostingadvice.com/blog/lin...

In particular I'd recommend being more careful about how you tear down things. If you're using roslaunch it will work hard to clean up everything if you let it. However if you kill roslaunch hard, it will not have a chance to clean up processes that it started which can leave a lot running on your system.

If you get into that state there are a lot of linux commands that can be used to clean up remant processes. At that point it's not really anything ROS specific but linux specific. It sounds like you already have the ability to find those processes. You will then want to kill them using their PID. The above link was the first I found on google. There are lots of other tutorials that may be useful to you.

edit flag offensive delete link more

Comments

1

Thanks, that's helpful. What's the "right" way to kill a roslaunch or rosrun app?

pitosalas gravatar image pitosalas  ( 2018-01-31 08:20:29 -0500 )edit
1

Press Ctrl-C and then wait for it to tear everything down.

tfoote gravatar image tfoote  ( 2018-01-31 12:24:50 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2018-01-26 14:11:19 -0500

Seen: 4,211 times

Last updated: Jan 31 '18