opendbc is a Python API for your car.
Read the speed, steering angle, and more. Send gas, braking, and steering commands.
Most cars since 2016 have electronically-actuatable steering, gas, and brakes thanks to LKAS and ACC. The goal of this project is to support controlling every single one of those cars. See docs/CARS.md for the current supported cars list.
While the primary focus is on supporting ADAS interfaces for openpilot, we're also interested in reading and writing as many things as we can: EV charge status, lock/unlocking doors, etc.
All opendbc development is coordinated on GitHub and Discord. Check out the #dev-opendbc-cars
channel and Vehicle Specific
section.
Short term
pip install opendbc
Longer term
Contributions towards anything here are welcome.
Every car port is eligible for a bounty:
In addition to the standard bounties, we also offer higher value bounties for more popular cars. See those at comma.ai/bounties.
opendbc/dbc/
is a repository of DBC filesopendbc/can/
is a library for parsing and building CAN messages from DBC filesopendbc/car/
is a high-level library for interfacing with cars using Pythongit clone https://github.com/commaai/opendbc.git
cd opendbc
# Install the dependencies
pip3 install -e .[testing,docs]
# Build
scons -j8
# Run the tests
pytest .
# Run the linter
pre-commit run --all-files
# ./test.sh is the all-in-one that will install deps, build, lint, and test
./test.sh
examples/
contains small example programs that can read state from the car and control the steering, gas, and brakes.
examples/joystick.py
allows you to control a car with a joystick.
How do I use this?
Depends on what you want to do. openpilot is our development target and offers a replacement for your car's ADAS, but you can also use a panda for basic control or just reading state from your car.
What hardware do I need?
Which cars are supported?
See the supported cars list.
Can I add support for my car?
Yes, most car support comes from the community. Join the Discord and watch this talk to get started. (We also offer paid bounties on car ports.)
Which cars can be supported?
Any car with LKAS and ACC. More info here.
How does this work?
In short, we designed hardware to sit at a convenient spot on your car's communication bus that allows for filtering out interesting messages and replacing them with our own.
See this talk for an in-depth explanation.
comma is hiring engineers to work on opendbc and openpilot. We love contributors.