Lane Departure Warning: fix desire index bug (#28119)

don't subtract 1
old-commit-hash: 4e951e4524
This commit is contained in:
Shane Smiskol 2023-05-06 03:03:28 -07:00 committed by GitHub
parent 4f88c90d83
commit 6f0efe4ea0
1 changed files with 2 additions and 2 deletions

View File

@ -707,8 +707,8 @@ class Controls:
if len(desire_prediction) and ldw_allowed:
right_lane_visible = model_v2.laneLineProbs[2] > 0.5
left_lane_visible = model_v2.laneLineProbs[1] > 0.5
l_lane_change_prob = desire_prediction[Desire.laneChangeLeft - 1]
r_lane_change_prob = desire_prediction[Desire.laneChangeRight - 1]
l_lane_change_prob = desire_prediction[Desire.laneChangeLeft]
r_lane_change_prob = desire_prediction[Desire.laneChangeRight]
lane_lines = model_v2.laneLines
l_lane_close = left_lane_visible and (lane_lines[1].y[0] > -(1.08 + CAMERA_OFFSET))