Skip to content

Commit

Permalink
[STEERING] Add missing tan call for ackermann
Browse files Browse the repository at this point in the history
Signed-off-by: Quique Llorente <[email protected]>
  • Loading branch information
qinqon committed May 6, 2024
1 parent 2a59f60 commit 9b1712f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion steering_controllers_library/src/steering_odometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9b1712f

Please sign in to comment.