Skip to content

Commit

Permalink
Fix lane centering with single lane line (commaai#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gernby authored and rbiasini committed Jul 12, 2019
1 parent 4db632d commit 7ad0d8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/controls/lib/model_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def update(self, v_ego, md):
self.lane_width_certainty += 0.05 * (lr_prob - self.lane_width_certainty)
current_lane_width = abs(l_poly[3] - r_poly[3])
self.lane_width_estimate += 0.005 * (current_lane_width - self.lane_width_estimate)
speed_lane_width = interp(v_ego, [0., 31.], [3., 3.8])
speed_lane_width = interp(v_ego, [0., 31.], [2.8, 3.5])
self.lane_width = self.lane_width_certainty * self.lane_width_estimate + \
(1 - self.lane_width_certainty) * speed_lane_width

Expand Down

0 comments on commit 7ad0d8c

Please sign in to comment.