Controls - Longitudinal Tuning - Increase Stop Distance Behind Lead

Increase the stopping distance for a more comfortable stop from lead vehicles.
This commit is contained in:
FrogAi
2024-06-07 10:51:58 -07:00
parent af951fb023
commit b78f5fbbe8
2 changed files with 9 additions and 5 deletions
@@ -64,8 +64,9 @@ class FrogPilotPlanner:
driving_gear = carState.gearShifter not in (GearShifter.neutral, GearShifter.park, GearShifter.reverse, GearShifter.unknown)
lead_distance = self.lead_one.dRel
stopping_distance = STOP_DISTANCE
distance_offset = max(frogpilot_toggles.increased_stopping_distance + min(CITY_SPEED_LIMIT - v_ego, 0), 0)
lead_distance = self.lead_one.dRel - distance_offset
stopping_distance = STOP_DISTANCE + distance_offset
run_cem = frogpilot_toggles.conditional_experimental_mode
if run_cem and (controlsState.enabled or frogpilotCarControl.alwaysOnLateral) and driving_gear: