Gazebo | Ignition | Community
Ask Your Question

How to shutdown gazebo from a plugin?

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

AndreiHaidu gravatar image

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


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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

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

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 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


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

Seen: 2,336 times

Last updated: Jan 07 '15