From 9b1712f46464ed044c3a9be7c33754c0624a3295 Mon Sep 17 00:00:00 2001 From: Quique Llorente Date: Mon, 6 May 2024 10:50:13 +0200 Subject: [PATCH] [STEERING] Add missing tan call for ackermann Signed-off-by: Quique Llorente --- steering_controllers_library/src/steering_odometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steering_controllers_library/src/steering_odometry.cpp b/steering_controllers_library/src/steering_odometry.cpp index aadd047f2e..6f58927bf9 100644 --- a/steering_controllers_library/src/steering_odometry.cpp +++ b/steering_controllers_library/src/steering_odometry.cpp @@ -169,7 +169,7 @@ bool SteeringOdometry::update_from_velocity( steer_pos_ = (right_steer_pos + left_steer_pos) * 0.5; double linear_velocity = (right_traction_wheel_vel + left_traction_wheel_vel) * wheel_radius_ * 0.5; - const double angular = steer_pos_ * linear_velocity / wheelbase_; + const double angular = tan(steer_pos_) * linear_velocity / wheelbase_; return update_odometry(linear_velocity, angular, dt); }