-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Check if goal_status_ is valid. #2305
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
Closed
tzskp1
wants to merge
6
commits into
ros-navigation:main
from
mk-system:simple_action_server_race_condition
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e95a229
Check if goal_status_ is valid.
tzskp1 d77e5b9
Get rid of unnecessarily check.
tzskp1 09d2ea9
Revert "Get rid of unnecessarily check."
tzskp1 cdcebf9
Reset goal_handle_ due to validation.
tzskp1 7877a12
guard condition of goal_handle_
tzskp1 d7beb71
Care of first tick
tzskp1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -232,6 +232,9 @@ class BtActionNode : public BT::ActionNodeBase | |
| } | ||
|
|
||
| setStatus(BT::NodeStatus::IDLE); | ||
| if (goal_handle_) { | ||
| goal_handle_.reset(); | ||
| } | ||
| } | ||
|
|
||
| protected: | ||
|
|
@@ -242,7 +245,7 @@ class BtActionNode : public BT::ActionNodeBase | |
| bool should_cancel_goal() | ||
| { | ||
| // Shut the node down if it is currently running | ||
| if (status() != BT::NodeStatus::RUNNING) { | ||
| if (status() != BT::NodeStatus::RUNNING || !goal_handle_) { | ||
| return false; | ||
| } | ||
|
|
||
|
|
@@ -266,7 +269,7 @@ class BtActionNode : public BT::ActionNodeBase | |
| // TODO(#1652): a work around until rcl_action interface is updated | ||
| // if goal ids are not matched, the older goal call this callback so ignore the result | ||
| // if matched, it must be processed (including aborted) | ||
| if (this->goal_handle_->get_goal_id() == result.goal_id) { | ||
| if (!this->goal_handle_ || (this->goal_handle_->get_goal_id() == result.goal_id)) { | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| goal_result_available_ = true; | ||
| result_ = result; | ||
| } | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.