-
Notifications
You must be signed in to change notification settings - Fork 80
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
Fix bond handling during nodelet unloading #51
Conversation
nice catch! tested locally and it works just fine, all nodelets are unloaded properly. Thanks for the contribution! |
What is the definition of a nodelet being unloaded properly? |
… to work During shutdown, the bonds still need to communicate their status in order for the nodelet to properly/cleanly/quickly unload. This requires the node to spin.
This avoids the nodelet::LoaderROS::unload() method to be called twice for the same nodelet, causing an error output.
@mikaelarguedas I added tests for my changes. I don't think it is necessary to add a test for multiple nodelets for these, as the issues are reproducable with single nodelets, too (though "success" for the proper bond handling is a bit hard to check for right now, basically it is not getting a certain DEBUG output). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dseifert Thanks for adding the tests, multiple nodelets unloading was not tested before and this PR definitely improves of the unloading behaviour regardless of the number of nodelets. So I'm in favor of merging it.
Thanks for the contribution
thanks for the detailed explanation @dseifert, really helpful! Just curious, why is single-threaded |
This fixes points 2 and 3 of #50 and introduces two changes:
unload()
again.nodelet load
uses an ASyncSpinner in order to handle bond communication during shutdown.