Skip to content

Commit

Permalink
Fix lane centering with single lane line (#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 03e764b commit 151a504
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

1 comment on commit 151a504

@Martint1980
Copy link

@Martint1980 Martint1980 commented on 151a504 Jul 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

speed_lane_width = interp(v_ego, [0., 31.], [2.5, 3., 3.5]) #fit European roads as well

Additional the same in:
   https://github.com/commaai/openpilot/blob/devel/selfdrive/controls/lib/latcontrol_helpers.py#L9 

And somewhere else

Thanks Arne182

Please sign in to comment.