-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
39 lines (31 loc) · 2.38 KB
/
config.py
File metadata and controls
39 lines (31 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
ERIC — Configuration
All settings loaded from environment / .env file
"""
import os
from pathlib import Path
from dotenv import load_dotenv
load_dotenv(dotenv_path=Path(__file__).parent / ".env")
# ─── Cosmos (vLLM) ────────────────────────────────────────────────────────────
VLLM_URL = os.getenv("VLLM_URL", "http://localhost:8000/v1/chat/completions")
COSMOS_MODEL = os.getenv("COSMOS_MODEL", "embedl/Cosmos-Reason2-2B-W4A16")
# ─── Serial (Waveshare ESP32 via Jetson UART) ─────────────────────────────────
SERIAL_PORT = os.getenv("SERIAL_PORT", "/dev/ttyTHS1")
SERIAL_BAUD = 115200
MOTOR_SPEED_SLOW = float(os.getenv("MOTOR_SPEED_SLOW", "0.22"))
MOTOR_SPEED_NORMAL = float(os.getenv("MOTOR_SPEED_NORMAL", "0.30"))
MOTOR_SPEED_FAST = float(os.getenv("MOTOR_SPEED_FAST", "0.50"))
# ─── Camera ───────────────────────────────────────────────────────────────────
CAMERA_WEBCAM = int(os.getenv("CAMERA_WEBCAM", "2"))
CAMERA_PANTILT = int(os.getenv("CAMERA_PANTILT", "0"))
CAMERA_WIDTH = 640
CAMERA_HEIGHT = 480
SCAN_INTERVAL = 3.0 # seconds between Cosmos scans during mission
# ─── TTS (Piper) ──────────────────────────────────────────────────────────────
PIPER_BINARY = os.getenv("PIPER_BINARY", str(Path.home() / "piper/piper"))
PIPER_MODEL = os.getenv("PIPER_MODEL", str(Path.home() / "piper/voices/en_US-danny-low.onnx"))
# ─── Missions ─────────────────────────────────────────────────────────────────
MISSIONS_DIR = Path(__file__).parent / "missions"
# ─── Gradio ───────────────────────────────────────────────────────────────────
GRADIO_PORT = int(os.getenv("GRADIO_PORT", "7860"))
GRADIO_HOST = os.getenv("GRADIO_HOST", "0.0.0.0")