From cedfd53c9c1e46e08e343dab49805ebf13983a97 Mon Sep 17 00:00:00 2001 From: stevedan Date: Mon, 25 Mar 2024 22:33:32 +0100 Subject: [PATCH] reset controller server back to previous state Signed-off-by: stevedan --- nav2_controller/src/controller_server.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nav2_controller/src/controller_server.cpp b/nav2_controller/src/controller_server.cpp index 85aae171cc..e5fdfbf133 100644 --- a/nav2_controller/src/controller_server.cpp +++ b/nav2_controller/src/controller_server.cpp @@ -419,7 +419,6 @@ void ControllerServer::computeControl() { std::lock_guard lock(dynamic_params_lock_); - auto start_time = this->now(); RCLCPP_INFO(get_logger(), "Received a goal, begin computing control effort."); try { @@ -483,9 +482,8 @@ void ControllerServer::computeControl() auto cycle_duration = this->now() - start_time; if (!loop_rate.sleep()) { RCLCPP_WARN( - get_logger(), - "Control loop missed its desired rate of %.4f Hz. Current loop rate is %.4f Hz.", - controller_frequency_, 1 / cycle_duration.seconds()); + get_logger(), "Control loop missed its desired rate of %.4fHz", + controller_frequency_); } } } catch (nav2_core::InvalidController & e) {