person_detector:
  ros__parameters:
    # ── Model paths ──────────────────────────────────────────────────────────
    # TensorRT FP16 engine (built with scripts/build_trt_engine.py)
    # Stored on NVMe for fast load and hardware-specific optimisation.
    engine_path: "/mnt/nvme/saltybot/models/yolov8n.engine"

    # ONNX fallback — used when engine_path not found (dev / CI environments)
    onnx_path: "/mnt/nvme/saltybot/models/yolov8n.onnx"

    # ── Detection thresholds ─────────────────────────────────────────────────
    confidence_threshold: 0.40   # YOLO class confidence (0–1). Lower → more detections but more FP.
    nms_iou_threshold: 0.45      # NMS IoU threshold. Higher → fewer suppressed boxes.

    # ── Depth filtering ───────────────────────────────────────────────────────
    # Only consider persons within this depth range (metres).
    # RealSense D435i reliable range: 0.3–5.0 m
    min_depth: 0.5               # ignore very close objects (robot body artefacts)
    max_depth: 5.0               # ignore persons beyond following range

    # ── Tracker settings ──────────────────────────────────────────────────────
    # Hold last known track position for this many seconds after losing detection.
    # Handles brief occlusion (person walks behind furniture).
    track_hold_duration: 2.0     # seconds

    # Minimum IoU between current detection and existing track to re-associate.
    track_iou_threshold: 0.25

    # ── Output coordinate frame ───────────────────────────────────────────────
    # Frame for /person/target PoseStamped. Must be reachable via TF.
    # sl-controls follow loop expects base_link.
    target_frame: "base_link"

    # ── Debug ─────────────────────────────────────────────────────────────────
    # Publish annotated RGB image to /person/debug_image.
    # Adds ~5ms overhead. Disable on production hardware.
    publish_debug_image: false
