Skip to content

Commit

Permalink
Update conditional_experimental_mode.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FrogAi committed Feb 2, 2025
1 parent 760cc9d commit ab4ba18
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def check_conditions(self, carState, frogpilotNavigation, modelData, v_ego, v_le
self.status_value = 13 if v_lead < 1 else 14
return True

if frogpilot_toggles.conditional_model_stop_time != 0 and self.stop_light_detected and not self.frogpilot_planner.tracking_lead:
if frogpilot_toggles.conditional_model_stop_time != 0 and self.stop_light_detected:
self.status_value = 15 if not self.frogpilot_planner.frogpilot_vcruise.forcing_stop else 16
return True

Expand Down Expand Up @@ -94,7 +94,7 @@ def stop_sign_and_light(self, frogpilotCarState, v_ego, frogpilot_toggles):
model_stopping = self.frogpilot_planner.model_length < v_ego * frogpilot_toggles.conditional_model_stop_time

self.stop_light_filter.update(self.frogpilot_planner.model_stopped or model_stopping)
self.stop_light_detected = self.stop_light_filter.x >= THRESHOLD**2
self.stop_light_detected = self.stop_light_filter.x >= THRESHOLD**2 and not self.frogpilot_planner.tracking_lead
else:
self.stop_light_filter.x = 0
self.stop_light_detected = False

0 comments on commit ab4ba18

Please sign in to comment.