File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
behaviortree_ros2/include/behaviortree_ros2 Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -427,6 +427,7 @@ template<class T> inline
427
427
template <class T > inline
428
428
void RosActionNode<T>::cancelGoal()
429
429
{
430
+ auto future_result = action_client_->async_get_result (goal_handle_);
430
431
auto future_cancel = action_client_->async_cancel_goal (goal_handle_);
431
432
432
433
if (callback_group_executor_.spin_until_future_complete (future_cancel, server_timeout_) !=
@@ -435,6 +436,13 @@ template<class T> inline
435
436
RCLCPP_ERROR ( node_->get_logger (), " Failed to cancel action server for [%s]" ,
436
437
prev_action_name_.c_str ());
437
438
}
439
+
440
+ if (callback_group_executor_.spin_until_future_complete (future_result) !=
441
+ rclcpp::FutureReturnCode::SUCCESS)
442
+ {
443
+ RCLCPP_ERROR ( node_->get_logger (), " Failed to get result call failed :( for [%s]" ,
444
+ prev_action_name_.c_str ());
445
+ }
438
446
}
439
447
440
448
You can’t perform that action at this time.
0 commit comments