Software
opendbc
By comma.ai, United States (checked on github.com/commaai (opens in a new tab)), from github.com/commaai/opendbc (opens in a new tab)
- Cars
- Library
- MIT
A Python library for reading and controlling a car's steering, gas, brakes and other functions over its CAN bus, mainly to support openpilot's driver-assistance features.
Facts
- GitHub stars
- 3,605read on 28 Nov 2026
- Last update
- 25 Nov 2026Newest commit on master
- Maintenance
- Activea commit in the last 90 days
- Difficulty
- Advanced
Checked on GitHub on 28 Nov 2026.
Licenses
- Code
- MIT (opens in a new tab)
Read by Robotheca from LICENSE (opens in a new tab) (MIT) at commit 66b4002 (opens in a new tab), on 28 Nov 2026.
- Commercial use
- Yes
At a glance
- What it is
- Provides a Python API to read vehicle state such as speed and steering angle, and to send steering, gas and brake commands.
- Holds a collection of DBC files that describe the CAN messages used by supported cars.
- Includes a library that parses and builds CAN messages from those DBC files.
- Contains a high-level car interface layer and per-brand code for porting new cars.
- Includes safety firmware for the panda board that restricts which CAN messages can be sent.
- Ships example programs, including one that lets a joystick control a car.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- No robot on Robotheca uses it yet.
- Licence
- MIT. Commercial use: Yes. Where it was read
- Install
- In the creator's words: The project's README (opens in a new tab)
- Maintenance
- Active, last commit on 25 Nov 2026.
Use it
How to install it, in the creator's words: The project's README (opens in a new tab)
Robotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/commaai/opendbc (opens in a new tab)
- The version Robotheca read66b4002 (opens in a new tab)
- Latest releaseRelease 0.3.1 (22 Apr 2026)
Robotheca read the repository at two versions: the summary at 06ade56 and the facts and the README at 66b4002 (read on 28 Nov 2026).
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.md by comma.ai, at commit 66b4002, under MIT (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here
opendbc
opendbc is a Python API for your car.
Control the gas, brake, steering, and more. Read the speed, steering angle, and more.
Docs (opens in a new tab)
· Contribute (opens in a new tab) · Discord (opens in a new tab)
(opens in a new tab) (opens in a new tab) (opens in a new tab)
How to Port a Car — Jason Young, COMMA_CON 2023
How Do We Control The Car? — Robbe Derks, COMMA_CON 2021
Most cars since 2016 have electronically-actuatable steering, gas, and brakes thanks to LKAS (opens in a new tab) and ACC (opens in a new tab). The goal of this project is to support controlling the steering, gas, and brakes on every single one of those cars.
While the primary focus is on supporting ADAS interfaces for openpilot (opens in a new tab), we're also interested in reading and writing as many things as we can (EV charge status, lock/unlocking doors, etc) such that we can build the best vehicle management app ever.
This README and the supported cars list (opens in a new tab) are all the docs for the opendbc project. Everything you need to know to use, contribute, and extend opendbc are in these docs.
Quick start
git clone https://github.com/commaai/opendbc.git
cd opendbc
# you probably just want to use this. it's an all-in-one for dependency
# installation, compiling, linting, and tests. it's also what runs in CI
./test.sh
# here are the individual commands it runs
pip3 install -e .[testing] # install dependencies
scons -j8 # build with 8 cores
unittest-parallel # run the tests
lefthook run lint # run the linter
examples/ (opens in a new tab) contains small example programs that can read state from the car and control the steering, gas, and brakes.
examples/joystick.py (opens in a new tab) allows you to control a car with a joystick.
Project Structure
opendbc/dbc/(opens in a new tab) is a repository of DBC (opens in a new tab) filesopendbc/can/(opens in a new tab) is a library for parsing and building CAN messages from DBC filesopendbc/car/(opens in a new tab) is a high-level library for interfacing with cars using Pythonopendbc/safety/(opens in a new tab) is the functional safety for all the cars supported byopendbc/car/
How to Port a Car
This guide covers everything from adding support to a new car all the way to improving existing cars (e.g. adding longitudinal control or radar parsing). If similar cars to yours are already compatible, most of this work is likely already done for you.
At its most basic, a car port will control the steering on a car. A "complete" car port will have all of: lateral control, longitudinal control, good tuning for both lateral and longitudinal, radar parsing (if equipped), fuzzy fingerprinting, and more. The new car support docs will clearly communicate each car's support level.
Connect to the Car
The first step is to get connected to the car with a comma four and a car harness. The car harness gets you connected to two different CAN buses and splits one of those buses to send our own actuation messages.
If you're lucky, a harness compatible with your car will already be designed and sold on comma.ai/shop. If you're not so lucky, start with a "developer harness" from comma.ai/shop and crimp on whatever connector you need.
Structure of a port
Depending on the brand, most of this basic structure will already be in place.
The entirety of a car port lives in opendbc/car/<brand>/:
carstate.py: parses out the relevant information from the CAN stream using the car's DBC filecarcontroller.py: outputs CAN messages to control the car<brand>can.py: thin Python helpers around the DBC file to build CAN messagesfingerprints.py: database of ECU firmware versions for identifying car modelsinterface.py: high level class for interfacing with the carradar_interface.py: parses out the radarvalues.py: enumerates the brand's supported cars
Reverse Engineer CAN messages
Start off by recording a route with lots of interesting events: enable LKAS and ACC, turn the steering wheel both extremes, etc. Then, load up that route in cabana (opens in a new tab).
Tuning
Longitudinal
Use the longitudinal maneuvers (opens in a new tab) report to evaluate your car's longitudinal control and tune it.
Validation
Before submitting a port, go through the car porting checklist (opens in a new tab).
Contributing
All opendbc development is coordinated on GitHub and Discord (opens in a new tab). Check out the #dev-opendbc-cars channel and Vehicle Specific section.
Roadmap
Short term
-
pip install opendbc - 100% type coverage
- 100% line coverage
- Make car ports easier: refactors, tools, tests, and docs
- Expose the state of all supported cars better: https://github.com/commaai/opendbc/issues/1144 (opens in a new tab)
Longer term
- Extend support to every car with LKAS + ACC interfaces
- Automatic lateral and longitudinal control/tuning evaluation
- Auto-tuning for lateral (opens in a new tab) and longitudinal control
- Automatic Emergency Braking (opens in a new tab)
Contributions towards anything here are welcome.
Safety Model
When a panda (opens in a new tab) powers up with opendbc safety firmware (opens in a new tab), by default it's in SAFETY_SILENT mode. While in SAFETY_SILENT mode, the CAN buses are forced to be silent. In order to send messages, you have to select a safety mode. Some of safety modes (for example SAFETY_ALLOUTPUT) are disabled in release firmwares. In order to use them, compile and flash your own build.
Safety modes optionally support controls_allowed, which allows or blocks a subset of messages based on a customizable state in the board.
Code Rigor
The opendbc safety firmware is written for its use in conjunction with openpilot (opens in a new tab) and panda (opens in a new tab). The safety firmware, through its safety model, provides and enforces the
openpilot safety (opens in a new tab). Due to its critical function, it's important that the application code rigor within the safety folder is held to high standards.
These are the CI regression tests (opens in a new tab) we have in place:
- A generic static code analysis is performed by cppcheck (opens in a new tab).
- In addition, cppcheck (opens in a new tab) has a specific addon to check for MISRA C:2012 (opens in a new tab) violations. See current coverage (opens in a new tab).
- Compiler options are relatively strict: the flags
-Wall -Wextra -Wstrict-prototypes -Werrorare enforced. - The safety logic (opens in a new tab) is tested and verified by unit tests (opens in a new tab) for each supported car variant.
The above tests are themselves tested by:
- a mutation test (opens in a new tab) on the MISRA coverage
- 100% line coverage enforced on the safety unit tests
In addition, we run the ruff linter (opens in a new tab) and ty (opens in a new tab) on the car interface library.
Bounties
Every car port is eligible for a bounty:
- $2000 - Any car brand / platform port (opens in a new tab)
- $250 - Any car model port (opens in a new tab)
- $300 - Reverse Engineering a new Actuation Message (opens in a new tab)
In addition to the standard bounties, we also offer higher value bounties for more popular cars. See those at comma.ai/bounties (opens in a new tab).
FAQ
How do I use this? A comma four (opens in a new tab) is custom-designed to be the best way to run and develop opendbc and openpilot.
Which cars are supported? See the supported cars list (opens in a new tab).
Can I add support for my car? Yes, most car support comes from the community. Read the guide here (opens in a new tab).
Which cars can be supported? Any car with LKAS and ACC. More info here (opens in a new tab).
How does this work? In short, we designed hardware to replace your car's built-in lane keep and adaptive cruise features. See this talk (opens in a new tab) for an in-depth explanation.
Is there a timeline or roadmap for adding car support? No, most car support comes from the community, with comma doing final safety and quality validation. The more complete the community car port is and the more popular the car is, the more likely we are to pick it up as the next one to validate.
Terms
- port: refers to the integration and support of a specific car
- lateral control: aka steering control
- longitudinal control: aka gas/brakes control
- fingerprinting: automatic process for identifying the car
- LKAS (opens in a new tab): lane keeping assist
- ACC (opens in a new tab): adaptive cruise control
- harness (opens in a new tab): car-specific hardware to attach to the car and intercept the ADAS messages
- panda (opens in a new tab): hardware used to get on a car's CAN bus
- ECU (opens in a new tab): computers or control modules inside the car
- CAN bus (opens in a new tab): a bus that connects the ECUs in a car
- cabana (opens in a new tab): our tool for reverse engineering CAN messages
- DBC file (opens in a new tab): contains definitions for messages on a CAN bus
- openpilot (opens in a new tab): an ADAS system for cars supported by opendbc
- comma (opens in a new tab): the company behind opendbc
- comma four (opens in a new tab): the hardware used to run openpilot
More resources
- How Do We Control The Car? (opens in a new tab) by @robbederks (opens in a new tab) from COMMA_CON 2021
- How to Port a Car (opens in a new tab) by @jyoung8607 (opens in a new tab) from COMMA_CON 2023
- commaCarSegments (opens in a new tab): a massive dataset of CAN data from 300 different car models
- cabana (opens in a new tab): our tool for reverse engineering CAN messages
- can_print_changes.py (opens in a new tab): diff the whole CAN bus across two drives, such as one without any LKAS and one with LKAS
- longitudinal maneuvers (opens in a new tab): a tool for evaluating and tuning longitudinal control
- opendbc data (opens in a new tab): a repository of longitudinal maneuver evaluations
Come work with us -- comma.ai/jobs (opens in a new tab)
comma is hiring engineers to work on opendbc and openpilot (opens in a new tab). We love hiring contributors.
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.