Skip to content

Commit 702c9ca

Browse files
Narukaramergify[bot]
authored andcommitted
Fix SteeringOdometry calculation error (#1777)
(cherry picked from commit 2800f21)
1 parent 9c48a5d commit 702c9ca

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
@@ -180,7 +180,7 @@ bool SteeringOdometry::update_from_velocity(
180180

181181
double linear_velocity = get_linear_velocity_double_traction_axle(
182182
right_traction_wheel_vel, left_traction_wheel_vel, steer_pos_);
183-
const double angular_velocity = steer_pos_ * linear_velocity / wheel_base_;
183+
const double angular_velocity = std::tan(steer_pos_) * linear_velocity / wheel_base_;
184184

185185
return update_odometry(linear_velocity, angular_velocity, dt);
186186
}

0 commit comments

Comments
 (0)