From b2a708490609efdcd6a3d7e4214eb030b844e48e Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 20 Jun 2026 13:54:47 -0700 Subject: [PATCH] move webcam to system/camerad/ (#38196) * move webcam to system/camerad/ * lil more --- {tools => system/camerad}/webcam/README.md | 9 +-------- {tools => system/camerad}/webcam/camera.py | 0 {tools => system/camerad}/webcam/camerad.py | 2 +- system/manager/process_config.py | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) rename {tools => system/camerad}/webcam/README.md (63%) rename {tools => system/camerad}/webcam/camera.py (100%) rename {tools => system/camerad}/webcam/camerad.py (97%) diff --git a/tools/webcam/README.md b/system/camerad/webcam/README.md similarity index 63% rename from tools/webcam/README.md rename to system/camerad/webcam/README.md index 6abbc4793..2c0ce6a8a 100644 --- a/tools/webcam/README.md +++ b/system/camerad/webcam/README.md @@ -1,13 +1,5 @@ # Run openpilot with webcam on PC -What's needed: -- Ubuntu 24.04 ([WSL2 is not supported](https://github.com/commaai/openpilot/issues/34216)) or macOS -- GPU (recommended) -- One USB webcam, at least 720p and 78 degrees FOV (e.g. Logitech C920/C615, NexiGo N60) -- [Car harness](https://comma.ai/shop/products/comma-car-harness) -- [panda](https://comma.ai/shop/panda) -- USB-A to USB-A cable to connect panda to your computer - ## Setup openpilot - Follow [this readme](../README.md) to install and build the requirements @@ -16,6 +8,7 @@ What's needed: - Connect your computer to panda ## GO + ``` USE_WEBCAM=1 system/manager/manager.py ``` diff --git a/tools/webcam/camera.py b/system/camerad/webcam/camera.py similarity index 100% rename from tools/webcam/camera.py rename to system/camerad/webcam/camera.py diff --git a/tools/webcam/camerad.py b/system/camerad/webcam/camerad.py similarity index 97% rename from tools/webcam/camerad.py rename to system/camerad/webcam/camerad.py index f1e70d948..401eec106 100755 --- a/tools/webcam/camerad.py +++ b/system/camerad/webcam/camerad.py @@ -7,7 +7,7 @@ from collections import namedtuple from msgq.visionipc import VisionIpcServer, VisionStreamType from cereal import messaging -from openpilot.tools.webcam.camera import Camera +from openpilot.system.camerad.webcam.camera import Camera from openpilot.common.realtime import Ratekeeper ROAD_CAM = os.getenv("ROAD_CAM", "0") diff --git a/system/manager/process_config.py b/system/manager/process_config.py index 796e69eef..a442e4f86 100644 --- a/system/manager/process_config.py +++ b/system/manager/process_config.py @@ -79,7 +79,7 @@ procs = [ PythonProcess("logmessaged", "system.logmessaged", always_run), NativeProcess("camerad", "system/camerad", ["./camerad"], or_(driverview, livestream), enabled=not WEBCAM), - PythonProcess("webcamerad", "tools.webcam.camerad", driverview, enabled=WEBCAM), + PythonProcess("webcamerad", "system.camerad.webcam.camerad", driverview, enabled=WEBCAM), PythonProcess("proclogd", "system.proclogd", only_onroad, enabled=platform.system() != "Darwin"), PythonProcess("journald", "system.journald", only_onroad, platform.system() != "Darwin"), PythonProcess("micd", "system.micd", iscar),