diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py index 8b384c63db3942..0b6b8cdbabc9a1 100755 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py @@ -55,7 +55,7 @@ FCW_IDXS = T_IDXS < 5.0 T_DIFFS = np.diff(T_IDXS, prepend=[0.]) COMFORT_BRAKE = 2.5 -STOP_DISTANCE = 5.5 +STOP_DISTANCE = 5.0 def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard): if personality==custom.LongitudinalPersonalitySP.relaxed: @@ -109,7 +109,7 @@ def get_stopped_equivalence_factor(v_lead, v_ego): if np.all(v_lead - v_ego > 0): v_diff_offset = ((v_lead - v_ego) * 1.) v_diff_offset = np.clip(v_diff_offset, 0, STOP_DISTANCE / 2) - v_diff_offset = np.maximum(v_diff_offset * ((10 - v_ego)/10), 0) + v_diff_offset = np.maximum(v_diff_offset * ((15 - v_ego)/15), 0) distance = (v_lead**2) / (2 * COMFORT_BRAKE) + v_diff_offset return distance