openpilot0/tools
Gijs Koning 1c4b145aa4
Improve laikad cpu usage. Less pos fix. Less local imports (#24887)
* Improve laikad cpu usage. Less pos fix. Not local imports

* Add laika to files_common

* Add laika to dockerfile sim

* Fix

* Fix

* undo
2022-06-20 14:24:11 +02:00
..
camerastream visionipc python shim (#24660) 2022-05-25 20:49:56 -07:00
joystick Add gamepad support for body (#24415) 2022-05-12 13:40:05 +02:00
latencylogger latency logger: add offset to visualize overlap (#24644) 2022-05-26 13:41:08 -07:00
lib Move selfdrive/hardware/ to system/ (#24725) 2022-06-11 16:38:24 -07:00
plotjuggler PlotJuggler: add torque control layout (#24726) 2022-06-07 15:01:19 -07:00
replay ui.py: update for nv12 2022-06-13 13:58:22 -07:00
scripts MultiLogIterator: remove wraparound mode (#23360) 2022-01-02 15:16:44 -08:00
serial faster connect 2021-09-22 12:31:48 -07:00
sim Improve laikad cpu usage. Less pos fix. Less local imports (#24887) 2022-06-20 14:24:11 +02:00
ssh remove comma two support (#24248) 2022-04-18 17:55:23 -07:00
tuning Improved steering accuracy measurement script (#23583) 2022-05-12 15:09:37 +02:00
webcam Move camerad to system/ (#24836) 2022-06-19 14:43:49 -07:00
zookeeper zookeeper: add avg power to power_monitor.py 2022-06-18 19:02:09 -07:00
CTF.md Sphinx docs generation (#22697) 2021-10-28 15:14:37 +02:00
README.md tools: update README.md (#23447) 2022-01-07 14:03:27 -08:00
__init__.py
mac_setup.sh Fix gcc-arm-embedded for m1 mac (#24515) 2022-05-13 11:12:59 +02:00
openpilot_env.sh mac: fix setup and re-enable CI (#23365) 2022-01-07 15:15:18 -08:00
ubuntu_setup.sh ubuntu_setup.sh: support 22.04 LTS (#24312) 2022-04-25 14:06:30 -07:00

README.md

openpilot tools

System Requirements

openpilot is developed and tested on Ubuntu 20.04, which is the primary development target aside from the supported embdedded hardware. We also have a CI test to verify that openpilot builds on macOS, but the tools are untested. For the best experience, stick to Ubuntu 20.04, otherwise openpilot and the tools should work with minimal to no modifications on macOS and other Linux systems.

Setup your PC

First, clone openpilot:

cd ~
git clone https://github.com/commaai/openpilot.git

cd openpilot 
git submodule update --init

Then, run the setup script:

# for Ubuntu 20.04 LTS
tools/ubuntu_setup.sh

# for macOS
tools/mac_setup.sh

Activate a shell with the install Python dependencies:

cd openpilot && pipenv shell

Build openpilot with this command:

scons -u -j$(nproc)

Windows

Neither openpilot nor any of the tools are developed or tested on Windows, but the Windows Subsystem for Linux (WSL) should get Windows users a similiar experience to 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-20.04 distribution. Once your Ubuntu WSL environment is setup, follow the Linux setup instructions to finish setting up your environment.

GUI applications do not work with WSL out of the box. You will have to either upgrade your system to Windows 11 or set up an Xorg server.

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
├── 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
├── ssh/                # SSH into a comma device
└── webcam/             # Run openpilot on a PC with webcams