Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lane centering with single lane line #737

Merged
merged 1 commit into from
Jul 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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])
Copy link
Contributor

@rbiasini rbiasini Jul 12, 2019

Choose a reason for hiding this comment

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

The Interstate Highway standards for the U.S. Interstate Highway System use a 12-foot (3.7 m) standard lane width, while narrower lanes are used on lower classification roads. In Europe, laws and road widths vary by country; the minimum widths of lanes are generally between 2.5 to 3.25 meters (8.2 to 10.7 ft).

So yeah, I think assuming slightly smaller lane lines by default will help for the average case and also for the case you described.

self.lane_width = self.lane_width_certainty * self.lane_width_estimate + \
(1 - self.lane_width_certainty) * speed_lane_width

Expand Down