Files
openpilot/launch_env.sh
T
Comma Device f470e9e86e ui streamer: low-latency /ctrl (canvas + WS binary, latest-frame, half-res)
- /ctrl: replace <img> MJPEG with WebSocket binary frames + canvas
  (createImageBitmap), cutting browser buffering latency
- capture: only encode the newest frame (drop backlog)
- encode at STREAM_SCALE (default 0.5) + configurable fps/quality
- add /config endpoint for live tuning without restart
- launch_env defaults: STREAM_FPS=20, STREAM_QUALITY=45, STREAM_SCALE=0.5
2026-09-04 21:08:17 +08:00

30 lines
717 B
Bash
Executable File

#!/usr/bin/env bash
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
export VECLIB_MAXIMUM_THREADS=1
# models get lower priority than ui
# - ui is ~5ms
# - modeld is 20ms
# - DM is 10ms
# in order to run ui at 60fps (16.67ms), we need to allow
# it to preempt the model workloads. we have enough
# headroom for this until ui is moved to the CPU.
export QCOM_PRIORITY=12
if [ -z "$AGNOS_VERSION" ]; then
export AGNOS_VERSION="19.7"
fi
export STAGING_ROOT="/data/safe_staging"
# Comma4-UI-Streamer (MJPEG UI stream) - set STREAM=0 to disable
export STREAM=1
export STREAM_PORT=8082
export STREAM_QUALITY=45
export STREAM_FPS=20
export STREAM_SCALE=0.5