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

Check error flags when canceling an action task #19

Merged
merged 8 commits into from
Jul 31, 2024

Conversation

jonipol
Copy link
Contributor

@jonipol jonipol commented Jul 24, 2024

Adds check for the error flags present in the CancelGoal.Response message which we receive when canceling an action goal. Checking flags ERROR_UNKNOWN_GOAL_ID and ERROR_GOAL_TERMINATED to avoid falsely claiming a failure of cancellation if the goal is no longer valid (for example a case where the action server had restarted during the execution of a previous task and now a new task has been given).

Also added a simple mypy config.

Next future improvement in this regard will be to monitor the connection to the server during task execution. This could give more flexibility to some of the hard coded timeout limits for example. Also should work nicely for the service tasks as well.

jonipol added 3 commits July 24, 2024 17:17
Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi>
Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi>
Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi>
@jonipol jonipol requested review from Jannkar and tanelikor July 24, 2024 14:29
jonipol added 2 commits July 24, 2024 17:35
Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi>
Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi>
Copy link
Member

@tanelikor tanelikor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! Left some minor cleanup-type comments and suggestions.

task_manager/task_manager/task_client.py Outdated Show resolved Hide resolved
task_manager/task_manager/task_client.py Outdated Show resolved Hide resolved
task_manager/task_manager/task_client.py Outdated Show resolved Hide resolved
task_manager/task_manager/task_client.py Show resolved Hide resolved
Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi>
Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi>
Copy link
Member

@tanelikor tanelikor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my side!

Copy link
Collaborator

@Jannkar Jannkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice! Great to have these cases also covered 👌

task_manager/task_manager/task_client.py Show resolved Hide resolved
@jonipol jonipol merged commit cc88675 into main Jul 31, 2024
1 check passed
@jonipol jonipol deleted the check-error-flags-when-canceling branch July 31, 2024 10:28
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

Successfully merging this pull request may close these issues.

3 participants