0
$\begingroup$

Gazebo Answers logo

Hi,

how would one safely terminate gazebo from a plugin?

Calling gazebo::shutdown() kills it but not in a nicely fashion (errors appear in the terminal)

Thanks, Andrei


Originally posted by AndreiHaidu on Gazebo Answers with karma: 2108 on 2014-09-25

Post score: 0


Original comments

Comment by Georg Bartels on 2015-01-07:
Excellent question! I called gazebo::shutdown() from the UpdateCallback(...) of a ModelPlugin and it left the simulation in a frozen state without terminating gazebo. I can still press the buttons in the menu. Is this the intended behavior? (Ubuntu 12.04, Gazebo 4.1.0)

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Try sending a SeverControl message to the /gazebo/server/control topic where the message has "stop" set to true.


Originally posted by nkoenig with karma: 7676 on 2015-01-07

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Georg Bartels on 2015-01-09:
This worked nicely for me, i.e. when starting the simulation with gzserver it terminates cleanly after the message was send. When started with gazebo, the server terminates cleanly and the gui remains. Thanks a lot! EDIT: I'd like to up-vote your answer but I do not have enough karma..

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.