fix up tools readme

pull/23405/head
Adeeb Shihadeh 3 years ago committed by GitHub
parent df7126b982
commit f30a702414
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 114
      tools/README.md

@ -1,68 +1,43 @@
openpilot tools # openpilot tools
============
CTF ## System Requirements
============
Learn about the openpilot ecosystem and tools by playing our [CTF](/tools/CTF.md).
SSH
============
Connect to your comma device using [SSH](ssh/README.md)
openpilot is developed and tested on **Ubuntu 20.04**, which is the primary development target aside from the [supported embdedded hardware](https://github.com/commaai/openpilot#running-on-pc). 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.
System requirements ## Setup your PC
============
openpilot is developed and tested on **Ubuntu 20.04**, which is the primary development target aside from the [supported embdedded hardware](https://github.com/commaai/openpilot#running-on-pc). 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:
============
1. Clone openpilot into your home directory:
``` bash ``` bash
cd ~ cd ~
git clone --recurse-submodules https://github.com/commaai/openpilot.git git clone https://github.com/commaai/openpilot.git
cd openpilot
git submodule update --init
``` ```
2. Run the setup script: Then, run the setup script:
Ubuntu 20.04 LTS:
``` bash ``` bash
# for Ubuntu 20.04 LTS
openpilot/tools/ubuntu_setup.sh openpilot/tools/ubuntu_setup.sh
```
MacOS: # for macOS
``` bash
openpilot/tools/mac_setup.sh openpilot/tools/mac_setup.sh
``` ```
3. Ensure you have a working OpenCL runtime: Activate a shell with the install Python dependencies:
You can verify your OpenCL installation with the `clinfo` command.
If you do not have any working platforms, you can download drivers from your GPU vendor's site.
On Ubuntu you can just install one of the packages returned by `apt search opencl-icd`.
4. Activate the Python environment:
Execute the following command in root openpilot directory:
``` bash ``` bash
pipenv shell cd openpilot && pipenv shell
``` ```
Your shell prompt should change to something similar to `(openpilot) user@machine:~/openpilot$ `. Build openpilot with this command:
5. Build openpilot by running SCons in the root of the openpilot directory
``` bash ``` bash
cd openpilot && scons -j$(nproc) scons -u -j$(nproc)
``` ```
6. Try out some tools! ### Windows
NOTE: you can always run `update_requirements.sh` to pull in new python dependencies.
Windows
------------
Neither openpilot nor any of the tools are developed or tested on Windows, but the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about) should get Windows users a similiar experience to Ubuntu. [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) specifically has been reported by several users to be a seamless experience. Neither openpilot nor any of the tools are developed or tested on Windows, but the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about) should get Windows users a similiar experience to Ubuntu. [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) specifically has been reported by several users to be a seamless experience.
@ -70,43 +45,22 @@ Follow [these instructions](https://docs.microsoft.com/en-us/windows/wsl/install
GUI applications do not work with WSL out of the box. You will have to either [upgrade your system to Windows 11](https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps) or [set up an Xorg server](https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242). GUI applications do not work with WSL out of the box. You will have to either [upgrade your system to Windows 11](https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps) or [set up an Xorg server](https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242).
Tools
============
[Plot logs](plotjuggler) ## CTF
------------- Learn about the openpilot ecosystem and tools by playing our [CTF](/tools/CTF.md).
Easily plot openpilot logs with [PlotJuggler](https://github.com/facontidavide/PlotJuggler), an open source tool for visualizing time series data.
[Run openpilot in a simulator](sim)
-------------
Test openpilots performance in a simulated environment. The [CARLA simulator](https://github.com/carla-simulator/carla) allows you to set a variety of features like:
* Weather
* Environment physics
* Cars
* Traffic and pedestrians
[Replay a drive](replay)
-------------
Review video and log data from routes and stream CAN messages to your device.
[Debug car controls](joystick)
-------------
Use a joystick to control your car.
Welcomed contributions
=============
* Documentation: code comments, better tutorials, etc ## Directory Structure
* Support for platforms other than Ubuntu 20.04
* Performance improvements
* More tools: anything that you think might be helpful to others.
![Imgur](https://i.imgur.com/IdfBgwK.jpg) ```
├── 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
```

Loading…
Cancel
Save