Skip to content

openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 100 supported car makes and models.

License

Notifications You must be signed in to change notification settings

sourceExp/openpilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4,517 Commits

Repository files navigation

Table of Contents


What is openpilot?

openpilot is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW) and Lane Departure Warning (LDW) for a growing variety of supported car makes, models and model years. In addition, while openpilot is engaged, a camera based Driver Monitoring (DM) feature alerts distracted and asleep drivers.

Integration with Stock Features

In all supported cars:

  • Stock Lane Keep Assist (LKA) and stock ALC are replaced by openpilot ALC, which only functions when openpilot is engaged by the user.
  • Stock LDW is replaced by openpilot LDW.

Additionally, on specific supported cars (see ACC column in supported cars):

  • Stock ACC is replaced by openpilot ACC.
  • openpilot FCW operates in addition to stock FCW.

openpilot should preserve all other vehicle's stock features, including, but are not limited to: FCW, Automatic Emergency Braking (AEB), auto high-beam, blind spot warning, and side collision warning.

Supported Hardware

At the moment, openpilot supports the EON Gold DevKit, comma two, and comma three. A car harness is recommended to connect your device to the car. For experimental purposes, openpilot can also run on an Ubuntu computer with external webcams.

Supported Cars

MakeModel (US Market Reference)Supported PackageACCNo ACC accel belowNo ALC below
AcuraILX 2016-19AcuraWatch Plusopenpilot25mph125mph
AcuraRDX 2016-18AcuraWatch Plusopenpilot25mph112mph
AcuraRDX 2019-21AllStock0mph3mph
HondaAccord 2018-20AllStock0mph3mph
HondaAccord Hybrid 2018-20AllStock0mph3mph
HondaCivic Hatchback 2017-21Honda SensingStock0mph12mph
HondaCivic Coupe 2016-18Honda Sensingopenpilot0mph12mph
HondaCivic Coupe 2019-20AllStock0mph2mph2
HondaCivic Sedan 2016-18Honda Sensingopenpilot0mph12mph
HondaCivic Sedan 2019-20AllStock0mph2mph2
HondaCR-V 2015-16Touringopenpilot25mph112mph
HondaCR-V 2017-21Honda SensingStock0mph12mph
HondaCR-V Hybrid 2017-2019Honda SensingStock0mph12mph
HondaFit 2018-19Honda Sensingopenpilot25mph112mph
HondaHR-V 2019-20Honda Sensingopenpilot25mph112mph
HondaInsight 2019-21AllStock0mph3mph
HondaInspire 2018AllStock0mph3mph
HondaOdyssey 2018-20Honda Sensingopenpilot25mph10mph
HondaPassport 2019Allopenpilot25mph112mph
HondaPilot 2016-19Honda Sensingopenpilot25mph112mph
HondaRidgeline 2017-21Honda Sensingopenpilot25mph112mph
HyundaiPalisade 2020-21AllStock0mph0mph
HyundaiSonata 2020-21AllStock0mph0mph
LexusCT Hybrid 2017-18LSSStock30mph0mph
LexusES 2019-21Allopenpilot0mph0mph
LexusES Hybrid 2017-18LSSStock30mph0mph
LexusES Hybrid 2019-21Allopenpilot0mph0mph
LexusIS 2017-2019AllStock22mph0mph
LexusNX 2018AllStock30mph0mph
LexusNX 2020Allopenpilot0mph0mph
LexusNX Hybrid 2018-19AllStock30mph0mph
LexusRX 2016-18AllStock30mph0mph
LexusRX 2020-21Allopenpilot0mph0mph
LexusRX Hybrid 2016-19AllStock30mph0mph
LexusRX Hybrid 2020-21Allopenpilot0mph0mph
LexusUX Hybrid 2019-21Allopenpilot0mph0mph
ToyotaAlphard 2020Allopenpilot0mph0mph
ToyotaAvalon 2016-21TSS-PStock320mph10mph
ToyotaAvalon Hybrid 2019-21TSS-PStock320mph10mph
ToyotaCamry 2018-20AllStock0mph40mph
ToyotaCamry 2021Allopenpilot0mph40mph
ToyotaCamry Hybrid 2018-20AllStock0mph40mph
ToyotaCamry Hybrid 2021Allopenpilot0mph0mph
ToyotaC-HR 2017-20AllStock0mph0mph
ToyotaC-HR Hybrid 2017-19AllStock0mph0mph
ToyotaCorolla 2017-19AllStock320mph10mph
ToyotaCorolla 2020-22Allopenpilot0mph0mph
ToyotaCorolla Hatchback 2019-21Allopenpilot0mph0mph
ToyotaCorolla Hybrid 2020-21Allopenpilot0mph0mph
ToyotaHighlander 2017-19AllStock30mph0mph
ToyotaHighlander 2020-21Allopenpilot0mph0mph
ToyotaHighlander Hybrid 2017-19AllStock30mph0mph
ToyotaHighlander Hybrid 2020-21Allopenpilot0mph0mph
ToyotaMirai 2021Allopenpilot0mph0mph
ToyotaPrius 2016-20TSS-PStock30mph0mph
ToyotaPrius 2021Allopenpilot0mph0mph
ToyotaPrius Prime 2017-20AllStock30mph0mph
ToyotaPrius Prime 2021Allopenpilot0mph0mph
ToyotaRav4 2016-18TSS-PStock320mph10mph
ToyotaRav4 2019-21Allopenpilot0mph0mph
ToyotaRav4 Hybrid 2016-18TSS-PStock30mph0mph
ToyotaRav4 Hybrid 2019-21Allopenpilot0mph0mph
ToyotaSienna 2018-20AllStock30mph0mph

1Comma Pedal is used to provide stop-and-go capability to some of the openpilot-supported cars that don't currently support stop-and-go. NOTE: The Comma Pedal is not officially supported by comma.
22019 Honda Civic 1.6L Diesel Sedan does not have ALC below 12mph.
3When disconnecting the Driver Support Unit (DSU), openpilot ACC will replace stock ACC. NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB).
428mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control.

Community Maintained Cars and Features

MakeModel (US Market Reference)Supported PackageACCNo ACC accel belowNo ALC below
AudiA3 2014-19PrestigeStock0mph0mph
AudiA3 Sportback e-tron 2017-18PrestigeStock0mph0mph
AudiQ2 2018Driver AssistanceStock0mph0mph
BuickRegal 20181Adaptive Cruiseopenpilot0mph7mph
CadillacATS 20181Adaptive Cruiseopenpilot0mph7mph
ChevroletMalibu 20171Adaptive Cruiseopenpilot0mph7mph
ChevroletVolt 2017-181Adaptive Cruiseopenpilot0mph7mph
ChryslerPacifica 2017-18Adaptive CruiseStock0mph9mph
ChryslerPacifica 2020Adaptive CruiseStock0mph39mph
ChryslerPacifica Hybrid 2017-18Adaptive CruiseStock0mph9mph
ChryslerPacifica Hybrid 2019-21Adaptive CruiseStock0mph39mph
GenesisG70 2018AllStock0mph0mph
GenesisG80 2018AllStock0mph0mph
GenesisG90 2018AllStock0mph0mph
GMCAcadia 20181Adaptive Cruiseopenpilot0mph7mph
HoldenAstra 20171Adaptive Cruiseopenpilot0mph7mph
HyundaiElantra 2017-19SCC + LKASStock19mph34mph
HyundaiElantra 2021SCC + LKASStock0mph0mph
HyundaiElantra Hybrid 2021SCC + LKASStock0mph0mph
HyundaiGenesis 2015-16SCC + LKASStock19mph37mph
HyundaiIoniq Electric 2019SCC + LKASStock0mph32mph
HyundaiIoniq Electric 2020SCC + LKASStock0mph0mph
HyundaiIoniq PHEV 2020SCC + LKASStock0mph0mph
HyundaiKona 2020SCC + LKASStock0mph0mph
HyundaiKona EV 2018-19SCC + LKASStock0mph0mph
HyundaiKona Hybrid 2020SCC + LKASStock0mph0mph
HyundaiSanta Fe 2019-20AllStock0mph0mph
HyundaiSonata 2018-2019SCC + LKASStock0mph0mph
HyundaiSonata Hybrid 2021AllStock0mph0mph
HyundaiVeloster 2019-20SCC + LKASStock5mph0mph
JeepGrand Cherokee 2016-18Adaptive CruiseStock0mph9mph
JeepGrand Cherokee 2019-20Adaptive CruiseStock0mph39mph
KiaForte 2018-21SCC + LKASStock0mph0mph
KiaNiro EV 2020-21SCC + LKASStock0mph0mph
KiaNiro Hybrid 2021SCC + LKASStock0mph0mph
KiaNiro PHEV 2019SCC + LKASStock10mph32mph
KiaOptima 2017SCC + LKASStock0mph32mph
KiaOptima 2019SCC + LKASStock0mph0mph
KiaSeltos 2021SCC + LKASStock0mph0mph
KiaSorento 2018-19SCC + LKASStock0mph0mph
KiaStinger 2018SCC + LKASStock0mph0mph
KiaCeed 2019SCC + LKASStock0mph0mph
KiaTelluride 2020SCC + LKASStock0mph0mph
NissanAltima 2019-20ProPILOTStock0mph0mph
NissanLeaf 2018-20ProPILOTStock0mph0mph
NissanRogue 2018-20ProPILOTStock0mph0mph
NissanX-Trail 2017ProPILOTStock0mph0mph
SEATAteca 2018Driver AssistanceStock0mph0mph
SEATLeon 2014-2020Driver AssistanceStock0mph0mph
ŠkodaKodiaq 2018-19Driver AssistanceStock0mph0mph
ŠkodaOctavia 2015, 2018-19Driver AssistanceStock0mph0mph
ŠkodaOctavia RS 2016Driver AssistanceStock0mph0mph
ŠkodaScala 2020Driver AssistanceStock0mph0mph
ŠkodaSuperb 2015-18Driver AssistanceStock0mph0mph
SubaruAscent 2019EyeSightStock0mph0mph
SubaruCrosstrek 2018-19EyeSightStock0mph0mph
SubaruForester 2019-21EyeSightStock0mph0mph
SubaruImpreza 2017-19EyeSightStock0mph0mph
VolkswagenAtlas 2018-19Driver AssistanceStock0mph0mph
Volkswagene-Golf 2014, 2019-20Driver AssistanceStock0mph0mph
VolkswagenGolf 2015-20Driver AssistanceStock0mph0mph
VolkswagenGolf Alltrack 2017-18Driver AssistanceStock0mph0mph
VolkswagenGolf GTE 2016Driver AssistanceStock0mph0mph
VolkswagenGolf GTI 2018-19Driver AssistanceStock0mph0mph
VolkswagenGolf R 2016-19Driver AssistanceStock0mph0mph
VolkswagenGolf SportsVan 2016Driver AssistanceStock0mph0mph
VolkswagenGolf SportWagen 2015Driver AssistanceStock0mph0mph
VolkswagenJetta 2018-20Driver AssistanceStock0mph0mph
VolkswagenJetta GLI 2021Driver AssistanceStock0mph0mph
VolkswagenPassat 2016-172Driver AssistanceStock0mph0mph
VolkswagenT-Cross 2021Driver AssistanceStock0mph0mph
VolkswagenTiguan 2020Driver AssistanceStock0mph0mph
VolkswagenTouran 2017Driver AssistanceStock0mph0mph

1Requires an OBD-II car harness and community built ASCM harness. NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).
2Only includes the MQB Passat sold outside of North America. The NMS Passat made in Chattanooga TN is not yet supported.

Community Maintained Cars and Features are not verified by comma to meet our safety model. Be extra cautious using them. They are only available after enabling the toggle in Settings->Developer->Enable Community Features.

To promote a car from community maintained, it must meet a few requirements. We must own one from the brand, we must sell the harness for it, has full ISO26262 in both panda and openpilot, there must be a path forward for longitudinal control, it must have AEB still enabled, and it must support fingerprinting 2.0

Although they're not upstream, the community has openpilot running on other makes and models. See the 'Community Supported Models' section of each make on our wiki.

Installation Instructions

Install openpilot on a supported device by entering https://openpilot.comma.ai during the installer setup.

Follow these video instructions to properly mount the device on the windshield. Note: openpilot features an automatic pose calibration routine and openpilot performance should not be affected by small pitch and yaw misalignments caused by imprecise device mounting.

Before placing the device on your windshield, check the state and local laws and ordinances where you drive. Some state laws prohibit or restrict the placement of objects on the windshield of a motor vehicle.

You will be able to engage openpilot after reviewing the onboarding screens and finishing the calibration procedure.

Limitations of openpilot ALC and LDW

openpilot ALC and openpilot LDW do not automatically drive the vehicle or reduce the amount of attention that must be paid to operate your vehicle. The driver must always keep control of the steering wheel and be ready to correct the openpilot ALC action at all times.

While changing lanes, openpilot is not capable of looking next to you or checking your blind spot. Only nudge the wheel to initiate a lane change after you have confirmed it's safe to do so.

Many factors can impact the performance of openpilot ALC and openpilot LDW, causing them to be unable to function as intended. These include, but are not limited to:

  • Poor visibility (heavy rain, snow, fog, etc.) or weather conditions that may interfere with sensor operation.
  • The road facing camera is obstructed, covered or damaged by mud, ice, snow, etc.
  • Obstruction caused by applying excessive paint or adhesive products (such as wraps, stickers, rubber coating, etc.) onto the vehicle.
  • The device is mounted incorrectly.
  • When in sharp curves, like on-off ramps, intersections etc...; openpilot is designed to be limited in the amount of steering torque it can produce.
  • In the presence of restricted lanes or construction zones.
  • When driving on highly banked roads or in presence of strong cross-wind.
  • Extremely hot or cold temperatures.
  • Bright light (due to oncoming headlights, direct sunlight, etc.).
  • Driving on hills, narrow, or winding roads.

The list above does not represent an exhaustive list of situations that may interfere with proper operation of openpilot components. It is the driver's responsibility to be in control of the vehicle at all times.

Limitations of openpilot ACC and FCW

openpilot ACC and openpilot FCW are not systems that allow careless or inattentive driving. It is still necessary for the driver to pay close attention to the vehicle’s surroundings and to be ready to re-take control of the gas and the brake at all times.

Many factors can impact the performance of openpilot ACC and openpilot FCW, causing them to be unable to function as intended. These include, but are not limited to:

  • Poor visibility (heavy rain, snow, fog, etc.) or weather conditions that may interfere with sensor operation.
  • The road facing camera or radar are obstructed, covered, or damaged by mud, ice, snow, etc.
  • Obstruction caused by applying excessive paint or adhesive products (such as wraps, stickers, rubber coating, etc.) onto the vehicle.
  • The device is mounted incorrectly.
  • Approaching a toll booth, a bridge or a large metal plate.
  • When driving on roads with pedestrians, cyclists, etc...
  • In presence of traffic signs or stop lights, which are not detected by openpilot at this time.
  • When the posted speed limit is below the user selected set speed. openpilot does not detect speed limits at this time.
  • In presence of vehicles in the same lane that are not moving.
  • When abrupt braking maneuvers are required. openpilot is designed to be limited in the amount of deceleration and acceleration that it can produce.
  • When surrounding vehicles perform close cut-ins from neighbor lanes.
  • Driving on hills, narrow, or winding roads.
  • Extremely hot or cold temperatures.
  • Bright light (due to oncoming headlights, direct sunlight, etc.).
  • Interference from other equipment that generates radar waves.

The list above does not represent an exhaustive list of situations that may interfere with proper operation of openpilot components. It is the driver's responsibility to be in control of the vehicle at all times.

Limitations of openpilot DM

openpilot DM should not be considered an exact measurement of the alertness of the driver.

Many factors can impact the performance of openpilot DM, causing it to be unable to function as intended. These include, but are not limited to:

  • Low light conditions, such as driving at night or in dark tunnels.
  • Bright light (due to oncoming headlights, direct sunlight, etc.).
  • The driver's face is partially or completely outside field of view of the driver facing camera.
  • The driver facing camera is obstructed, covered, or damaged.

The list above does not represent an exhaustive list of situations that may interfere with proper operation of openpilot components. A driver should not rely on openpilot DM to assess their level of attention.

User Data and comma Account

By default, openpilot uploads the driving data to our servers. You can also access your data by pairing with the comma connect app (iOS, Android). We use your data to train better models and improve openpilot for everyone.

openpilot is open source software: the user is free to disable data collection if they wish to do so.

openpilot logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs. The driver facing camera is only logged if you explicitly opt-in in settings. The microphone is not recorded.

By using openpilot, you agree to our Privacy Policy. You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.

Safety and Testing

  • openpilot observes ISO26262 guidelines, see SAFETY.md for more details.
  • openpilot has software in the loop tests that run on every commit.
  • The safety model code lives in panda and is written in C, see code rigor for more details.
  • panda has software in the loop safety tests.
  • Internally, we have a hardware in the loop Jenkins test suite that builds and unit tests the various processes.
  • panda has additional hardware in the loop tests.
  • We run the latest openpilot in a testing closet containing 10 comma devices continuously replaying routes.

Testing on PC

For simplified development and experimentation, openpilot can be run in the CARLA driving simulator, which allows you to develop openpilot without a car. The whole setup should only take a few minutes.

Steps:

  1. Start the CARLA server on first terminal
bash -c "$(curl https://raw.githubusercontent.com/commaai/openpilot/master/tools/sim/start_carla.sh)" 
  1. Start openpilot on second terminal
bash -c "$(curl https://raw.githubusercontent.com/commaai/openpilot/master/tools/sim/start_openpilot_docker.sh)" 
  1. Press 1 to engage openpilot

See the full README

You should also take a look at the tools directory in master: lots of tools you can use to replay driving data, test, and develop openpilot from your PC.

Community and Contributing

openpilot is developed by comma and by users like you. We welcome both pull requests and issues on GitHub. Bug fixes and new car ports are encouraged.

You can add support for your car by following guides we have written for Brand and Model ports. Generally, a car with adaptive cruise control and lane keep assist is a good candidate. Join our Discord to discuss car ports: most car makes have a dedicated channel.

Want to get paid to work on openpilot? comma is hiring.

And follow us on Twitter.

Directory Structure

. ├── cereal # The messaging spec and libs used for all logs ├── common # Library like functionality we've developed here ├── installer/updater # Manages updates of NEOS ├── opendbc # Files showing how to interpret data from cars ├── panda # Code used to communicate on CAN ├── phonelibs # External libraries ├── pyextra # Extra python packages not shipped in NEOS └── selfdrive # Code needed to drive the car ├── assets # Fonts, images, and sounds for UI ├── athena # Allows communication with the app ├── boardd # Daemon to talk to the board ├── camerad # Driver to capture images from the camera sensors ├── car # Car specific code to read states and control actuators ├── common # Shared C/C++ code for the daemons ├── controls # Planning and controls ├── debug # Tools to help you debug and do car ports ├── locationd # Precise localization and vehicle parameter estimation ├── logcatd # Android logcat as a service ├── loggerd # Logger and uploader of car data ├── modeld # Driving and monitoring model runners ├── proclogd # Logs information from proc ├── sensord # IMU interface code ├── test # Unit tests, system tests, and a car simulator └── ui # The UI 

Licensing

openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.

Any user of this software shall indemnify and hold harmless comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.

THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT. YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS. NO WARRANTY EXPRESSED OR IMPLIED.


openpilot testsTotal alertsLanguage grade: PythonLanguage grade: C/C++codecov

About

openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 100 supported car makes and models.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++49.2%
  • C39.8%
  • Python10.1%
  • MATLAB0.2%
  • Perl0.2%
  • Shell0.2%
  • Other0.3%