-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Only allow one spin_until_future_complete at a time #804
Only allow one spin_until_future_complete at a time #804
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error can be reproduced most of the time by making DWB fail. The DWB fail was not propagated successfully and the behaviour tree was still ticking ComputePathToPose
.
I tested the PR and solves this problem. The DWB fail is propagated correctly and navigation fails as it should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -165,7 +171,10 @@ class BtActionNode : public BT::AsyncActionNode | |||
if (status() == BT::NodeStatus::RUNNING) { | |||
action_client_->async_cancel_goal(goal_handle_); | |||
auto future_cancel = action_client_->async_cancel_goal(goal_handle_); | |||
rclcpp::spin_until_future_complete(node_, future_cancel); | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semantics, but this is right before leaving the scope of the if
, so the additional scoping for the lock isn't required
Description