* allow re-regage * bump opendbc * bump panda * apply pause/resume fix for hyundai (should do this in a separate PR) * bump opendbc * fix * rename * Fix? * make sure to disengage for allow always cars * fix * combine * more fix * not needed * check if engagement is from openpilot's state machine * Rename * fix panda safety * fix * no fake lfa button for @devtekve ;) * fix non drive gear re-engage * fix settings * combine * add replace method * use replace * remoev already checks if it exists * fix * group * add todo * reserve events * cleaner * hyundai: only allow for cars with lfa button * sunnyParams * make sure it's car only * Move car-specific changes to opendbc * no need * bump opendbc * more fixes * no more available * more! * final? * always emit user disable * no longer needed * move unit test * add sunnypilot to unit tests * bump opendbc * use new cereal * bump opendbc * static analysis * no unittest * no need available * UI border update * show MADS updates * Add TODO * no longer needed * fix changed events * fix cluster enabled * don't add pre enable if not long * should use enabled * enabled <-> active * better format * bump opendbc * static analysis * static analysis * Rename test as collector was dying * Show our overriding * Revert "show MADS updates" This reverts commitdaf0ad62Revert "fix changed events" This reverts commit31d8c97f* ignoring reserved events * adjusting creation delays * back to stock removing allow_cancel * should be enabled * revert * silent lkas disable * no need * user disable tests * just warning * MUST REMOVE test process replay * fix no entry * fixme * bump opendbc * need this check * cleanup * allow entering paused state if no entry from disabled * brake hold should apply to all * in lists * update unit test * simpler * unused * same thing * fix * only mads in enabled state and long in disabled state * unify silent enable * do this for dlob * bump submodules * fix * bump submodules * bump opendbc * less frequent * more events * fix * allow no entry to paused for non-drive gears * fix * use cereal * Revert "allow no entry to paused for non-drive gears" This reverts commit6d64a4dd9c. * allow in all * Revert "allow in all" This reverts commit6375f14891. * should not be all! * rename for clarity * silent park brake * flipped * bump submodules * Bump to latest mads-new panda * bump panda * more nissan * bump panda * bump msgq * bump panda * bump submodules * bump opendbc * bump opendbc * improving the state * Revert "PlayStation® model (#34133)" This reverts commit5160bee543. * should be none * bump panda * bump opendbc * Apply suggestions from code review * bump panda * bump ref panda * add todo-sp * bump panda ref * bump more panda * changing refs * nuke nuke nuke * use sunny's newer states * bump with new panda * bump panda * Parse more flags from alt exp, more tests, hyundai main cruise allowed * Parse more flags from alt exp, more tests, hyundai main cruise allowed * missed * mutation for controls allowed rising edge * ford mutation * license * remove * unused * bump submodules * use always allowed mads button alt exp * fix * whitelist jason's lastname to codespell * test_processes: update ref logs to82c0278* bump submodules * bump submodules * bump submodules * bump panda * add controls mismatch lateral event * Simplify lateral disengagement logic for MADS configuration Reversed the conditional to align the logic with the `disengage_lateral_on_brake` parameter. This ensures that lateral disengagement behavior is more intuitive and matches the expected configuration. Improves code readability and reduces potential misconfigurations. * remove unified engagement mode in panda * controls allow should be allowed at all times * squash! treat MADS button as user entry * heartbeat for mads * heartbeat mismatch exit control * remove always allow mads button from alt * move to safety_mads * remove main cruise allowed from alt * bump panda * heartbeat engaged mads mismatch mutation test * bump panda * use mads the third panda * ignore pre enable with mads * only force exit if actually actuating * use brake signal instead of pedal events when dlob is active * fix tests * fix panda tests * bump panda * new events to retain long blocks * format * uem: do not engage mads if long is engaged * bump submodules * fix not allowed engaged bug * block uem from engaging * flipped * use different heartbeat check if dlob * hard code to skip heartbeat check * remove toyota lta status for lkas, causes weird behaviors * block tesla * bump panda * bump to merged panda * bump opendbc * bump opendbc * bump opendbc * bump opendbc * Apply suggestions from code review * code ignore spells * needs to be in carstate * Bump opendbc * Update MADS toggle descriptions for clarity. Added notes to clarify behavior of the "MadsMainCruiseAllowed" setting, particularly its impact on vehicles without LFA/LKAS buttons. This ensures users are informed about potential implications when disabling this feature. * Updating translations + Adding spanish * Disengage Lateral on Brake -> Pause Lateral on Brake * test_processes: update ref logs todd41005* Apply suggestions from code review * fix mads button not allowed * bump submodules * bump submodule * test_processes: update ref logs to0a0b998* has multiple lists * Revert "has multiple lists" This reverts commita37c1d26fe. * base * Reapply "has multiple lists" This reverts commitd1cd8dcc81. * migrate mads toggles to sp panel * this is why it keeps crashing * house keeping * more housekeeping * more housekeeping * don't show description by default (yet) * reset to main panel when clicked away * more * some more with interactions * don't stretch cause it looks weird with descriptions * simpler to handle offroad transition * some are toggleable while onroad * remove unused event * slight cleanup * default to true for HKG main cruise toggle * append to list after * add Customize MADS to UI preview * simpler * move to sp list * how tf was this removed * update mads settings button on show event * test_processes: update ref logs toefa9c32--------- Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
openpilot tools
System Requirements
openpilot is developed and tested on Ubuntu 24.04, which is the primary development target aside from the supported embedded hardware.
Most of openpilot should work natively on macOS. On Windows you can use WSL for a nearly native Ubuntu experience. Running natively on any other system is not currently recommended and will likely require modifications.
Native setup on Ubuntu 24.04 and macOS
1. Clone openpilot
NOTE: This repository uses Git LFS for large files. Ensure you have Git LFS installed and set up before cloning or working with it.
Either do a partial clone for faster download:
git clone --filter=blob:none --recurse-submodules --also-filter-submodules https://github.com/commaai/openpilot.git
or do a full clone:
git clone --recurse-submodules https://github.com/commaai/openpilot.git
2. Run the setup script
cd openpilot
tools/op.sh setup
3. Git LFS
git lfs pull
4. Activate a python shell
Activate a shell with the Python dependencies installed:
source .venv/bin/activate
5. Build openpilot
scons -u -j$(nproc)
WSL on Windows
Windows Subsystem for Linux (WSL) should provide a similar experience to native Ubuntu. WSL 2 specifically has been reported by several users to be a seamless experience.
Follow these instructions to setup the WSL and install the Ubuntu-24.04 distribution. Once your Ubuntu WSL environment is setup, follow the Linux setup instructions to finish setting up your environment. See these instructions for running GUI apps.
NOTE: If you are running WSL and any GUIs are failing (segfaulting or other strange issues) even after following the steps above, you may need to enable software rendering with LIBGL_ALWAYS_SOFTWARE=1, e.g. LIBGL_ALWAYS_SOFTWARE=1 selfdrive/ui/ui.
CTF
Learn about the openpilot ecosystem and tools by playing our CTF.
Directory Structure
├── ubuntu_setup.sh # Setup script for Ubuntu
├── mac_setup.sh # Setup script for macOS
├── cabana/ # View and plot CAN messages from drives or in realtime
├── camerastream/ # Cameras stream over the network
├── joystick/ # Control your car with a joystick
├── lib/ # Libraries to support the tools and reading openpilot logs
├── plotjuggler/ # A tool to plot openpilot logs
├── replay/ # Replay drives and mock openpilot services
├── scripts/ # Miscellaneous scripts
├── serial/ # Tools for using the comma serial
├── sim/ # Run openpilot in a simulator
└── webcam/ # Run openpilot on a PC with webcams