Gazebo | Ignition | Community
Ask Your Question

URGENT!Gazebo Not Respond after Deleting models!

asked 2016-08-05 02:55:10 -0600

winston gravatar image

updated 2016-08-14 07:53:11 -0600

I write a model plugin for my soccer-playing robot. I can successful spawn it into my simulation world. However, when I delete this model, the model is removed from the world, but then Gazebo does not respond anymore. I click everywhere and nothing happens. So I have to Ctrl-C in the terminal and it throws out a message like this:

[gazebo-2] killing on exit
gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::msgs::Response; typename boost::detail::sp_member_access<T>::type = gazebo::msgs::Response*]: Assertion `px != 0' failed.
[gazebo_gui-3] escalating to SIGTERM
[gazebo-2] escalating to SIGTERM
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete

I am using Gazebo 7 with gazebo_ros_pkgs. Indeed I use ROS in my model plugin. But does it matter?

Any suggestions would be greatly appreciated!

EDIT: I need the answer to this question eagerly. So please anyone give me some advice.

edit retag flag offensive close merge delete


I would try to isolate the problem a bit more, at this point the description is too general. Try launching Gazebo with and without ROS, try deleting the model with and without the plugin, remove parts of the model...

chapulina gravatar imagechapulina ( 2016-08-07 16:53:22 -0600 )edit

Without the plugin, the deletion of the models is successful. I think the problem is in ROS but I don't know which part.

winston gravatar imagewinston ( 2016-08-14 07:54:47 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-16 04:36:11 -0600

winston gravatar image

I found out the answer now. The problem is in the destrctor. I should shutdown the ROS node before the thread terminates. Otherwise, the message and service threads would never terminate since its termination signal is when ros::ok() fails. Therefore, the solution is quite simple, put rosnode_->shutdown() before threads join() function are called.

edit flag offensive delete link more


winston, seems you are from nubot ! Im from MinhoTeam (Portugal). It seems that we are making the same thing, a simulator for our teams ! We can share stuff, please contact me @ !

wicked88 gravatar imagewicked88 ( 2016-08-16 21:50:25 -0600 )edit

Nice to meet you. I will contact you.

winston gravatar imagewinston ( 2016-08-17 03:15:34 -0600 )edit

Question Tools

1 follower


Asked: 2016-08-05 02:55:10 -0600

Seen: 700 times

Last updated: Aug 16 '16