Original PRs: #115, #116, #117, and #118 by @1454
This commit is contained in:
firestar5683
2026-09-03 15:22:26 -05:00
parent ab6351541f
commit fed4ce6ee0
6 changed files with 0 additions and 12 deletions
@@ -260,8 +260,6 @@ MAX_UPHILL_GRADE_FF = 0.20
def limit_grade_feedforward(planner_accel: float, pitch_accel: float) -> float:
# Planner already closed-loops hill sag. Stacking full g*sin(pitch) on a
# positive command is what kick-downs 10-speed trucks.
if pitch_accel > 0.0 and planner_accel > 0.0:
return 0.0
if pitch_accel > MAX_UPHILL_GRADE_FF:
-1
View File
@@ -500,7 +500,6 @@ class CarInterface(CarInterfaceBase):
ret.flags |= GMFlags.PEDAL_LONG.value
elif candidate in (CAR.CHEVROLET_SILVERADO, CAR.CHEVROLET_SILVERADO_CC):
# Let stock Silverado ACC decide whether standstill engagement is valid.
ret.minEnableSpeed = 0.
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
@@ -291,8 +291,6 @@ EXPERIMENTAL_RELEASE_ACCEL_MAX_LATERAL_OFFSET = 1.5
EXPERIMENTAL_RELEASE_ACCEL_MIN_HEADWAY_MARGIN = 0.0
EXPERIMENTAL_RELEASE_ACCEL_MIN_DELTA_A = 0.12
EXPERIMENTAL_RELEASE_ACCEL_STEP = 0.06
# Last few mph below CESpeed/CESpeedLead: mix MPC back in so experimental
# cannot crawl into the breakpoint and then snap to ACC.
EXPERIMENTAL_SPEED_HANDOFF_BAND = 5.0 * CV.MPH_TO_MS
EXPERIMENTAL_HANDOFF_KEEP_E2E_BRAKE = -0.15
MATCHED_FOLLOW_TRANSITION_MIN_SPEED = 20.0
@@ -1798,16 +1796,12 @@ class LongitudinalPlanner:
@staticmethod
def is_cem_following_lead(tracking_lead, d_rel, t_follow, v_ego):
# Same inputs as StarPilotFollowing.following_lead / CEM: published
# trackingLead and tFollow, plus leadOne.dRel inside 2*t_follow*v_ego.
return bool(tracking_lead and float(d_rel) < (float(t_follow) * 2.0) * float(v_ego))
@staticmethod
def apply_experimental_speed_handoff(output_a_target, output_a_target_mpc, output_a_target_e2e, speed_handoff):
if speed_handoff <= 0.0:
return output_a_target
# Keep a real E2E brake. Only mix MPC back in when experimental is crawling
# or matching ACC, not when it is already asking for more deceleration.
if output_a_target_e2e < min(output_a_target_mpc, EXPERIMENTAL_HANDOFF_KEEP_E2E_BRAKE):
return output_a_target
return (1.0 - speed_handoff) * output_a_target + speed_handoff * output_a_target_mpc
@@ -3732,7 +3732,6 @@ def test_experimental_speed_handoff_keeps_stronger_e2e_brake():
def test_experimental_speed_handoff_following_lead_matches_cem_window():
# Distant radar-active lead is not CEM following_lead.
assert LongitudinalPlanner.is_cem_following_lead(True, 40.0, 1.5, 20.0)
assert not LongitudinalPlanner.is_cem_following_lead(True, 80.0, 1.5, 20.0)
assert not LongitudinalPlanner.is_cem_following_lead(False, 10.0, 1.5, 20.0)
-1
View File
@@ -205,7 +205,6 @@ class Soundd:
def load_sounds(self):
self.loaded_sounds: dict[int, np.ndarray] = {}
# Load all sounds. Prefer theme/random-event clips, then packaged stock.
for sound in sound_list:
filename, play_count, volume = sound_list[sound]
loaded = False
@@ -108,7 +108,6 @@ class StarPilotFollowing:
self.update_lane_change_gap(long_control_active, v_ego, sm, starpilot_toggles)
# After t_follow adjustments so CEM and the published tFollow use the same window.
self.following_lead = self.starpilot_planner.tracking_lead and self.starpilot_planner.lead_one.dRel < (self.t_follow * 2) * v_ego
self.disable_throttle = False