hyundai: increase steering angle limit for custom eps fw (#19744)

* hyundai: increase steering angle limit for custom eps fw

* update commit_ref
pull/19757/head
Greg Hogan 4 years ago committed by GitHub
parent c28ba97e67
commit 2da6bb482e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/car/hyundai/carcontroller.py
  2. 9
      selfdrive/car/hyundai/interface.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -50,7 +50,7 @@ class CarController():
self.steer_rate_limited = new_steer != apply_steer self.steer_rate_limited = new_steer != apply_steer
# disable if steer angle reach 90 deg, otherwise mdps fault in some models # disable if steer angle reach 90 deg, otherwise mdps fault in some models
lkas_active = enabled and abs(CS.out.steeringAngle) < 90. lkas_active = enabled and abs(CS.out.steeringAngle) < CS.CP.maxSteerAngle
# fix for Genesis hard fault at low speed # fix for Genesis hard fault at low speed
if CS.out.vEgo < 16.7 and self.car_fingerprint == CAR.HYUNDAI_GENESIS: if CS.out.vEgo < 16.7 and self.car_fingerprint == CAR.HYUNDAI_GENESIS:

@ -27,6 +27,13 @@ class CarInterface(CarInterfaceBase):
ret.steerLimitTimer = 0.4 ret.steerLimitTimer = 0.4
tire_stiffness_factor = 1. tire_stiffness_factor = 1.
ret.maxSteerAngle = 90.
eps_modified = False
for fw in car_fw:
if fw.ecu == "eps" and b"," in fw.fwVersion:
eps_modified = True
if candidate == CAR.SANTA_FE: if candidate == CAR.SANTA_FE:
ret.lateralTuning.pid.kf = 0.00005 ret.lateralTuning.pid.kf = 0.00005
ret.mass = 3982. * CV.LB_TO_KG + STD_CARGO_KG ret.mass = 3982. * CV.LB_TO_KG + STD_CARGO_KG
@ -58,6 +65,8 @@ class CarInterface(CarInterfaceBase):
ret.steerRatio = 13.75 * 1.15 ret.steerRatio = 13.75 * 1.15
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.05]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.05]]
if eps_modified:
ret.maxSteerAngle = 1000.
elif candidate in [CAR.ELANTRA, CAR.ELANTRA_GT_I30]: elif candidate in [CAR.ELANTRA, CAR.ELANTRA_GT_I30]:
ret.lateralTuning.pid.kf = 0.00006 ret.lateralTuning.pid.kf = 0.00006
ret.mass = 1275. + STD_CARGO_KG ret.mass = 1275. + STD_CARGO_KG

@ -1 +1 @@
1043cab3ddb1b4b8d5d32a7a0c1a78af9e4f90b7 3964f847c722e6e6a4b3876bbe9e9c8a354fb7f8

Loading…
Cancel
Save