-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A gazebo model which uses yarprobotinterface plugin crashes when the model is removed #582
Comments
At a first glance, indeed it seems that Gazebo stores the plugin shared pointers in
During model destruction, there is no attempt to destroy the plugin in reverse order w.r.t. to loading order: |
Probably just adding in Gazebo a for-loop that calls |
This is affecting stickBot, @Nicogene do you have any idea if someone ever complained about it? |
Nobody complained about it but it happens always I think. it's pretty deterministic |
Indeed it would be much better if I didn't have to restart both gazebo and the |
So you noticed it, right? This is not happening at the moment with normal icub models, but it may happen if we fix robotology/icub-models-generator#215 without first solving this problem, that why I am asking. |
Yeah I confirm that I noticed it upong model removal Everytime. |
I think I found a solution that does not require any modification in upstream Gazebo. Basically the |
This will be fixed by #582 . |
Fixed and released in https://github.com/robotology/gazebo-yarp-plugins/releases/tag/v4.3.0 . Note that you may need to wait for robotology/whole-body-estimators#146 if your model uses |
As discussed with @traversaro, the reason is probably due to the fact the low-level gazebo plugins are destroyed before yarprobotinerface plugins (i.e. a running NWS cannot access anymore the attached low-level plugin).
Instead, the correct order should be:
1- The user removes the model.
2- The yarprobotinterface plugin initializes the shutdown sequence.
3- All yarprobotinterface plugins are detached and destroyed.
4- The yarprobotinterface plugin is destroyed.
5- All other low-level gazebo plugins which run externally to yarprobotinterface are destroyed.
This hypothesis should be verified by checking in the gazebo source code the order in which the engine destroys its own plugins.
The text was updated successfully, but these errors were encountered: