Home | Tutorials | Wiki | Issues
Ask Your Question

How to shutdown gazebo from a plugin?

asked 2014-09-25 07:44:45 -0500

AndreiHaidu gravatar image

updated 2015-01-07 02:23:00 -0500


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

edit retag flag offensive close merge delete


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)

Georg Bartels gravatar imageGeorg Bartels ( 2015-01-07 08:30:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-01-07 09:37:26 -0500

nkoenig gravatar image

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

edit flag offensive delete link more


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..

Georg Bartels gravatar imageGeorg Bartels ( 2015-01-09 03:02:39 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-09-25 07:44:45 -0500

Seen: 1,875 times

Last updated: Jan 07 '15