Skip to content

blue-genie/opendbc

 
 

Repository files navigation

opendbc

opendbc is a Python API for your car. Read the speed, steering angle, and more. Send gas, braking, and steering commands.

Structure

  • opendbc/dbc/ is a repository of DBC files
  • opendbc/can/ is a library for parsing and building CAN messages from DBC files
  • opendbc/car/ is a high-level library for interfacing with cars using Python

Quick start

git 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.

Roadmap

This project was pulled out from openpilot. We're still figuring out the exact API between openpilot and opendbc, so some of these may end up going in openpilot.

  • Extend support to every car with LKAS + ACC interfaces
  • Automatic lateral and longitudinal control/tuning evaluation
  • Auto-tuning for lateral and longitudinal control
  • Automatic Emergency Braking
  • 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: commaai#1144

Contributions towards anything here is welcome. Join the Discord!

FAQ

  • How do I use this? Depends on what you want to do. openpilot is our development target, but you can also use a panda for basic control or just reading state from your car.
  • 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 are supported? See the openpilot supported cars list and grep around the codebase.

About

a Python API for your car

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 82.0%
  • Shell 12.9%
  • C++ 2.7%
  • Cap'n Proto 1.7%
  • Other 0.7%