How can I speed up the shutdown of gazebo with pr2_controler_manager? [closed]

asked 2011-09-28 11:29:30 -0500

updated 2011-09-28 12:01:04 -0500

When shutting down gazebo with I often get the following message:

[gazebo-2] killing on exit
[WARN] [WallTime: 1317250619.639809] [483.903000] Spawner couldn't reach pr2_controller_manager to take down controllers.

and then after about 10 seconds:

[gazebo-2] escalating to SIGTERM

Is there a way, other than just killing it with kill, to make gazebo go down more quickly?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-02-03 07:59:01

Comments

You could still maintain a clean shutdown if you type 'killall -9 gazebo' in a different terminal while the ctrl-c is waiting.
hsu gravatar image hsu  ( 2011-09-28 12:03:21 -0500 )edit
It looks like a new while loops are introduced, preventing shutdown (see this [ticket](https://code.ros.org/trac/ros-pkg/ticket/4882)). Is it possible for you to create a backtrace of the hanging code? thanks, John
hsu gravatar image hsu  ( 2011-09-28 12:25:00 -0500 )edit
I'll try to attach gdb to the relevant process when the hang happens and see what I get
Asomerville gravatar image Asomerville  ( 2011-09-28 13:27:54 -0500 )edit
No luck trying to catch any info from gazebo with gdb. I did track down that the message is coming from pr2_mechanism/pr2_controller_manager/scripts/Spawner though I'm not familiar enough with how they interact to understand why that would make a difference.
Asomerville gravatar image Asomerville  ( 2011-09-28 15:26:24 -0500 )edit
@Asomerville: I asked this question (http://answers.ros.org/question/2317/how-to-delay-escalation-to-sig-term-after-sending) which should help us debug this problem. thanks for trying.
hsu gravatar image hsu  ( 2011-09-28 19:06:15 -0500 )edit
@hsu I chased this into gazebo and noticed that there's a "setUserQuit" method that gets called on any signal and interrupts the server only if it's headless. Otherwise the "setUserQuit" method does nothing to the wx app loop from what I can tell.
Asomerville gravatar image Asomerville  ( 2011-10-11 13:37:56 -0500 )edit