mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-29 02:43:47 +08:00
Parametrize stoppingBrakeRate (#2745)
* Parametrize stoppingBrakeRate * ref_commit updated old-commit-hash: d3c2a0e6c1e898b08570dd0a9b1eef12934f6c9a
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user