Skip to content

Commit

Permalink
fix to bt action server logging before bt execution result being ready
Browse files Browse the repository at this point in the history
Signed-off-by: DreamWest <[email protected]>
  • Loading branch information
DreamWest committed Sep 15, 2024
1 parent b71cccd commit 60f1962
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,18 +312,18 @@ void BtActionServer<ActionT>::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;
}

Expand Down

0 comments on commit 60f1962

Please sign in to comment.