From 771eca41bb7b6ad26856c434dd79e48a399c4601 Mon Sep 17 00:00:00 2001 From: DreamWest Date: Mon, 16 Sep 2024 06:27:19 +0800 Subject: [PATCH] fix to bt action server logging before bt execution result being ready (#4677) Signed-off-by: DreamWest --- .../include/nav2_behavior_tree/bt_action_server_impl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server_impl.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server_impl.hpp index 0944e7a3db2..d89fa990f54 100644 --- a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server_impl.hpp +++ b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server_impl.hpp @@ -312,18 +312,18 @@ void BtActionServer::executeCallback() switch (rc) { case nav2_behavior_tree::BtStatus::SUCCEEDED: - RCLCPP_INFO(logger_, "Goal succeeded"); action_server_->succeeded_current(result); + RCLCPP_INFO(logger_, "Goal succeeded"); break; case nav2_behavior_tree::BtStatus::FAILED: - RCLCPP_ERROR(logger_, "Goal failed"); action_server_->terminate_current(result); + RCLCPP_ERROR(logger_, "Goal failed"); break; case nav2_behavior_tree::BtStatus::CANCELED: - RCLCPP_INFO(logger_, "Goal canceled"); action_server_->terminate_all(result); + RCLCPP_INFO(logger_, "Goal canceled"); break; }