openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
Go to file
Willem Melching fd8b813317 interrupt number different on EON
old-commit-hash: 302417b4cf
2020-05-12 15:14:00 -07:00
.github build release in public CI 2020-05-09 22:16:21 -07:00
apk offroad @ openpilot-apks#a2d5674b 2020-04-28 16:32:48 -07:00
apks@f5d2c1715c RHD support for driver monitoring (#1299) 2020-04-15 16:48:44 -07:00
cereal@12aad06e12 bump cereal 2020-05-07 22:49:53 -07:00
common Using lgtm.com and fixing found alerts (#1452) 2020-05-02 12:07:34 -07:00
external Remove c capnp (#1475) 2020-05-07 22:32:56 -07:00
installer Installer: disable SSH and safer continue.sh write 2020-01-20 15:16:24 -08:00
laika_repo@d172b27f4f bump laika 2020-03-26 10:29:59 -07:00
models 83112b47-3b23-48e4-b65b-8c058766f4c1/100 2020-05-11 09:49:41 -07:00
opendbc@f1e69a6cf9 bump opendbc 2020-05-09 16:45:02 -07:00
panda@6b19fa4961 bump panda 2020-05-11 23:42:30 -07:00
phonelibs Move swaglog to cpp + remove another lib (#1470) 2020-05-08 14:46:10 -07:00
pyextra remove overpy from pyextra 2020-04-24 14:27:05 -07:00
release delete unused lines 2020-05-10 11:25:42 -07:00
scripts LGTM fixes (#1480) 2020-05-09 16:40:43 -07:00
selfdrive Controlsd refactor (#1487) 2020-05-12 15:06:48 -07:00
tools ffprobe use -f instead of -format 2020-05-11 15:32:40 -07:00
.coveragerc-app Integrate codecov.io (#1465) 2020-05-04 14:03:16 -07:00
.dir-locals.el root directory hidden files 2020-01-17 10:25:50 -08:00
.dockerignore root directory hidden files 2020-01-17 10:25:50 -08:00
.editorconfig root directory hidden files 2020-01-17 10:25:50 -08:00
.gitattributes root directory hidden files 2020-01-17 10:25:50 -08:00
.gitignore Integrate codecov.io (#1465) 2020-05-04 14:03:16 -07:00
.gitmodules specify commaai in submodules url (#1049) 2020-02-03 16:33:49 -08:00
.pylintrc root directory hidden files 2020-01-17 10:25:50 -08:00
CONTRIBUTING.md Travis -> GH actions 2020-03-16 15:17:05 -07:00
Dockerfile.openpilot Integrate codecov.io (#1465) 2020-05-04 14:03:16 -07:00
Jenkinsfile Re enable athenad test (#1058) 2020-02-11 19:26:34 -08:00
LICENSE root directory non hidden files 2020-01-17 10:22:00 -08:00
Pipfile update tensorflow-gpu to 2.2.0 2020-05-08 11:02:11 -07:00
Pipfile.lock update tensorflow-gpu to 2.2.0 2020-05-08 11:02:11 -07:00
README.md Add 2020 Honda CRV support (#1464) 2020-05-11 13:52:00 -07:00
RELEASES.md update release date 2020-05-08 15:49:56 -07:00
SAFETY.md root directory non hidden files 2020-01-17 10:22:00 -08:00
SConstruct Move swaglog to cpp + remove another lib (#1470) 2020-05-08 14:46:10 -07:00
codecov.yml disable codecov comment 2020-05-11 10:40:49 -07:00
flake8_openpilot.sh root directory non hidden files 2020-01-17 10:22:00 -08:00
laika root directory non hidden files 2020-01-17 10:22:00 -08:00
launch.sh remove empty line in launch script 2020-01-28 17:12:51 -08:00
launch_chffrplus.sh interrupt number different on EON 2020-05-12 15:14:00 -07:00
launch_openpilot.sh root directory non hidden files 2020-01-17 10:22:00 -08:00
lgtm.yml will remove-js pass LGTM? (#1482) 2020-05-12 12:09:02 -07:00
pylint_openpilot.sh root directory non hidden files 2020-01-17 10:22:00 -08:00
run_docker_tests.sh add missing unit tests to travis config (#979) 2020-01-20 12:46:38 -08:00
update_requirements.sh root directory non hidden files 2020-01-17 10:22:00 -08:00

README.md

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 DevKit and the comma two. A car harness is recommended to connect the EON or comma two to the car. For experimental purposes, openpilot can also run on an Ubuntu computer with external webcams.

Supported Cars

Make Model (US Market Reference) Supported Package ACC No ACC accel below No ALC below
Acura ILX 2016-18 AcuraWatch Plus openpilot 25mph1 25mph
Acura RDX 2016-18 AcuraWatch Plus openpilot 25mph1 12mph
Honda Accord 2018-19 All Stock 0mph 3mph
Honda Accord Hybrid 2018-19 All Stock 0mph 3mph
Honda Civic Hatchback 2017-19 Honda Sensing Stock 0mph 12mph
Honda Civic Sedan/Coupe 2016-18 Honda Sensing openpilot 0mph 12mph
Honda Civic Sedan/Coupe 2019-20 Honda Sensing Stock 0mph 2mph2
Honda CR-V 2015-16 Touring openpilot 25mph1 12mph
Honda CR-V 2017-20 Honda Sensing Stock 0mph 12mph
Honda CR-V Hybrid 2017-2019 Honda Sensing Stock 0mph 12mph
Honda Fit 2018-19 Honda Sensing openpilot 25mph1 12mph
Honda HR-V 2019 Honda Sensing openpilot 25mph1 12mph
Honda Insight 2019 Honda Sensing Stock 0mph 3mph
Honda Odyssey 2018-20 Honda Sensing openpilot 25mph1 0mph
Honda Passport 2019 All openpilot 25mph1 12mph
Honda Pilot 2016-18 Honda Sensing openpilot 25mph1 12mph
Honda Pilot 2019 All openpilot 25mph1 12mph
Honda Ridgeline 2017-20 Honda Sensing openpilot 25mph1 12mph
Lexus CT Hybrid 2017-18 All Stock3 0mph 0mph
Lexus ES 2019 All openpilot 0mph 0mph
Lexus ES Hybrid 2019 All openpilot 0mph 0mph
Lexus IS 2017-2019 All Stock 22mph 0mph
Lexus IS Hybrid 2017 All Stock 0mph 0mph
Lexus NX Hybrid 2018 All Stock3 0mph 0mph
Lexus RX 2016-17 All Stock3 0mph 0mph
Lexus RX 2020 All openpilot 0mph 0mph
Lexus RX Hybrid 2016-19 All Stock3 0mph 0mph
Toyota Avalon 2016 TSS-P Stock3 20mph1 0mph
Toyota Avalon 2017-18 All Stock3 20mph1 0mph
Toyota Camry 2018-20 All Stock 0mph4 0mph
Toyota Camry Hybrid 2018-19 All Stock 0mph4 0mph
Toyota C-HR 2017-19 All Stock 0mph 0mph
Toyota C-HR Hybrid 2017-19 All Stock 0mph 0mph
Toyota Corolla 2017-19 All Stock3 20mph1 0mph
Toyota Corolla 2020 All openpilot 0mph 0mph
Toyota Corolla Hatchback 2019-20 All openpilot 0mph 0mph
Toyota Corolla Hybrid 2020 All openpilot 0mph 0mph
Toyota Highlander 2017-19 All Stock3 0mph 0mph
Toyota Highlander Hybrid 2017-19 All Stock3 0mph 0mph
Toyota Highlander 2020 All openpilot 0mph 0mph
Toyota Highlander Hybrid 2020 All openpilot 0mph 0mph
Toyota Prius 2016 TSS-P Stock3 0mph 0mph
Toyota Prius 2017-19 All Stock3 0mph 0mph
Toyota Prius Prime 2017-20 All Stock3 0mph 0mph
Toyota Rav4 2016 TSS-P Stock3 20mph1 0mph
Toyota Rav4 2017-18 All Stock3 20mph1 0mph
Toyota Rav4 2019-20 All openpilot 0mph 0mph
Toyota Rav4 Hybrid 2016 TSS-P Stock3 0mph 0mph
Toyota Rav4 Hybrid 2017-18 All Stock3 0mph 0mph
Toyota Rav4 Hybrid 2019-20 All openpilot 0mph 0mph
Toyota Sienna 2018 All Stock3 0mph 0mph

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. Here is how to build a Comma Pedal. 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. For DSU locations, see Toyota Wiki page. 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

Make Model (US Market Reference) Supported Package ACC No ACC accel below No ALC below
Buick Regal 20181 Adaptive Cruise openpilot 0mph 7mph
Cadillac ATS 20181 Adaptive Cruise openpilot 0mph 7mph
Chevrolet Malibu 20171 Adaptive Cruise openpilot 0mph 7mph
Chevrolet Volt 2017-181 Adaptive Cruise openpilot 0mph 7mph
Chrysler Pacifica 2017-18 Adaptive Cruise Stock 0mph 9mph
Chrysler Pacifica 2020 Adaptive Cruise Stock 0mph 39mph
Chrysler Pacifica Hybrid 2017-18 Adaptive Cruise Stock 0mph 9mph
Chrysler Pacifica Hybrid 2019-20 Adaptive Cruise Stock 0mph 39mph
Genesis G80 20182 All Stock 0mph 0mph
Genesis G90 20182 All Stock 0mph 0mph
GMC Acadia Denali 20183 Adaptive Cruise openpilot 0mph 7mph
Holden Astra 20171 Adaptive Cruise openpilot 0mph 7mph
Hyundai Elantra 2017-192 SCC + LKAS Stock 19mph 34mph
Hyundai Genesis 2015-162 SCC + LKAS Stock 19mph 37mph
Hyundai Ioniq 20172 SCC + LKAS Stock 0mph 32mph
Hyundai Ioniq 2019 EV2 SCC + LKAS Stock 0mph 32mph
Hyundai Kona 2017-192 SCC + LKAS Stock 22mph 0mph
Hyundai Kona 2019 EV2 SCC + LKAS Stock 0mph 0mph
Hyundai Palisade 20202 All Stock 0mph 0mph
Hyundai Santa Fe 20192 All Stock 0mph 0mph
Hyundai Sonata 20202 All Stock 0mph 0mph
Jeep Grand Cherokee 2016-18 Adaptive Cruise Stock 0mph 9mph
Jeep Grand Cherokee 2019 Adaptive Cruise Stock 0mph 39mph
Kia Forte 20182 SCC + LKAS Stock 0mph 0mph
Kia Optima 20172 SCC + LKAS/LDWS Stock 0mph 32mph
Kia Optima 20192 SCC + LKAS Stock 0mph 0mph
Kia Sorento 20182 SCC + LKAS Stock 0mph 0mph
Kia Stinger 20182 SCC + LKAS Stock 0mph 0mph
Nissan Leaf 2019 Propilot Stock 0mph 0mph
Nissan X-Trail 2018 Propilot Stock 0mph 0mph
Subaru Crosstrek 2018-19 EyeSight Stock 0mph 0mph
Subaru Impreza 2018-20 EyeSight Stock 0mph 0mph
Volkswagen Golf 2016-193 Driver Assistance Stock 0mph 0mph

1Requires a panda and community built giraffe. NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).
2Requires a panda and open sourced Hyundai giraffe, designed for the 2019 Sante Fe; pinout may differ for other Hyundai and Kia models.
3Requires a custom connector for the car harness

Although it's not upstream, there's a community of people getting openpilot to run on Tesla's here

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

Installation Instructions

Install openpilot on an EON or comma two 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 vehicles 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.
  • Right hand driving vehicles.
  • 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 detail.
  • 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 EONs continuously replaying routes.

Testing on PC

Check out 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. We also have a bounty program.

And follow us on Twitter.

Directory Structure

.
├── apk                 # The apk files used for the UI
├── cereal              # The messaging spec and libs used for all logs
├── common              # Library like functionality we've developed here
├── installer/updater   # Manages auto-updates of openpilot
├── opendbc             # Files showing how to interpret data from cars
├── panda               # Code used to communicate on CAN
├── phonelibs           # Libraries used on NEOS devices
├── pyextra             # Libraries used on NEOS devices
└── 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        # Perception, planning and controls
    ├── debug           # Tools to help you debug and do car ports
    ├── locationd       # Soon to be home of precise location
    ├── 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 / GPS interface code
    ├── test            # Unit tests, system tests and a car simulator
    └── ui              # The UI

To understand how the services interact, see cereal/service_list.yaml.

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.


Total alerts Language grade: Python Language grade: C/C++ codecov