# tracking_params.yaml — saltybot_social_tracking / TrackingFusionNode
#
# Run with:
#   ros2 launch saltybot_social_tracking tracking.launch.py
#
# Topics consumed:
#   /uwb/target     (geometry_msgs/PoseStamped)  — UWB triangulated position
#   /person/target  (geometry_msgs/PoseStamped)  — camera-detected position
#
# Topic produced:
#   /social/tracking/fused_target  (saltybot_social_msgs/FusedTarget)

# ── Source staleness timeouts ──────────────────────────────────────────────────
# UWB driver publishes at ~10 Hz; 1.5 s = 15 missed cycles before declared stale.
uwb_timeout:    1.5   # seconds

# Camera detector publishes at ~30 Hz; 1.0 s = 30 missed frames before stale.
cam_timeout:    1.0   # seconds

# How long the Kalman filter may coast (dead-reckoning) with no live source
# before the node stops publishing.
# At 10 m/s (EUC top-speed) the robot drifts ≈30 m over 3 s — beyond the UWB
# follow-range, so 3 s is a reasonable hard stop.
predict_timeout: 3.0  # seconds

# ── Kalman filter tuning ───────────────────────────────────────────────────────
# process_noise: acceleration noise std-dev (m/s²).
#   EUC riders can brake or accelerate at ~3–5 m/s²; 3.0 is a good starting point.
#   Increase if the filtered track lags behind fast direction changes.
#   Decrease if the track is noisy.
process_noise:   3.0  # m/s²

# UWB position measurement noise (std-dev, metres).
#   DW3000 TWR accuracy ≈ ±10–20 cm; 0.20 accounts for system-level error.
meas_noise_uwb:  0.20 # m

# Camera position noise (std-dev, metres).
#   Depth reprojection error with RealSense D435i at 1–3 m ≈ ±5–15 cm.
meas_noise_cam:  0.12 # m

# ── Control loop ──────────────────────────────────────────────────────────────
control_rate:   20.0  # Hz — KF predict + publish rate

# ── Source arbiter ────────────────────────────────────────────────────────────
# Minimum normalised confidence for a source to be considered live.
# Range [0, 1]; lower = more permissive; default 0.15 keeps slightly stale
# sources active rather than dropping to "predicted" prematurely.
confidence_threshold: 0.15
