-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Openpilot webcam support improved (#34215)
* control webcam with ENV vars * WIP: actual instructions * wording * file no longer exists * this is expected behavior, just untested * more readable * tested on fresh install * wording tweaks * explicit USE_WEBCAM toggle required Co-authored-by: Adeeb Shihadeh <[email protected]> * debug-ability improved Co-authored-by: Adeeb Shihadeh <[email protected]> Co-authored-by: Adeeb Shihadeh <[email protected]> * newline removed --------- Co-authored-by: Adeeb Shihadeh <[email protected]>
- Loading branch information
1 parent
9f3c2f0
commit 7a72e41
Showing
4 changed files
with
25 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
# Run openpilot with webcam on PC | ||
|
||
What's needed: | ||
- Ubuntu 24.04 | ||
- Ubuntu 24.04 ([WSL2 is not supported](https://github.com/commaai/openpilot/issues/34216)) | ||
- GPU (recommended) | ||
- Two USB webcams, at least 720p and 78 degrees FOV (e.g. Logitech C920/C615) | ||
- [Car harness](https://comma.ai/shop/products/comma-car-harness) with black panda to connect to your car | ||
- [Panda paw](https://comma.ai/shop/products/panda-paw) or USB-A to USB-A cable to connect panda to your computer | ||
That's it! | ||
|
||
## Setup openpilot | ||
- Follow [this readme](../README.md) to install and build the requirements | ||
- Install OpenCL Driver | ||
``` | ||
cd ~ | ||
git clone https://github.com/commaai/openpilot.git | ||
``` | ||
- Follow [this readme](https://github.com/commaai/openpilot/tree/master/tools) to install the requirements | ||
- Install [OpenCL Driver](https://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/15532/l_opencl_p_18.1.0.015.tgz) | ||
|
||
## Build openpilot for webcam | ||
``` | ||
cd ~/openpilot | ||
USE_WEBCAM=1 scons -j$(nproc) | ||
sudo apt install pocl-opencl-icd | ||
``` | ||
|
||
## Connect the hardware | ||
- Connect the road facing camera first, then the driver facing camera | ||
- (default indexes are 1 and 2; can be modified in system/camerad/cameras/camera_webcam.cc) | ||
- Connect your computer to panda | ||
|
||
## GO | ||
``` | ||
cd ~/openpilot/system/manager | ||
NOSENSOR=1 USE_WEBCAM=1 ./manager.py | ||
USE_WEBCAM=1 system/manager/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) | ||
- Adjust and secure the webcams. | ||
- Finish calibration and engage! | ||
|
||
## Specify Cameras | ||
|
||
Use the `ROAD_CAM`, `DRIVER_CAM`, and optional `WIDE_CAM` environment variables to specify which camera is which (ie. `DRIVER_CAM=2` uses `/dev/video2` for the driver-facing camera): | ||
``` | ||
USE_WEBCAM=1 ROAD_CAM=4 WIDE_CAM=6 system/manager/manager.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.