Dear Community:
The Openpilot Community needs your help to continue to keep opc.ai's lights on and support the path to Workbench v0.2. With only a one person crew and without commercial funding it's not always financially feasible to fund these services out of pocket. Please consider becoming a Patreon supporter of the Openpilot Community project and receive exclusive perks and benefits!
Become a patreon Learn more Maybe Later

DISCLAIMER: This website is maintained by openpilot users and contributors. The content found here (including Workbench and Oppey the Bot) are not approved, supported, affiliated or funded by Comma.ai, Inc. Please DO NOT contact Comma.ai, Inc. staff about these things as they WILL NOT provide support. For support on openpilot, opc.ai, oppey, workbench, etc. please contact a community member on Discord.

Thomas Pichard
Jan 04·1 min read

How to modify the default road size

Image

If you need to modify the roads size because your country have tinier or bigger roads, this tutorial is for you.

First, make sure of the size of your road, for example in France it’s about 3.5 meters for departmental roads but you can write the size that you want.

SSH into your EON or open your openpilot project on your computer.

Go to the openpilot/blob/devel/selfdrive/controls/lib/pathplanner.py
In this file you have to modify the lines 15, 17 and 38

  • L15 | self.lane_width_estimate = 3.7
    • L15 | self.lane_width_estimate = 3.5
  • L17 | self.lane_width = 3.7
    • L17 | self.lane_width = 3.5
  • L38 | speed_lane_width = interp(v_ego, [0., 31.], [3., 3.8])
    • L38 | speed_lane_width = interp(v_ego, [0., 31.], [3., 3.5])

Go to the openpilot/blob/devel/selfdrive/controls/lib/latcontrols_helpers.py
In this file you have to modify the line 9

  • L9 | _LANE_WIDTH_V = [3., 3.8]
    • L9 | _LANE_WIDTH_V = [3., 3.5]

Commit and push to your fork.
Reboot your EON.

Drive carefuly.