-
Notifications
You must be signed in to change notification settings - Fork 140
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
Deal with prior preemption and runaway child states. #37
base: indigo-devel
Are you sure you want to change the base?
Conversation
Hey, it would be great to get some input on this. |
I'm working on some of the smach backlog, but my current priority is finishing an rqt-smach gui. |
Would be possible to add to the development team a bit? We have a few relative smach experts in our project that might be able to verify this. |
Hey @jbohren any chance of adding some devs to smach so we can get PRs looked at? I could find some volunteers from my team if necessary. |
@hawesie Could you rebase to the latest |
Will do. |
This is necessary because a prior state may have failed to honour a preempt and thus it could be passed to us.
This is to handle cases where child states refuse to terminate. Providing a timeout value allows the concurrence to return that long after a termination event (preempt or child completion) has happened. If the argument is ommitted from the init method then the default behaviour (no timeout) is used.
Thanks for rebasing. Now CI passed, which indicates this PR might have not broken the package. |
@130s I understand. I'll add some tests, but it might take a week or two. |
Preempting a concurrence before executing child states might help to realize a specific application behavior, but it should be the users choice if he likes to have this and not mandatory. I think we should have a general discussion about a good preemption strategy. To me it seems that this pull request (and also the implementation of all ROS states) assumes, that the best strategy is to just leave everything as early as possible. For me the best strategy would be, to leave with as much control by the user as possible. So the concurrence now will just leave before executing the child sates. But maybe the child states |
This PR adds two functionalities to Concurrence to deal with error cases during execution:
Check for preemption before executing child states. This is necessary because a prior state may have failed to honour a preempt and thus it could be passed to us.
Addition of timeout on termination of child states. This is necessary if a child state refuses to preempt or terminate. The use of a timeout prevents the whole state machine freezing at that point.