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

don't subtract 1
old-commit-hash: 4e951e4524
beeps
Shane Smiskol 2 years ago committed by GitHub
parent 4f88c90d83
commit 6f0efe4ea0
  1. 4
      selfdrive/controls/controlsd.py

@ -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))

Loading…
Cancel
Save