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

Extending ActionServer with Pausing capabilities #109

Open
jr-bor opened this issue Jul 6, 2018 · 0 comments
Open

Extending ActionServer with Pausing capabilities #109

jr-bor opened this issue Jul 6, 2018 · 0 comments

Comments

@jr-bor
Copy link

jr-bor commented Jul 6, 2018

I have a doubt that hopefully you can help me with 😄

Use case: I have an action_1 running (e.g. DoDishes) and, while performing, I want to perform another action_2 (e.g. pick up the phone).

As far as I can think about it, a way of implementing this with the SimpleActionServer it would be to create two of these. When the second option wants to be executed, I cancel action_1, execute action_2 and, when done, I start action_1 again. This would do the trick for most of the cases.

However, there are some cases where the action_1 might has critical information that we don't want to loose (e.g. number of plates cleaned) and here is might problem. I could store this critical information in the client but it would be sort of a patch to the root problem. So far, the state machine imposed by action_server.h does not contemplate a "Paused" state. Thus it does not provide client-side methods like setPaused, setActive.

If this makes sense, I was wondering what would be the necessary steps to make this happen and I foresee this as:

  • Extend common_msgs/actionlib_msgs to have a Paused state
  • Extend action_sever.h to have a two new subscribers as "pause" and "resume" to handle the new interactions with the Active state.
  • Extend both python and cpp client implementation to add the setPaused and setActive methods that easy the job.

In some sense, it tackles a design problem of actionlib which is a bi-directional interaction of the process, but for a very simple (and generic) application which is pausing and resuming the action. I think this might be a useful feature for some applications like contextual navigation (imagine a cleaning robot that while cleaning comes across with a dirty spot, cleans it, and resumes the previous job), but maybe this can be achieved in a simpler way that I cannot see 😛

Thanks for the help!

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