Skip to content
CAI
Software that uses CAICheck a score

commaai/openpilot

48.4

Weak · 25 October 2026

49.1k

lines of production code

Python

with C++, C

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an autonomous driving platform that manages vehicle control, sensor data processing, and user interface rendering. It handles longitudinal and lateral vehicle dynamics through modular control algorithms while maintaining a modern, high-performance UI layer. The codebase provides extensive tooling for car porting, diagnostic analysis, and route data management to support development and integration workflows.

How it got here

2016 — Legacy codebase cleanup and UI migration

18 changes.

This period focused on removing extensive legacy code across the selfdrive, common, and board modules, including old control logic, sensor daemons, and hardware-specific implementations. The project simultaneously migrated the user interface from Qt to Raylib and updated DBC files to align with standard Vector formats.

2020–2026 — Development tooling and control refactoring

16 changes.

This period focused on modernizing the development environment by migrating to pyproject.toml with uv, introducing a unified 'op' CLI, and overhauling the linting framework. Significant architectural changes included restructuring the cereal messaging system, refactoring lateral and longitudinal control logic, and centralizing route access tools. The work also expanded diagnostic utilities for car porting and device management while updating release processes to use Git LFS.

Features

New UI library foundation with eSIM and scrolling capabilities

The \openpilot/system/ui/lib\ directory has been populated with a new set of core UI components. This includes a \CellularManager\ for managing eSIM profiles (download, switch, delete) and a \WifiManager\ for network connectivity and tethering. The UI rendering layer now features a new \GuiScrollPanel2\ with momentum-based scrolling and snapping, alongside a \ShaderPolygon\ for gradient rendering and a \Multilang\ system for localized text with font fallbacks for Asian languages.

openpilot/system/ui/lib · high confidence

New car diagnostic and debugging scripts in tools/scripts/car

Added a suite of new command-line tools in the tools/scripts/car directory to assist with vehicle diagnostics and development. These include can\_print\_changes.py and can\_printer.py for monitoring and analyzing CAN bus traffic, vin.py and fw\_versions.py for retrieving vehicle identification numbers and ECU firmware versions, and clear\_dtc.py and read\_dtc\_status.py for managing diagnostic trouble codes. Additionally, ecu\_addrs.py discovers ECU addresses, disable\_ecu.py handles specific ECU disabling (e.g., Honda Bosch radar), vw\_mqb\_config.py enables or disables Volkswagen Lane Assist via UDS, and toyota\_eps\_factor.py calculates EPS torque scaling factors from log data.

tools/scripts/car · high confidence

New car porting example notebooks for data analysis and fingerprinting

Added several Jupyter notebooks to the car porting examples directory to assist with vehicle integration and debugging. These include \find\_segments\_with\_message.ipynb\ for searching the commaCarSegments database for specific CAN messages, \ford\_vin\_fingerprint.ipynb\ to evaluate VIN-based fingerprinting for Ford vehicles, \hkg\_canfd\_gear\_message.ipynb\ for analyzing gear messages in Hyundai/Kia CAN-FD EVs, \subaru\_fuzzy\_fingerprint.ipynb\ for testing Subaru fuzzy fingerprinting logic, and two Subaru-specific analysis notebooks (\subaru\_long\_accel.ipynb\ and \subaru\_steer\_temp\_fault.ipynb\) for plotting brake/acceleration relationships and steering temperature fault conditions.

_tools/car\porting/examples · high confidence

New car porting utilities and documentation

The tools/car\_porting directory now includes a README with documentation and several new scripts to assist with developing and validating new car ports. auto\_fingerprint.py automatically inserts firmware fingerprints into fingerprints.py based on a route, while test\_car\_model.py runs common interface checks (such as missing signals or panda safety mismatches) against a given route. A new measure\_steering\_accuracy.py script provides real-time or logged analysis of steering control error, and example Jupyter notebooks demonstrate how to analyze CAN signals, plot actuator responses, and check VIN fingerprinting feasibility.

_tools/car\porting · high confidence

New development and CI utility scripts

The scripts directory now includes several new tools to aid development and continuous integration workflows. Developers can use \apply-pr.sh\ and \checkout-pr.sh\ to easily apply and switch to pull requests from GitHub. A new \ci\_results.py\ script fetches and formats status from both GitHub Actions and Jenkins into a Markdown report, while \jenkins\_loop\_test.sh\ automates repeated Jenkins build runs for stability testing. Additional utilities include \waste.c\ and \waste.py\ for benchmarking CPU and memory bandwidth, \test\_pip\_install.sh\ to verify package installation, \disable-powersave.py\ to manage hardware power settings, and \retry.sh\ for command retry logic.

scripts · high confidence

New diagnostic and development scripts in tools/scripts

A collection of new utility scripts has been added to tools/scripts to aid in development, debugging, and device management. These include adb\_ssh.sh for forwarding openpilot service ports and SSH access, devsync.py for file synchronization with devices, and ssh.py for connecting to comma prime devices via a jump server. Diagnostic tools such as count\_events.py, cycle\_alerts.py, live\_cpu\_and\_temp.py, mem\_usage.py, qlog\_size.py, and watch\_timings.py provide insights into system performance, log analysis, and service timing. Additional scripts like fingerprint\_from\_route.py, get\_fingerprint.py, and test\_fw\_query\_on\_routes.py assist with vehicle fingerprinting, while setup\_ssh\_keys.py and set\_car\_params.py handle device configuration.

tools/scripts · high confidence

New tools/lib module for route access, authentication, and file management

The openpilot/tools/lib package has been introduced to centralize tools for interacting with comma routes and the API. It includes a LogReader and FrameReader for parsing route logs and video segments, a CommaApi client for API requests, and a browser-based auth flow supporting Google, Apple, and GitHub sign-ins. The module also provides file source resolution (comma API, internal storage, openpilotci, and commaCarSegments), decompression for bz2 and zst logs, and utilities for Azure container access and GitHub CI artifacts.

openpilot/tools/lib · high confidence

Removals

Removal of legacy C++ sensor daemon implementation

The \selfdrive/sensord\ directory's Makefile and \sensors.cc\ source file have been deleted, removing the legacy C++ implementation that handled sensor polling (accelerometer, gyroscope, magnetometer) and GPS NMEA data via ZMQ. This change eliminates the old sensor loop and hardware interface code from the build, indicating a migration to a different sensor handling mechanism elsewhere in the system.

selfdrive/sensord · high confidence

Removal of legacy C-based UI and touch input subsystem

The legacy C-based user interface implementation and its associated touch input handling have been removed from the selfdrive/ui directory. This change deletes the build configuration (Makefile) and source files (ui.c, touch.c, touch.h) that previously managed the display rendering via OpenGL/EGL and raw Linux input events, indicating a migration away from this specific codebase component.

selfdrive/ui · high confidence

Removal of legacy C-based common components

The \selfdrive/common\ directory has removed several legacy C/C++ header and source files, including \framebuffer\, \mat\, \modeldata\, \mutex\, \swaglog\, \util\, and \visionipc\. This cleanup eliminates older implementations for matrix math, model data structures, logging, and inter-process communication that are no longer used in the current codebase.

selfdrive/common · high confidence

Removal of legacy Extended Kalman Filter implementation

The \common/kalman/ekf.py\ file, which contained the generic Extended Kalman Filter (EKF) framework along with associated sensor classes like \GPS\ and \SimpleSensor\, has been removed from the codebase. This change eliminates the legacy EKF module and its specific sensor processing logic, indicating a shift away from this particular filtering implementation in the common utilities.

common/kalman · high confidence

Removal of legacy STM32F205 board firmware source code

The firmware source files for the legacy STM32F205-based board have been removed from the repository. This includes the build configuration (Makefile), linker script, startup assembly, and all C header and source files defining the hardware abstraction layer (ADC, CAN, DAC, USB, timers) and the main application logic. The deletion eliminates the ability to build or flash this specific hardware variant using the existing codebase.

board · high confidence

Removal of legacy Termux-based installation method

The installation process no longer supports the legacy Termux-based setup. The \install.sh\ script, which previously used ADB to deploy the \continue.sh\ runner and the \id\_rsa\_openpilot\_ro\ SSH key, has been removed along with those files. Users can no longer install or update openpilot via this specific Termux workflow.

installation · high confidence

Removal of legacy boardd implementation files

The legacy C++ implementation (boardd.cc) and Python implementation (boardd.py) of the board daemon, along with its associated Makefile, have been removed from the repository. This change eliminates the old code paths that handled USB communication with the Panda hardware using libusb and ZeroMQ, indicating that the boardd functionality has been fully migrated to a different implementation or architecture elsewhere in the system.

selfdrive/boardd · high confidence

Removal of legacy cereal data structures and generated code

The legacy \cereal\ package has been removed, including the \log.capnp\ schema definition and all generated C and C++ bindings (such as \cereal/gen/c/log.capnp.c\ and \cereal/gen/cpp/log.capnp.c++\). This change eliminates the old data serialization structures and their associated language bindings from the codebase.

cereal · high confidence

Removal of legacy common API module

The legacy \common/api\ module, which previously provided a basic \api\_get\ function for making HTTP requests to the comma.ai backend, has been removed from the codebase.

common/api · high confidence

Removal of legacy common modules

Deleted several legacy modules from the common package: crash.py (Sentry integration), dbc.py (CAN DBC parsing), filters.py (lowpass filter), numpy\_fast.py (utility functions), realtime.py (clock and ratekeeping utilities), and services.py (ZMQ service definitions). These files are no longer part of the codebase.

common · high confidence

Removal of legacy controlsd and control libraries

The \selfdrive/controls\ directory has been removed, deleting the original monolithic \controlsd.py\ process and its associated legacy libraries (\adaptivecruise.py\, \alert\_database.py\, \can\_parser.py\, \carcontroller.py\, \carstate.py\, and \drive\_helpers.py\). This change eliminates the initial Honda-centric control implementation, including its specific CAN parsing, alert definitions, and adaptive cruise logic, as the system has moved to a more modular architecture.

selfdrive/controls · high confidence

Removal of legacy loggerd Python implementation

The legacy loggerd Python implementation has been removed from the codebase. This change deletes the core logging and uploading modules (\logger.py\, \uploader.py\), the main entry point (\loggerd.py\), and the configuration file (\config.py\) that previously handled log rotation, file locking, and cloud uploads via the \selfdrive.loggerd\ package.

selfdrive/loggerd · high confidence

Removal of legacy selfdrive components

The selfdrive directory has been cleaned up by removing several legacy modules: calibrationd (including calibration.py and calibrationd.py), config.py, logmessaged.py, manager.py, messaging.py, registration.py, swaglog.py, and thermal.py. These files are completely deleted, indicating a significant architectural shift away from the previous process management, logging, and calibration implementations.

selfdrive · high confidence

Removal of legacy visiond build artifacts and documentation

The standalone Makefile, README, and the original visiond binary have been removed from the repository. This cleanup eliminates the previous local build and documentation structure for the vision pipeline component, indicating a shift in how this service is managed or integrated within the broader openpilot system.

selfdrive/visiond · high confidence

Removal of logcatd Android log collector

The logcatd service, which previously collected Android system logs (main, radio, system, crash, and kernel) and published them via ZeroMQ on port 8020, has been removed from the system. This eliminates the background process that captured and forwarded these specific Android log streams to other components.

selfdrive/logcatd · high confidence

Removed nanovg and stb font libraries from phonelibs

The nanovg rendering library and its associated stb image and truetype font handling headers have been removed from the phonelibs directory. This deletion eliminates the local dependency on these specific graphics and font-rendering components, likely as part of a broader effort to streamline the library set or migrate to alternative rendering solutions.

phonelibs · high confidence

Architecture

Cereal messaging system relocated to nested openpilot/cereal directory

The openpilot messaging infrastructure (cereal) has been moved into a nested openpilot/cereal directory. This change includes the Cap'n Proto schema definitions (log.capnp, custom.capnp, deprecated.capnp), the Python messaging API (openpilot.cereal.messaging), the C++ SubMaster/PubMaster implementations, and the msgq-to-ZMQ bridge. The relocation is part of a broader repository restructuring to organize the codebase under a nested openpilot namespace.

openpilot · high confidence

Behavioural changes

Comprehensive linting overhaul with new static analysis checks

The \scripts/lint\ directory has been completely rewritten to replace the previous pre-commit hook system with a new, modular linting framework. This change introduces several new checks: a shellcheck-like static analyzer for shell scripts (\check\_shell.py\), validation for Python indentation (\check\_indentation.py\), enforcement of executable permissions on shebang scripts (\check\_shebang\_scripts\_are\_executable.py\), and checks for file size limits (\check\_added\_large\_files.py\) and dependency footprint (\check\_dependencies.py\). It also adds checks for invalid shebang formats and disallowed \NOMERGE\ comments. The main \lint.sh\ script now orchestrates these new tools alongside existing ones like \ruff\ and \ty\, providing a unified \op lint\ interface for developers.

scripts/lint · high confidence

Longitudinal MPC refactoring and cruise speed limit removal

The longitudinal MPC library has been reorganized under the openpilot root directory, with import paths updated accordingly. A significant behavioral change removes the cruise speed limit constraints from the MPC solver; the \v\_cruise\ parameter is no longer passed to the \update\ method, and the logic that created a 'cruise obstacle' to smooth acceleration to the set speed has been deleted. Additionally, the \LeadData.status\ field has been renamed to \present\, and unused solver timing variables have been removed to streamline the code.

_openpilot/selfdrive/controls/lib/longitudinal\_mpc\lib · high confidence

New unified 'op' CLI and streamlined setup workflow

The tools directory now provides a unified 'op' CLI (op.sh) to manage development tasks, replacing the previous separate setup.sh and ad-hoc scripts. This new workflow simplifies installation by handling git submodules, Python environment creation via uv, and system dependency checks in a single command. The tools README has been updated to reflect the new setup instructions, and a new CTF guide is included to help users learn the openpilot ecosystem.

tools · high confidence

Refactor lateral control architecture and simplify longitudinal logic

The lateral control system has been restructured with a new abstract LatControl base class and dedicated implementations (Curvature, PID, Angle, Torque), replacing the previous monolithic structure. The lane-change desire logic has been simplified by removing the lane-line probability fade-in/fade-out states and using a fixed timer for lane-change initiation. Longitudinal control has been streamlined by removing the per-car 'starting' state and 'vEgoStarting' threshold, defaulting directly to PID control upon release of the brake, and moving cruise speed limiting out of the MPC into the planner. Additionally, the 'should\_stop' logic was consolidated into a shared helper, and import paths were updated to use the 'openpilot' namespace.

openpilot/selfdrive/controls/lib · high confidence

Release builds now use Git LFS for large models and skip Sentry

The release tooling in tools/release has been updated to use Git Large File Storage (LFS) for the big driving model and camera warps instead of chunking them, which speeds up builds and pushes. The release scripts now include nested packages in the PYTHONPATH, use a custom test runner instead of pytest, and no longer include Sentry in the release artifacts.

tools/release · high confidence

Remove Qt UI and replace with Raylib

The openpilot user interface has been migrated from Qt to Raylib. This change removes the Qt framework and its dependencies, replacing the previous UI implementation with a new Raylib-based renderer. Users will see a refreshed interface built on the new graphics library, which also enables features like 60fps rendering and simplified shader management.

(repo-wide) · high confidence

Updated DBC files to match Vector format

The DBC files in the dbcs directory (including acura\_ilx\_2016\_can, acura\_ilx\_2016\_nidec, and honda\_civic\_touring\_2016\_can) have been modified to align with the Vector DBC format. This change ensures that the CAN database definitions used for parsing vehicle signals are consistent with the standard Vector format, which may affect how signal definitions and message structures are interpreted by the system.

dbcs · high confidence

Test coverage

Added unit tests for WifiManager state transitions; Added unit tests for openpilot tools/lib modules.

Dependencies

Migrate to pyproject.toml with uv and hatchling

The project has replaced its previous dependency management system with a standard pyproject.toml configuration, utilizing uv for package resolution and hatchling for building. This change introduces Python 3.12 as the minimum supported version and organizes dependencies into core, testing, and tools groups. It also explicitly declares submodules (msgq, opendbc, panda, etc.) as editable local sources and configures linting and formatting rules via ruff and ty within the same file.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 48 → 48 (+0.4)

Lenses

  • Code Health 60 → 65 (+4.7)
  • Architecture 87 → 85 (-1.9)
  • Maturity 55 → 59 (+4.1)
  • Readiness 39 → 39 (+0.1)
  • Security 65 → 59 (-6.5)
  • Accessibility 47 → 47 (+0.0)
  • Performance 100 → 100 (+0.0)

Resolved (37)

  • Confusing and redundant receive operations. 'recv_sock' takes a 'wait' bool, 'recv_one' and 'recv_one_or_none' have identical signatures and likely behavior, and 'recv_one_retry' is a blocking variant. The existence of 'recv_one' and 'recv_one_or_none' with the same signature is the primary issue. 'recv_sock' is also ambiguous compared to the specific 'recv_one' variants.
  • Duplicate operation names with identical signatures and likely identical behavior. 'recv_one' and 'recv_one_or_none' are semantically redundant; the 'or_none' suffix is typically used to distinguish from a blocking or retrying variant, but 'recv_one' already implies a single read attempt.
  • Duplicated block (10 lines × 2) (openpilot/selfdrive/ui/mici/onroad/model_renderer.py)
  • Duplicated block (10 lines × 2) (openpilot/selfdrive/ui/mici/onroad/model_renderer.py)
  • Duplicated block (10 lines × 2) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (11–13 lines × 3) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (14 lines × 2) (openpilot/selfdrive/ui/mici/onroad/augmented_road_view.py)
  • Duplicated block (15 lines × 2) (openpilot/selfdrive/ui/mici/onroad/model_renderer.py)
  • Duplicated block (34 lines × 2) (openpilot/selfdrive/ui/mici/onroad/model_renderer.py)
  • Duplicated block (6 lines × 2) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (7 lines × 4) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (7 lines × 6) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (9 lines × 3) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • FileTooLong: comma/modem.py (openpilot/common/hardware/comma/modem.py)
  • Hotspot: openpilot/tools/lib/file_downloader.py (openpilot/tools/lib/file_downloader.py)
  • Inconsistent naming for base64 encode/decode. 'b64e' and 'b64d' are abbreviations. 'base64_trim' is also present. The module 'lpa' contains low-level utility functions with abbreviated names ('b64e', 'b64d') while other modules use full names ('get_commit', 'get_branch'). This is a style inconsistency within the same project.
  • Off-boarding risk: anonymized user #1
  • Off-boarding risk: anonymized user #2
  • Potential redundancy in 'all_checks'. If 'all_checks' is simply a combination of 'all_alive', 'all_freq_ok', and 'all_valid', it might be redundant. However, it could be a convenience method. The naming 'all_*' is consistent. This is likely fine.
  • Redundant method in subclass. HardwareComma inherits from HardwareBase (implied by the structure and method overlap). 'get_sim_lpa' is defined in both. If HardwareComma does not override the implementation, it is redundant. If it does, it's fine, but the signature is identical. This is a common pattern but can be confusing if the base class implementation is generic and the subclass is specific. However, without seeing the body, it's hard to say if it's an override or a duplicate definition. Given the list, it's likely an override. This is not a strong inconsistency.
  • …and 17 more

New (56)

  • Change coupling: developer.py ↔ toggles.py (openpilot/selfdrive/ui/mici/layouts/settings/developer.py)
  • Critical CVE: [GHSA redacted] (uv.lock)
  • Critical vulnerability: [GHSA redacted] (uv.lock)
  • Duplicated block (10 lines × 2) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (11–13 lines × 3) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (14 lines × 2) (openpilot/selfdrive/ui/mici/onroad/augmented_road_view.py)
  • Duplicated block (15 lines × 2) (openpilot/selfdrive/ui/mici/onroad/model_renderer.py)
  • Duplicated block (32 lines × 2) (openpilot/selfdrive/ui/mici/onroad/model_renderer.py)
  • Duplicated block (6 lines × 2) (openpilot/selfdrive/ui/mici/onroad/model_renderer.py)
  • Duplicated block (6 lines × 4) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (6 lines × 6) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • Duplicated block (8 lines × 3) (openpilot/tools/longitudinal_maneuvers/mpc_longitudinal_tuning_report.py)
  • High secret: WD-SECRET-0005 (common/crash.py)
  • High secret: WD-SECRET-0005 (selfdrive/crash.py)
  • High secret: WD-SECRET-0005 (selfdrive/crash.py)
  • High secret: WD-SECRET-0005 (selfdrive/tombstoned.py)
  • High secret: WD-SECRET-0005 (selfdrive/tombstoned.py)
  • High secret: WD-SECRET-0005 (werkzeug/urls.py)
  • High secret: WD-SECRET-0005 (werkzeug/urls.py)
  • Hotspot: openpilot/selfdrive/car/card.py (openpilot/selfdrive/car/card.py)
  • …and 36 more

Changes since last survey

  • 53 commits — 50 feature/other, 3 fixes

By area

  • openpilot/selfdrive — 22 commits
  • openpilot/system — 11 commits
  • (root) — 7 commits
  • openpilot/common — 7 commits
  • openpilot/cereal — 1 commit
  • openpilot/tools — 1 commit
  • scripts/git-lfs — 1 commit
  • tools/README.md — 1 commit
  • tools/release — 1 commit
  • tools/scripts — 1 commit

Notable commits

  • fix: Minor initial set speed fixes (#39099)
  • fix: Revert "AGNOS 20 (#39128)" (#39148)
  • fix: modeld: fix macOS build (#39112)
  • change: A New Dawn
  • change: AGNOS 20 (#39128)
  • change: AGNOS 20.1 (#39149)
  • change: Add configurable initial max speed (#39081)
  • change: Fix typo in Autospeed feature name
  • change: Flip Flop Model (#39156)
  • change: Improve HITL test robustness (#39153)
  • change: Initial cruise set speed scroller ui (#39098)
  • change: MD v3 (#39087)
  • change: Ratekeeper: resync after a stall instead of running catch-up frames (#39095)
  • change: Remove car mass (#39072)
  • change: Remove experimental mode initial cruise speed override (#39077)
  • change: Remove obsolete Chill mode code (#39097)
  • change: Rename to following distance (#39100)
  • change: SCons: avoid premature dependency scans in progress counter (#39131)
  • change: Update RELEASES.md for version 0.11.3 changes
  • change: bump msgq (#39117)
  • …and 33 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

commaai/openpilot was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 25 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9fba666fd485983b5849dfc62550fa1fd37fe338 — the exact code this score is about.
  • Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.6+preprod-d36780c2d857.