3‐Localization Pipeline - LOG795-UAV-Search-and-Rescue/documentation GitHub Wiki

Drone Localization Pipeline

This page explains how the drone (VOXL‑powered UAV) generates localization data, formats it, and streams it wirelessly to the rover or operator PC.


Overview

The drone uses:

  • VOXL2 onboard computer
  • Visual‑Inertial Odometry (VIO) via voxl-qvio-server
  • UDP streaming to send pose information (x, y, quality, reset flag)

This localization pipeline allows the rover to follow the drone or move to its commanded position.


Localization Data Flow

VOXL Cameras + IMU
        ↓
OpenVINS / QVIO
        ↓
voxl-inspect-qvio (real‑time stream)
        ↓
Python script on VOXL
        ↓ UDP →
Laptop / Rover Computer

Data Format

Every localization packet sent from the drone has:

timestamp, x, y, msg, quality, reset_flag

Example:

1738532812.221, -0.120, 0.055, FOLLOW, 92, 0
Field Meaning
timestamp Unix time
x,y Drone position in meters (VIO local frame)
quality VIO tracking quality (0–100%)
reset_flag 1 when VIO resets, 0 otherwise

Reset Behavior

QVIO can reset when visual tracking is lost (e.g., occlusion, low light).
When this happens:

  • VOXL sets reset_flag = 1
  • Drone position jumps to (0,0)
  • Rover performs a graceful reset (finish last movement → return to origin)

Script Running on the Drone (Sender)

python3 send_vio_udp.py

This script: Reads VOXL VIO data
Sends UDP packets to PC/rover
Supports user input for Come‑To‑Me mode trigger


Testing VIO on the Drone

Before streaming, verify VIO works:

voxl-inspect-qvio

Expected:

T_imu_wrt_vio (m) | quality | state
-0.02 0.05 -0.01  |  93%    | OKAY

Notes

  • Best performance with textured environments and good lighting
  • Low quality values (<20) trigger safe behavior
  • Works without GPS (indoor‑friendly)