|
|
|
@ -79,8 +79,9 @@ class CarController: |
|
|
|
|
# EPS uses the torque sensor angle to control with, offset to compensate |
|
|
|
|
apply_angle = actuators.steeringAngleDeg + CS.out.steeringAngleOffsetDeg |
|
|
|
|
|
|
|
|
|
# If the EPS output torque is above the limit, force the requested |
|
|
|
|
# angle to lower at the max allowed rate |
|
|
|
|
# If the EPS output torque is above the limit, wind down the last |
|
|
|
|
# requested angle until it's under the limit again |
|
|
|
|
if abs(CS.out.steeringTorqueEps) > MAX_STEER_TORQUE: |
|
|
|
|
angle_down_limit = interp(CS.out.vEgo, self.params.ANGLE_RATE_LIMIT_DOWN.speed_bp, |
|
|
|
|
self.params.ANGLE_RATE_LIMIT_DOWN.angle_v) |
|
|
|
|
max_torque_angle_mod = interp(abs(CS.out.steeringTorqueEps), |
|
|
|
|