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

Cancel active tasks #10

Closed
mxgrey opened this issue Mar 15, 2021 · 1 comment
Closed

Cancel active tasks #10

mxgrey opened this issue Mar 15, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@mxgrey
Copy link
Contributor

mxgrey commented Mar 15, 2021

Feature request

Cancel tasks that are already being performed.

Description

We should allow users to cancel tasks that have already been started.

Each Phase type already implements a cancel behavior, but there may be Task types whose state changes while completing phases, and that may complicate what it means to "cancel" the task. For example, what should be the behavior of canceling a Delivery Task after the robot has already picked up the item to deliver it? Should the robot return the item to its pickup location? Should the robot just finish the delivery? Should the robot bring it to some other discarding location?

Implementation considerations

To achieve robust cancellation behavior, we should have a way for the Task instance to generate new cancellation phases based on the current phase of the task. There are many ways this could be implemented, but the API that I would recommend is to change Task::cancel() to return a std::shared_ptr<Task> which contains a new Task instance that describes the steps a robot must complete to safely cancel its current task. If no steps are needed, then this could simply return a nullptr. When the return value is not null, then the returned task becomes the new active task of the robot.

@mxgrey mxgrey added the enhancement New feature or request label Mar 15, 2021
@mxgrey mxgrey added this to Fleet Management in Research & Development Mar 15, 2021
mxgrey pushed a commit that referenced this issue Apr 22, 2021
* support apis for task dispatcher

* append rmf_adapter.battery

* fix def_property for battery

* add dispatcher node to expand test scrips

* create a simple example for dispatcher node

* make loop and delivery test scripts work, compatible to task dispatcher

* fix test_adpater link in setup.py

* fix link on examples, update bindings according to feedbacks

* update rmf_battery bindings

* restructure pkg and clean setup.py

* fix typo

* update graph wp bind: is charger
@Yadunund
Copy link
Member

PR #168 adds support for cancelling tasks in any state.

Research & Development automation moved this from Fleet/Task Management to Done May 12, 2022
luca-della-vedova pushed a commit that referenced this issue Jan 10, 2023
* Added tsan mixin to workflow

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Using cmake-args flags instead of mixins

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Reverted build workflow, added new tsan workflow

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Missing empty space

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Removed redundant step in tsan workflow

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Modified based on rmf_traffic, added upload artifacts

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants