Skip to content
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

Bonds cannot guarantee a termination notification to the other side #14

Open
stonier opened this issue Aug 31, 2016 · 0 comments
Open

Comments

@stonier
Copy link
Contributor

stonier commented Aug 31, 2016

At least for the rospy bonds. I haven't looked at the cpp bonds yet.

Relevant Code: the shutdown() method which publishes a message to the sister bond and then promptly unregisters the publisher.

Is there a way that can reliably guarantee that a terminating node can properly shutdown a bond without having to rely on the sister inferring it from a heartbeat that has gone missing?

Seems as though there are two difficulties with this:

  • publish(), followed immediately by unregister()...can this disrupt the sending?
  • If the bond is shutting down because it's node is shutting down (e.g. ctrl-c), then the call to shutdown() from __del__ may, or may not happen before the ros communications have shut down.

You could put the bond shutdown function in a rospy shutdown hook, but that is only guaranteed for services, not publishers. So the only way to do this properly is if sister bonds had a service that could accept a one-time request from the bond.

If this is actually not possible to guarantee with the current code, ideas? I wouldn't mind putting some time into a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant