From ac43d07f854c5f1c3b608241a74ce5e4f4f26913 Mon Sep 17 00:00:00 2001 From: Ryuta Kambe Date: Thu, 20 Jun 2024 18:39:33 +0900 Subject: [PATCH] fix(autoware_mpc_lateral_controller): fix duplicateAssignExpression warning (#7572) Signed-off-by: Ryuta Kambe --- .../src/mpc_lateral_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control/autoware_mpc_lateral_controller/src/mpc_lateral_controller.cpp b/control/autoware_mpc_lateral_controller/src/mpc_lateral_controller.cpp index efa17e5236907..a42f6b7fc0d2d 100644 --- a/control/autoware_mpc_lateral_controller/src/mpc_lateral_controller.cpp +++ b/control/autoware_mpc_lateral_controller/src/mpc_lateral_controller.cpp @@ -524,7 +524,7 @@ bool MpcLateralController::isMpcConverged() // Find the maximum and minimum values of the steering angle in the past 1 second. double min_steering_value = m_mpc_steering_history[0].first.steering_tire_angle; - double max_steering_value = m_mpc_steering_history[0].first.steering_tire_angle; + double max_steering_value = min_steering_value; for (size_t i = 1; i < m_mpc_steering_history.size(); i++) { if (m_mpc_steering_history.at(i).first.steering_tire_angle < min_steering_value) { min_steering_value = m_mpc_steering_history.at(i).first.steering_tire_angle;