Skip to content

Commit

Permalink
Fix lane centering with single lane line
Browse files Browse the repository at this point in the history
add fix of openpilot dev commaai#737
  • Loading branch information
Martint1980 authored Jul 15, 2019
1 parent 43b8b4a commit 6e695d3
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 6e695d3

Please sign in to comment.