Parametrize stoppingBrakeRate (#2745)

* Parametrize stoppingBrakeRate

* ref_commit updated
pull/2752/head
Igor 5 years ago committed by GitHub
parent 31568461aa
commit d3c2a0e6c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      selfdrive/car/interfaces.py
  2. 3
      selfdrive/controls/lib/longcontrol.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -72,6 +72,7 @@ class CarInterfaceBase():
ret.openpilotLongitudinalControl = False
ret.startAccel = 0.0
ret.minSpeedCan = 0.3
ret.stoppingBrakeRate = 0.2 # brake_travel/s while trying to stop
ret.stoppingControl = False
ret.longitudinalTuning.deadzoneBP = [0.]
ret.longitudinalTuning.deadzoneV = [0.]

@ -9,7 +9,6 @@ STOPPING_TARGET_SPEED_OFFSET = 0.01
STARTING_TARGET_SPEED = 0.5
BRAKE_THRESHOLD_TO_PID = 0.2
STOPPING_BRAKE_RATE = 0.2 # brake_travel/s while trying to stop
STARTING_BRAKE_RATE = 0.8 # brake_travel/s while releasing on restart
BRAKE_STOPPING_TARGET = 0.5 # apply at least this amount of brake to maintain the vehicle stationary
@ -106,7 +105,7 @@ class LongControl():
elif self.long_control_state == LongCtrlState.stopping:
# Keep applying brakes until the car is stopped
if not CS.standstill or output_gb > -BRAKE_STOPPING_TARGET:
output_gb -= STOPPING_BRAKE_RATE / RATE
output_gb -= CP.stoppingBrakeRate / RATE
output_gb = clip(output_gb, -brake_max, gas_max)
self.reset(CS.vEgo)

@ -1 +1 @@
f60a1c8e24558c1470f9a240a12037579d62c2c1
643db5a2a2555f9b9be755362b04fc346a1222de

Loading…
Cancel
Save