This commit is contained in:
rav4kumar
2025-02-23 22:49:35 -07:00
parent e13b37c81c
commit 9628f0848e
2 changed files with 6 additions and 6 deletions
@@ -64,9 +64,9 @@ def get_jerk_factor(personality=log.LongitudinalPersonality.standard):
if personality==log.LongitudinalPersonality.relaxed:
return 1.0
elif personality==log.LongitudinalPersonality.standard:
return 1.0
return 0.5
elif personality==log.LongitudinalPersonality.aggressive:
return 0.2
return 0.5
else:
raise NotImplementedError("Longitudinal personality not supported")
@@ -98,7 +98,7 @@ def get_stopped_equivalence_factor_krkeegen(v_lead, v_ego, time_to_max_brake=0.3
# If relative speed is high and ego speed is low, increase offset more aggressively
fast_takeoff_condition = (v_ego < 10) & (delta_speed > 2) # Array-wise condition
v_diff_offset = np.where(fast_takeoff_condition, np.clip(v_diff_offset * 2.0, 0, STOP_DISTANCE / 2), v_diff_offset)
v_diff_offset = np.where(fast_takeoff_condition, np.clip(v_diff_offset * 2.5, 0, STOP_DISTANCE / 2), v_diff_offset)
# softer initial braking
initial_brake_factor = np.clip(v_ego / 30, 0, 1) # Soft brake factor for the first 0.3 seconds
@@ -35,9 +35,9 @@ _DP_CRUISE_MIN_V_NORMAL = [-0.015, -0.015, -0.12, -1.21]
_DP_CRUISE_MIN_V_SPORT = [-0.02, -0.02, -0.14, -1.22]
_DP_CRUISE_MIN_BP = [0., 2.0, 11, 25.]
_DP_CRUISE_MAX_V_ECO = [1.60, 1.60, 1.58, 1.58, 0.86, .532, .432, .32, .28, .085]
_DP_CRUISE_MAX_V_NORMAL = [1.80, 1.80, 1.75, 1.75, 1.23, .75, .62, .50, .41, .26]
_DP_CRUISE_MAX_V_SPORT = [2.00, 2.00, 2.00, 2.00, 1.72, 1.06, .86, .62, .54, .4]
_DP_CRUISE_MAX_V_ECO = [1.60, 1.60, 1.58, 1.45, 0.82, .532, .432, .32, .28, .085]
_DP_CRUISE_MAX_V_NORMAL = [1.80, 1.80, 1.72, 1.65, 1.10, .75, .61, .50, .41, .26]
_DP_CRUISE_MAX_V_SPORT = [2.50, 2.00, 1.95, 1.90, 1.60, 1.06, .74, .62, .54, .4]
_DP_CRUISE_MAX_BP = [0., 1., 6., 8., 11., 16, 20., 25., 30., 55.]