Skip to content

Commit 1290540

Browse files
Update control/mpc_lateral_controller/src/steering_offset/steering_offset.cpp
Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
1 parent 9aae0a9 commit 1290540

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

control/mpc_lateral_controller/src/steering_offset/steering_offset.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ void SteeringOffsetEstimator::updateOffset(
3838

3939
if (!update_offset) return;
4040

41-
// calculate the steering angle needed to achieve the current rate of rotation given the current
42-
// velocity along the x-axis of the vehicle, under the below assumptions
43-
// (i.e., no slipping, no lag in the steering mechanism, etc.).
41+
// Assuming the yaw rate and speed are sufficiently accurate, we calculate the expected steering
42+
// angle for the current yaw rate and speed from the vehicle model. To ignore dynamic
43+
// characteristics such as steering delay or slip, estimation is performed only when the vehicle
44+
// is driving at high speed and the steering angle is close to zero position.
4445
const auto expected_steering_angle = std::atan2(twist.angular.z * wheelbase_, twist.linear.x);
4546
const auto steer_offset = measured_steering_angle - expected_steering_angle;
4647
steering_offset_storage_.push_back(steer_offset);

0 commit comments

Comments
 (0)