rclcpp_actions: Add preempted ResultCode for WrappedResult and preempt API for ServerGoalHandle
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
Bug report
Required Info:
- Operating System: Ubuntu 18
- Installation type: Source
- Version or commit hash: N/A
- DDS implementation: Fast RTPS
- Client library (if applicable): rclcpp_action
Feature request
Feature description
Right now, there's no good way to handle preemption in rclcpp_actions. In the navigation2 simple action server wrapper we set preemption to abort. The issue we face is that there's no way to differentiate between an abort caused by a true failure in the server (e.g. couldn't plan, couldn't move my forklift to N inches, etc) and an abort caused by a request for preemption.
This is important for the client to be able to distinguish why it received a result code. So I propose adding to the API a preempt() analog to abort() and returns to the client a rclcpp_action::ResultCode::PREEMPTED result code so we know why it returned for the case of a preemption.
Let me know your thoughts on this strategy. I can file some tickets in navigation2 and I can work with some folks to implement this if its something that would be merged into rclcpp_actions. We're in the middle of a discussion in a few tickets about how to work around for the short term.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the rclcpp_actions ResultCode, WrappedResult, and ServerGoalHandle APIs, along with the linked navigation2 simple action server wrapper and related navigation2 discussion. Define how preemption should be represented separately from abort, then determine the API and client-visible behavior needed for a complete proposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100