commaai/opendbc

a Python API for your car

What it solves

opendbc provides a standardized, open-source interface for communicating with a vehicle's internal computer systems. It allows developers to read real-time vehicle data (like speed and steering angle) and send control commands (like gas, brake, and steering) to modern cars equipped with Lane Keeping Assist (LKAS) and Adaptive Cruise Control (ACC).

How it works

The project acts as a bridge between high-level software and a car's Controller Area Network (CAN) bus. It uses DBC (CAN Database) files to define the structure of messages sent between vehicle components. The library includes tools to parse these messages, a Python API for high-level control, and a safety layer that enforces strict rules to ensure that any commands sent to the vehicle remain within safe operating parameters.

Who it’s for

It is designed for automotive engineers, researchers, and hobbyists who want to build custom vehicle management applications or integrate advanced driver-assistance systems (ADAS) like openpilot into their own vehicles. It is particularly useful for those looking to "port" support for new car models by reverse-engineering CAN messages.

Highlights

  • Comprehensive CAN Library: Includes tools for parsing and building CAN messages using standardized DBC files.
  • Safety-First Architecture: Features a dedicated safety firmware layer that enforces strict operational limits to prevent dangerous vehicle commands.
  • Community-Driven Porting: Provides a structured framework and documentation for adding support for new car makes and models.
  • Extensive Tooling: Includes utilities for reverse engineering vehicle signals, tuning control systems, and validating car ports through automated testing.

Related

  • Project
  • Project
  • Project
  • Project
  • Project