Skip to content

Commit f8ab5b4

Browse files
Fix SteeringOdometry calculation error (backport #1777) (#1778)
Co-authored-by: Narukara <[email protected]>
1 parent ad3913f commit f8ab5b4

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

177177
double linear_velocity = get_linear_velocity_double_traction_axle(
178178
right_traction_wheel_vel, left_traction_wheel_vel, steer_pos_);
179-
const double angular_velocity = steer_pos_ * linear_velocity / wheelbase_;
179+
const double angular_velocity = std::tan(steer_pos_) * linear_velocity / wheelbase_;
180180

181181
return update_odometry(linear_velocity, angular_velocity, dt);
182182
}

0 commit comments

Comments
 (0)