Update conditional_experimental_mode.py
This commit is contained in:
parent
0830ee06cc
commit
105afca959
|
@ -122,7 +122,7 @@ class ConditionalExperimentalMode:
|
|||
def stop_sign_and_light(self, lead_distance, modelData, v_ego, v_lead, frogpilot_toggles):
|
||||
lead_check = frogpilot_toggles.conditional_stop_lights_lead or not self.lead_slowing_down(lead_distance, v_ego, v_lead)
|
||||
model_stopped = modelData.position.x[ModelConstants.IDX_N - 1] < ModelConstants.IDX_N
|
||||
model_stopping = modelData.position.x[ModelConstants.IDX_N - 1] < v_ego * ModelConstants.T_IDXS[ModelConstants.IDX_N - 2]
|
||||
model_stopping = modelData.position.x[ModelConstants.IDX_N - 1] < v_ego * ModelConstants.T_IDXS[ModelConstants.IDX_N - 3.3]
|
||||
|
||||
self.stop_light_mac.add_data((lead_check and model_stopping) or model_stopped)
|
||||
self.red_light_detected = self.stop_light_mac.get_moving_average() >= PROBABILITY
|
||||
|
|
Loading…
Reference in New Issue