stop-lines
Harald Schafer 2021-09-27 22:40:15 -07:00 committed by mitchellgoffpc
parent 749a366691
commit fe8e872cf6
1 changed files with 2 additions and 2 deletions

View File

@ -304,9 +304,9 @@ class LongitudinalMpc():
lead_0_obstacle = lead_xv_0[:,0] + get_stopped_equivalence_factor(lead_xv_0[:,1])
lead_1_obstacle = lead_xv_1[:,0] + get_stopped_equivalence_factor(lead_xv_1[:,1])
if stopping:
stop_line_obstacle = self.extrapolate_lead(model.stopLine.x + 6.0, 0.0, 0.0, self.a_lead_tau)[:,0]
stop_line_obstacle = model.stopLine.x * np.ones(N+1)
else:
stop_line_obstacle = self.extrapolate_lead(50.0, v_ego + 10, 0.0, self.a_lead_tau)[:,0]
stop_line_obstacle = 400 * np.ones(N+1)
# Fake an obstacle for cruise
# TODO find cleaner way to write hacky fake cruise obstacle