Skip to content

Commit 6f15db8

Browse files
authored
Merge pull request #62 from arne182/LDA
Lda working without beeping
2 parents c8aabf0 + e6a58e7 commit 6f15db8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

selfdrive/controls/lib/pathplanner.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def __init__(self):
2323

2424
def update(self, v_ego, md):
2525
if md is not None:
26+
2627
p_poly = model_polyfit(md.model.path.points, self._path_pinv) # predicted path
2728
l_poly = model_polyfit(md.model.leftLane.points, self._path_pinv) # left line
2829
r_poly = model_polyfit(md.model.rightLane.points, self._path_pinv) # right line
@@ -56,12 +57,12 @@ def update(self, v_ego, md):
5657
# compute target path
5758
self.d_poly, self.c_poly, self.c_prob = calc_desired_path(
5859
l_poly, r_poly, p_poly, l_prob, r_prob, p_prob, v_ego, self.lane_width)
59-
60+
6061
self.r_poly = r_poly
6162
self.r_prob = r_prob
62-
63+
6364
self.l_poly = l_poly
6465
self.l_prob = l_prob
65-
66+
6667
self.p_poly = p_poly
6768
self.p_prob = p_prob

selfdrive/controls/lib/planner.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,9 @@ def update(self, CS, CP, VM, LaC, LoC, v_cruise_kph, force_slow_decel):
536536
plan_send.plan.vTargetFuture = self.v_acc_future
537537
plan_send.plan.hasLead = self.mpc1.prev_lead_status
538538
plan_send.plan.hasLeftLane = bool(self.PP.l_prob > 0.5)
539-
plan_send.plan.hasrightLaneDepart = bool(self.PP.r_poly[3] > -0.5 and not CS.rightBlinker)
539+
plan_send.plan.hasrightLaneDepart = bool(self.PP.r_poly[3] > -1.15 and not CS.rightBlinker)
540540
plan_send.plan.hasRightLane = bool(self.PP.r_prob > 0.5)
541-
plan_send.plan.hasleftLaneDepart = bool(self.PP.l_poly[3] < 0.5 and not CS.leftBlinker)
541+
plan_send.plan.hasleftLaneDepart = bool(self.PP.l_poly[3] < 1.15 and not CS.leftBlinker)
542542
plan_send.plan.longitudinalPlanSource = self.longitudinalPlanSource
543543

544544
plan_send.plan.gpsPlannerActive = self.gps_planner_active

0 commit comments

Comments
 (0)