openpilot/tools/webcam
Willem Melching e9c4a75a5c
Remove dockerhub references from CI (#20038)
* cache from base image

* specify github repo
2021-02-08 11:53:47 +01:00
..
Dockerfile Remove dockerhub references from CI (#20038) 2021-02-08 11:53:47 +01:00
README.md grey panda is unsupported (#2458) 2020-11-03 19:56:25 -08:00
accept_terms.py Enable more flake8 checks (#1602) 2020-05-30 20:14:58 -07:00
front_mount_helper.py enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
warp_vis.py enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00

README.md

Run openpilot with webcam on PC/laptop

What's needed:

  • Ubuntu 20.04
  • Python 3.8.2
  • GPU (recommended)
  • Two USB webcams, at least 720p and 78 degrees FOV (e.g. Logitech C920/C615)
  • Car harness with black panda to connect to your car
  • Panda paw (or USB-A to USB-A cable) to connect panda to your computer
  • Tape, Charger, ... That's it!

Clone openpilot and install the requirements

cd ~
git clone https://github.com/commaai/openpilot.git
  • Follow this readme to install the requirements
  • Add line "export PYTHONPATH=$HOME/openpilot" to your ~/.bashrc
  • Install tensorflow 2.2 and nvidia drivers: nvidia-xxx/cuda10.0/cudnn7.6.5
  • Install OpenCL Driver
  • Install OpenCV4 (ignore the Python part)

Build openpilot for webcam

cd ~/openpilot
  • check out selfdrive/camerad/cameras/camera_webcam.cc lines 72 and 146 before building if any camera is upside down
USE_WEBCAM=1 scons -j$(nproc)

Connect the hardware

  • Connect the road facing camera first, then the driver facing camera
  • (default indexes are 1 and 2; can be modified in selfdrive/camerad/cameras/camera_webcam.cc)
  • Connect your computer to panda

GO

cd ~/openpilot/tools/webcam
./accept_terms.py # accept the user terms so that thermald can detect the car started
cd ~/openpilot/selfdrive
PASSIVE=0 NOSENSOR=1 WEBCAM=1 ./manager.py
  • Start the car, then the UI should show the road webcam's view
  • Adjust and secure the webcams (you can run tools/webcam/front_mount_helper.py to help mount the driver camera)
  • Finish calibration and engage!