Skip to content

Commit b505bc6

Browse files
committed
[STEERING] Add missing tan call for ackermann
Signed-off-by: Quique Llorente <[email protected]>
1 parent b245155 commit b505bc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

steering_controllers_library/src/steering_odometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ bool SteeringOdometry::update_from_velocity(
148148
steer_pos_ = (right_steer_pos + left_steer_pos) * 0.5;
149149
double linear_velocity =
150150
(right_traction_wheel_vel + left_traction_wheel_vel) * wheel_radius_ * 0.5;
151-
const double angular_velocity = steer_pos_ * linear_velocity / wheelbase_;
151+
const double angular_velocity = tan(steer_pos_) * linear_velocity / wheelbase_;
152152

153153
return update_odometry(linear_velocity, angular_velocity, dt);
154154
}

0 commit comments

Comments
 (0)