LDW: fix deprecated ll prob reference (#25681)

* fix crash when ldw is turned on

* in lane change

* Revert "in lane change"

This reverts commit 98e7224f81.
old-commit-hash: d222461a3e
taco
Shane Smiskol 3 years ago committed by GitHub
parent 30326c5a39
commit 775d1beb66
  1. 4
      selfdrive/controls/controlsd.py

@ -709,8 +709,8 @@ class Controls:
model_v2 = self.sm['modelV2']
desire_prediction = model_v2.meta.desirePrediction
if len(desire_prediction) and ldw_allowed:
right_lane_visible = self.sm['lateralPlan'].rProb > 0.5
left_lane_visible = self.sm['lateralPlan'].lProb > 0.5
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]

Loading…
Cancel
Save