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
427427template <class T > inline
428428 void RosActionNode<T>::cancelGoal()
429429{
430+ auto future_result = action_client_->async_get_result (goal_handle_);
430431 auto future_cancel = action_client_->async_cancel_goal (goal_handle_);
431432
432433 if (callback_group_executor_.spin_until_future_complete (future_cancel, server_timeout_) !=
@@ -435,6 +436,13 @@ template<class T> inline
435436 RCLCPP_ERROR ( node_->get_logger (), " Failed to cancel action server for [%s]" ,
436437 prev_action_name_.c_str ());
437438 }
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+ }
438446}
439447
440448
You can’t perform that action at this time.
0 commit comments