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
#4677)

Signed-off-by: DreamWest <sirjamestsao@gmail.com>
  • Loading branch information
DreamWest authored and SteveMacenski committed Nov 8, 2024
1 parent a0e3287 commit d4642b1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,18 +260,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 d4642b1

Please sign in to comment.