nopenpilot/README.md

143 lines
10 KiB
Markdown
Raw Normal View History

![](https://user-images.githubusercontent.com/37757984/127420744-89ca219c-8f8e-46d3-bccf-c1cb53b81bb1.png)
2018-07-12 19:52:06 -06:00
2018-11-17 03:08:34 -07:00
Table of Contents
=======================
* [What is openpilot?](#what-is-openpilot)
2021-10-26 01:14:37 -06:00
* [Running in a car](#running-in-a-car)
* [Running on PC](#running-on-pc)
* [Community and Contributing](#community-and-contributing)
* [User Data and comma Account](#user-data-and-comma-account)
* [Safety and Testing](#safety-and-testing)
* [Directory Structure](#directory-structure)
2018-11-17 03:08:34 -07:00
* [Licensing](#licensing)
---
2016-11-29 19:34:21 -07:00
What is openpilot?
2018-06-16 21:59:34 -06:00
------
2021-11-19 16:24:51 -07:00
[openpilot](http://github.com/commaai/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](docs/CARS.md). In addition, while openpilot is engaged, a camera based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](docs/INTEGRATION.md) and [limitations](docs/LIMITATIONS.md).
2018-06-16 21:59:34 -06:00
2018-07-12 19:52:06 -06:00
<table>
<tr>
2019-10-31 18:14:40 -06:00
<td><a href="https://www.youtube.com/watch?v=mgAbfr42oI8" title="YouTube" rel="noopener"><img src="https://i.imgur.com/kAtT6Ei.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=394rJKeh76k" title="YouTube" rel="noopener"><img src="https://i.imgur.com/lTt8cS2.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=1iNOc3cq8cs" title="YouTube" rel="noopener"><img src="https://i.imgur.com/ANnuSpe.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=Vr6NgrB-zHw" title="YouTube" rel="noopener"><img src="https://i.imgur.com/Qypanuq.png"></a></td>
2018-07-12 19:52:06 -06:00
</tr>
<tr>
2019-10-31 18:14:40 -06:00
<td><a href="https://www.youtube.com/watch?v=Ug41KIKF0oo" title="YouTube" rel="noopener"><img src="https://i.imgur.com/3caZ7xM.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=NVR_CdG1FRg" title="YouTube" rel="noopener"><img src="https://i.imgur.com/bAZOwql.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=tkEvIdzdfUE" title="YouTube" rel="noopener"><img src="https://i.imgur.com/EFINEzG.png"></a></td>
<td><a href="https://www.youtube.com/watch?v=_P-N1ewNne4" title="YouTube" rel="noopener"><img src="https://i.imgur.com/gAyAq22.png"></a></td>
2018-07-12 19:52:06 -06:00
</tr>
</table>
2019-12-13 14:03:08 -07:00
2021-10-26 01:14:37 -06:00
Running in a car
2016-11-29 19:34:21 -07:00
------
2021-10-26 01:14:37 -06:00
To use openpilot in a car, you need four things
* This software. It's free and available right here.
* One of [the 140+ supported cars](docs/CARS.md). We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, and more. If your car is not supported, but has adaptive cruise control and lane keeping assist, it's likely able to run openpilot.
* A supported device to run this software. This can be a [comma two](https://comma.ai/shop/products/two), [comma three](https://comma.ai/shop/products/three), or if you like to experiment, a [Ubuntu computer with webcams](https://github.com/commaai/openpilot/tree/master/tools/webcam).
* A way to connect to your car. With a comma two or three, you need only a [car harness](https://comma.ai/shop/products/car-harness). With an EON Gold or PC, you also need a [black panda](https://comma.ai/shop/products/panda).
2016-11-29 19:34:21 -07:00
2021-10-26 01:14:37 -06:00
We have detailed instructions for [how to install the device in a car](https://comma.ai/setup).
2016-11-29 19:34:21 -07:00
2021-10-26 01:14:37 -06:00
Running on PC
2018-07-12 19:52:06 -06:00
------
2018-01-30 13:58:14 -07:00
2021-10-26 01:14:37 -06:00
All of openpilot's services can run as normal on a PC, even without special hardware or a car. To develop or experiment with openpilot you can run openpilot on recorded or simulated data.
2021-10-26 01:14:37 -06:00
With openpilot's tools you can plot logs, replay drives and watch the full-res camera streams. See [the tools README](tools/README.md) for more information.
2021-10-26 01:14:37 -06:00
You can also run openpilot in simulation [with the CARLA simulator](tools/sim/README.md). This allows openpilot to drive around a virtual car on your Ubuntu machine. The whole setup should only take a few minutes, but does require a decent GPU.
2019-12-13 14:03:08 -07:00
2021-10-26 01:14:37 -06:00
Community and Contributing
------
2021-10-26 01:14:37 -06:00
openpilot is developed by [comma](https://comma.ai/) and by users like you. We welcome both pull requests and issues on [GitHub](http://github.com/commaai/openpilot). Bug fixes and new car ports are encouraged. Check out [the contributing docs](docs/CONTRIBUTING.md).
2021-11-19 16:24:51 -07:00
Documentation related to openpilot development can be found on [docs.comma.ai](https://docs.comma.ai). Information about running openpilot (e.g. FAQ, fingerprinting, troubleshooting, custom forks, community hardware) should go on the [wiki](https://github.com/commaai/openpilot/wiki).
2021-10-26 01:14:37 -06:00
You can add support for your car by following guides we have written for [Brand](https://blog.comma.ai/how-to-write-a-car-port-for-openpilot/) and [Model](https://blog.comma.ai/openpilot-port-guide-for-toyota-models/) ports. Generally, a car with adaptive cruise control and lane keep assist is a good candidate. [Join our Discord](https://discord.comma.ai) to discuss car ports: most car makes have a dedicated channel.
2021-10-26 01:14:37 -06:00
Want to get paid to work on openpilot? [comma is hiring](https://comma.ai/jobs/).
2021-10-26 01:14:37 -06:00
And [follow us on Twitter](https://twitter.com/comma_ai).
User Data and comma Account
------
2021-10-26 01:14:37 -06:00
By default, openpilot uploads the driving data to our servers. You can also access your data through [comma connect](https://connect.comma.ai/). 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.
2021-10-26 01:14:37 -06:00
openpilot logs the road facing cameras, 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.
2021-10-26 01:14:37 -06:00
By using openpilot, you agree to [our Privacy Policy](https://comma.ai/privacy). 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
----
2021-10-26 01:14:37 -06:00
* openpilot observes ISO26262 guidelines, see [SAFETY.md](docs/SAFETY.md) for more details.
2021-07-28 23:47:43 -06:00
* openpilot has software in the loop [tests](.github/workflows/selfdrive_tests.yaml) that run on every commit.
2021-10-26 01:14:37 -06:00
* The code enforcing the safety model lives in panda and is written in C, see [code rigor](https://github.com/commaai/panda#code-rigor) for more details.
* panda has software in the loop [safety tests](https://github.com/commaai/panda/tree/master/tests/safety).
* 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](https://github.com/commaai/panda/blob/master/Jenkinsfile).
2021-07-14 18:34:36 -06:00
* We run the latest openpilot in a testing closet containing 10 comma devices continuously replaying routes.
Directory Structure
2016-11-29 19:34:21 -07:00
------
2018-07-12 19:52:06 -06:00
.
2020-05-09 14:01:35 -06:00
├── cereal # The messaging spec and libs used for all logs
2018-07-12 19:52:06 -06:00
├── common # Library like functionality we've developed here
2021-10-26 01:14:37 -06:00
├── docs # Documentation
2018-07-12 19:52:06 -06:00
├── opendbc # Files showing how to interpret data from cars
├── panda # Code used to communicate on CAN
2021-10-26 01:14:37 -06:00
├── third_party # External libraries
├── pyextra # Extra python packages
2018-07-12 19:52:06 -06:00
└── selfdrive # Code needed to drive the car
2021-07-14 18:34:36 -06:00
├── assets # Fonts, images, and sounds for UI
2019-05-16 14:20:29 -06:00
├── athena # Allows communication with the app
2018-07-12 19:52:06 -06:00
├── boardd # Daemon to talk to the board
├── camerad # Driver to capture images from the camera sensors
2018-07-12 19:52:06 -06:00
├── car # Car specific code to read states and control actuators
├── common # Shared C/C++ code for the daemons
2021-07-14 18:34:36 -06:00
├── controls # Planning and controls
2018-07-12 19:52:06 -06:00
├── debug # Tools to help you debug and do car ports
2021-07-14 18:34:36 -06:00
├── locationd # Precise localization and vehicle parameter estimation
2018-07-12 19:52:06 -06:00
├── logcatd # Android logcat as a service
├── loggerd # Logger and uploader of car data
2019-12-16 19:33:21 -07:00
├── modeld # Driving and monitoring model runners
2018-07-12 19:52:06 -06:00
├── proclogd # Logs information from proc
2021-07-14 18:34:36 -06:00
├── sensord # IMU interface code
├── test # Unit tests, system tests, and a car simulator
└── ui # The UI
2016-11-29 19:34:21 -07:00
Licensing
------
2018-05-22 21:59:04 -06:00
openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
2016-11-29 19:34:21 -07:00
2021-10-26 01:14:37 -06:00
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.
2017-07-28 02:24:39 -06:00
2016-11-29 19:34:21 -07:00
**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.**
2018-11-17 03:08:34 -07:00
---
<img src="https://d1qb2nb5cznatu.cloudfront.net/startups/i/1061157-bc7e9bf3b246ece7322e6ffe653f6af8-medium_jpg.jpg?buster=1458363130" width="75"></img> <img src="https://cdn-images-1.medium.com/max/1600/1*C87EjxGeMPrkTuVRVWVg4w.png" width="225"></img>
2020-05-09 14:01:35 -06:00
2020-07-14 15:26:01 -06:00
[![openpilot tests](https://github.com/commaai/openpilot/workflows/openpilot%20tests/badge.svg?event=push)](https://github.com/commaai/openpilot/actions)
2020-05-09 14:01:35 -06:00
[![Total alerts](https://img.shields.io/lgtm/alerts/g/commaai/openpilot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/commaai/openpilot/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/commaai/openpilot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/commaai/openpilot/context:python)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/commaai/openpilot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/commaai/openpilot/context:cpp)
[![codecov](https://codecov.io/gh/commaai/openpilot/branch/master/graph/badge.svg)](https://codecov.io/gh/commaai/openpilot)