This commit is contained in:
Sebastian Unterschütz
2026-04-21 10:58:12 +02:00
parent 37f98ccb86
commit 8c77744cad
12 changed files with 954 additions and 527 deletions

28
drone_pilot/config.py Normal file
View File

@@ -0,0 +1,28 @@
# drone_pilot/config.py
class Config:
WIN_NAME = "Tello AI Pilot v2.0 (High Speed)"
WIDTH, HEIGHT = 1024, 720
TARGET_ALTITUDE = 1.5
TARGET_FACE_SIZE = 180
TARGET_PERSON_SIZE = 400
ALT_THRESHOLD = 0.12
YAW_GAIN = 0.12 # Reduced for smoother rotation
FORWARD_GAIN = 1.5 # Kept high for fast pursuit
ALT_GAIN = 40
DEPTH_THRESHOLD = 0.90
OBSTACLE_TOF_CM = 70
FACE_DEADZONE = 30 # Slightly larger deadzone for stability
FACE_ROT_ONLY = 100
PERSON_CONF_THRESHOLD = 0.5
SMOOTHING_ALPHA = 0.35 # High directness, but slightly more damped than extreme
class Colors:
GREEN = (0, 255, 0)
RED = (0, 0, 255)
BLUE = (255, 0, 0)
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
HUD_BG = (10, 10, 10)