vision speed scheduler

This commit is contained in:
firestar5683
2026-04-06 18:57:38 -05:00
parent 3aa6a8ce52
commit eb04ec95bf
6 changed files with 15 additions and 87 deletions
+2 -3
View File
@@ -41,9 +41,8 @@ TESTING_GROUNDS_SLOT_DEFINITIONS = (
{
"id": TESTING_GROUND_2,
"name": "volt test tune",
"description": "A/B sandbox for planner-aware GM longitudinal limits and a radar-only far-lead distance guard.",
"aLabel": "A - Current behavior",
"bLabel": "B - Clamp + guard",
"description": "Volt longitudinal tuning sandbox.",
"aLabel": "A - Installed tune",
},
{
"id": TESTING_GROUND_3,
+11
View File
@@ -13,6 +13,8 @@ import cv2
import numpy as np
from openpilot.common.constants import CV
from openpilot.common.realtime import set_core_affinity
from openpilot.system.hardware import PC
INFERENCE_INTERVAL = 0.2
FOLLOWUP_INFERENCE_INTERVAL = 0.1
@@ -161,6 +163,7 @@ SCHOOL_ZONE_SHORT_CIRCUIT_CONFIDENCE = 0.78
DEBUG_BASE_DIR = Path("/data/media/0/vision_speed_limit_debug")
DEBUG_CAPTURE_DIRNAME = "captures"
SNAPSHOT_JPEG_QUALITY = 85
SPEED_LIMIT_VISION_AFFINITY_CORES = [0, 1, 2, 3]
@dataclass
@@ -1783,6 +1786,14 @@ class SpeedLimitVisionDaemon:
def main():
# Keep this best-effort helper off the critical control/model/camera cores.
if not PC:
set_core_affinity(SPEED_LIMIT_VISION_AFFINITY_CORES)
# OpenCV may otherwise fan out across many worker threads and starve more
# important daemons during detection bursts.
cv2.setNumThreads(1)
daemon = SpeedLimitVisionDaemon()
daemon.run()