Files
sunnypilot/tools
Trey Moen 786b46c0b4 feat: op esim and esim.py 2 (#35314)
* init: lpa interface

* handle multiple messages

* handle timeouts

* delete old LPA, add enable/disable/validation

* check if valid

* keep old file the same for easier diff

* keep

* nickname, bug fixes

* space

* simple

* need to test this on slow conn

* initial HITL test for eSIM provisioning

* cleanup

* lint

* test flakes if lpac called concurrently

* no

* cleanup

* org

* comment

* vibe coded uts

* Revert "vibe coded uts"

This reverts commit 8b4d8f8ade50dbeaf3fa44f1df1aa2d809deca18.

* much simpler test

* no value

* remove no value add comments

* only one test flow now

* simpler

* reorganize

* replace impl

* brevity

* moar

* why didnt u rename

* moar

* check lpac installed

* Profile dataclass

* shorten

* print out profiles

* better

* plurals

* argparse

* download/nickname

* move to end to show change

* just end early if already enabled

* --reboot

* reconfigure conn

* mutations require reboot today

* not needed

* lint

* guard delete

* better

* print help

* spaceg

* rename

* support at device

* choose backend

* desc

* more

* brackets

* op esim

* Revert "brackets"

This reverts commit 124dbc0cbcc07d93f556ca80a6dc47aa118fda5c.

* Update Jenkinsfile
2025-05-21 12:45:05 -07:00
..
2025-05-17 12:00:24 -07:00
2025-05-13 17:04:16 -07:00
2025-04-14 17:17:59 -07:00
2025-03-03 16:28:49 -08:00
2020-01-17 10:07:22 -08:00
2024-12-16 09:37:29 -08:00
2025-03-20 20:45:41 -07:00
2025-05-21 12:45:05 -07:00
2024-08-23 15:19:21 -07:00

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