Parametrize startingBrakeRate (#19511)

* Parametrize startingBrakeRate

* new ref_commit
old-commit-hash: 717bc747c3
commatwo_master
Igor 5 years ago committed by GitHub
parent dcc4d34337
commit 8bc42f4aff
  1. 1
      selfdrive/car/interfaces.py
  2. 3
      selfdrive/controls/lib/longcontrol.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -73,6 +73,7 @@ class CarInterfaceBase():
ret.startAccel = 0.0
ret.minSpeedCan = 0.3
ret.stoppingBrakeRate = 0.2 # brake_travel/s while trying to stop
ret.startingBrakeRate = 0.8 # brake_travel/s while releasing on restart
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
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
RATE = 100.0
@ -113,7 +112,7 @@ class LongControl():
# Intention is to move again, release brake fast before handing control to PID
elif self.long_control_state == LongCtrlState.starting:
if output_gb < -0.2:
output_gb += STARTING_BRAKE_RATE / RATE
output_gb += CP.startingBrakeRate / RATE
self.reset(CS.vEgo)
self.last_output_gb = output_gb

@ -1 +1 @@
2c61a18410dca75500a87a733aa5c3cc50d21fcc
e3c1a9c4b81033c8dad810870eb974954e7660e9
Loading…
Cancel
Save