RTK 2CM · VOXEL MAPPING · A-STAR PLANNING · 360° SCAN

3D Voxel Navigation — autonomous path planning through unknown terrain.

AEOS builds a live 3D occupancy grid from every OAK-D depth frame, then searches it with A-Star — a graph-search algorithm that finds the lowest-cost route through free voxels while avoiding obstacles and people. RTK GPS corrects position to 2 cm, dual TFMini LiDARs and YOLO detections fuse into a 9-sector reactive map, and the 25 Hz navigator sends MAVLink setpoints to the Pixhawk — all on the Jetson Orin NX in under 23 MB of RAM.

NAVIGATION SPECS
RTK GPS accuracy2 cm
Navigator loop rate25 Hz
A-Star path plan time<100 ms
360° full scan time24 s
Outer voxel grid4 M cells · 0.5 m
Inner voxel grid256 K cells · 0.25 m
A-Star connectivity26-connected 3D
Obstacle sectors9 directions
Navigation RAM budget13 MB
Depth integration rate3 Hz → 48K pts/s

System Architecture

Six tightly integrated modules run concurrently at 3–25 Hz, sharing state through a typed blackboard with ~189 keys. The mission executor sits above, issuing waypoints and scan commands. The navigator sits below, consuming sensor data and publishing safe velocities to the Pixhawk.

AEOS NAVIGATION STACK · DATA FLOW
# AEOS Navigation Stack — top to bottom, all running on Jetson Orin NX MISSION EXECUTOR (10 Hz) behavior-tree · waypoints · scan commands publishes: /mission/desired_velocity /mission/scan_request NAVIGATOR (25 Hz) SectorMap (9-dir, 25 Hz) · VelocitySafety (speed-scaled) NavModeManager: SURVEY / INSPECT / CORRIDOR / RTL fuses all inputs → /nav/safe_velocity → MAVLink → Pixhawk 6X 3D WORLD MODEL PointCloud Accumulator (3 Hz) → VoxelMap inner: 20×20×10m at 0.25m · reactive avoidance outer: 100×100×50m at 0.5m · world-fixed NED VoxelMap → A-Star PathPlanner (26-connected, <100ms) cost = move_distance + semantic_cost(person=10, car=9…) │ depth_map · position · heading · YOLO detections SENSORS UM982 RTK GPS (2cm) · OAK-D Pro depth + YOLO TFMini forward (0.15–12m) · TFMini ground AGL HereFlow optical flow · Pixhawk EKF (20Hz NED pose)

RTK GPS — 2 cm Positioning

The Unicore UM982 dual-antenna receiver connects to Portugal's free ReNEP NTRIP network. RTCM correction data from the nearest base station is injected in real time, lifting GPS accuracy from the standard ~1.5 m down to 2 cm when a fixed solution locks. RTK status (none → float → fixed) is tracked on the blackboard and surfaced live in the ground station telemetry panel.

RTK FIX PROGRESSION
NONE ±1.5 m NTRIP FLOAT ±0.3 m RTCM lock FIXED ±0.02 m 2 cm NTRIP: renep.dgterritorio.pt · mountpoint: NEAR · ReNEP Portugal
Blackboard KeyValueMeaning
/nav/rtk_status"fixed"Float or fixed RTK solution
/nav/rtk_accuracy_m0.02Estimated horizontal accuracy (m)
/nav/ntrip_connectedtrueRTCM stream active
/nav/ntrip_rtcm_age_ms<500Age of last correction packet
/vehicle/gps_fix_type66 = RTK fixed (ArduPilot scale)
WHY RTK MATTERS FOR MAPPING

Standard GPS at ±1.5 m means voxel maps from different flights can be misaligned by up to 3 m — more than six 0.5 m voxel widths. With RTK fixed at ±2 cm, maps from consecutive flights align to within 4 cm, allowing the system to accumulate knowledge across missions at the same site.

Positioning

UM982 dual-antenna RTK on UART GPS1 at 230 400 baud

Position accuracy drives voxel map anchoring precision
Corrections

NTRIP client injects RTCM corrections from ReNEP base station

Free national network · reconnects automatically on link drop
EKF Fusion

Pixhawk EKF3 fuses RTK position with IMU + HereFlow optical flow

GPS-denied resilience in obstructed environments via optical flow + downward LiDAR

Dual-Zone 3D Voxel World Model

AEOS builds a persistent 3D occupancy grid from every OAK-D depth frame. A two-zone hierarchical design gives high resolution where it matters (near the drone) and coarser coverage for path planning at range — without exceeding the 50 MB RAM budget on the Jetson Orin NX.

G OUTER ZONE · 100 m × 100 m · 0.5 m VOXELS · A-STAR PATH PLANNING INNER 20m 0.25m GOAL 10 m
TWO-ZONE SPECIFICATIONS
ZoneCoverageResolutionCellsRAM
Inner20×20×10 m0.25 m256K0.49 MB
Outer100×100×50 m0.5 m4M7.63 MB
DEPTH FRAME INTEGRATION (3 Hz)
  1. Re-center inner grid on drone position (shifts when drone moves >2.5 m)
  2. Subsample every 4th pixel → ~16K 3D points per frame
  3. Project each point to world NED using drone pose from Pixhawk EKF
  4. Mark OCCUPIED in inner grid (≤10 m) and outer grid
  5. Ray-cast from drone to each point → mark intermediate voxels FREE
  6. Integrate TFMini forward (1D ray) and TFMini ground (terrain layer)
  7. Track changed voxels for incremental streaming to ground station
MAP PERSISTENCE

Maps save to aeos-flights/maps/{flight_id}.npz on shutdown and auto-save every 60 s during flight. On boot, AEOS loads the most recent map if the GPS home position matches within 50 m — enabling cumulative site knowledge across missions. Compressed size: ~1–2 MB per 100 m³ map.

DEPTH NOISE VALIDATION

Resolution vs. Sensor Accuracy

RangeOAK-D Noise0.25 m voxel
2 m2–4 cm6× noise ✓
5 m5–10 cm2.5× noise ✓
10 m10–20 cm1.25× noise
SEMANTIC COST OVERLAY

YOLO-Driven Obstacle Costs

OAK-D YOLO detections annotate voxels with semantic costs. A-Star prefers low-cost routes even when geometry is clear — a path past a person costs more than a longer path through empty space.

person / bearcost 10
car / truckcost 9
dog / horsecost 7–8
bench / chaircost 2–3
MEMORY BUDGET

Jetson Orin NX — RAM Allocation

Inner voxel grid0.49 MB
Outer voxel grid3.81 MB
Semantic cost grids4.3 MB
A-Star working set~2 MB
Total nav memory~11 MB
+ RGB color grids+12 MB

360° Environmental Scan

When situational awareness is incomplete — at mission start, before a tight corridor, or on sensor discrepancy — AEOS commands the drone to perform a full 360° scan in place. The OAK-D Pro captures depth at 8 headings 45° apart. With 72° HFOV, adjacent captures overlap by ≈27°, ensuring no angular blind spots. The full scan takes approximately 24 seconds.

SCAN STATE MACHINE
scan_state machine (per heading, ×8): ROTATING ─► yaw_cmd = set_yaw(heading_deg, rate=30°/s) │ wait until |current_heading - target| < 5° SETTLING ─► 1.0 s stabilisation hold CAPTURING ─► integrate depth frame into voxel map │ then advance to next heading (+45°) COMPLETE ─► 8/8 headings captured · map fully updated # Timing per heading: # rotate 1.0 s (avg 45° at 30°/s + align) # settle 1.0 s (vibration decay) # capture 1.0 s (depth + YOLO integration) # ───────────────────── # total ~24 s (8 headings × 3 s)
WHEN A SCAN IS TRIGGERED
  • Mission start — before executing the first waypoint
  • Sensor discrepancy — TFMini and OAK-D disagree by >2 m in the same sector
  • CORRIDOR mode entry — before path planning in a confined space
  • Manual trigger — operator command via ground station
  • Hover point — at each inspection waypoint (configurable)
0° N 45° 90° E 135° 180° S 225° 270° 315° 72° HFOV 8 × 45° STEPS · 72° OAK-D HFOV · ~27° OVERLAP · ≈24s TOTAL

Sensor Fusion & 9-Sector Reactive Map

Every 25 Hz navigator tick, AEOS builds a 9-sector directional obstacle map by fusing OAK-D depth, both TFMini LiDARs, and YOLO spatial detections. Each sector holds the closest obstacle distance, threat level, and source sensor. Cross-validation between TFMini and OAK-D catches sensor faults — disagreements >2 m flag a discrepancy on the blackboard.

FWD-LEFT 4.2 m depth FORWARD 1.8 m STOP tfmini FWD-RIGHT 12.0 m clear LEFT 8.5 m depth DRONE AEOS Navigator RIGHT 11.2 m depth UP UNKN no sensor DOWN 3.2 m tfmini AGL REAR UNKN no rear sensor STOP AVOID CLEAR UNKNOWN 25 Hz · fused: OAK-D + TFMini×2 + YOLO
SENSOR → SECTOR MAPPING
SensorSectorsRateNotes
OAK-D depthFWD, FWD-L, FWD-R, UP, DN10 Hz72° HFOV split into arcs
TFMini forwardFORWARD only10 HzCross-validated vs OAK-D depth
TFMini groundDOWN only10 HzTerrain AGL, altitude safety
YOLO detectionsany with spatial_xyz3 HzSemantic override — person <avoid_m → STOP
360° scan voxelsREAR, LEFT, RIGHTon scanPopulated from voxel map post-scan
CROSS-VALIDATION

When TFMini forward and OAK-D depth disagree by >2 m for the FORWARD sector, AEOS flags /nav/sensor_discrepancy and trusts the closer reading (conservative). SensorHealth downgrades /nav/health and may trigger a 360° scan to improve situational awareness.

A-Star Path Planning through 3D Voxel Space

AEOS uses a 26-connected A-Star search through the outer voxel grid to find paths from the drone's current position to a goal in NED coordinates. Obstacles are inflated by a configurable safety margin. YOLO semantic costs add weight to routes near people or vehicles. Path planning on the full 200×200×100 grid completes in under 100 ms on the Jetson CPU.

person cost:10 START GOAL A-STAR PLANNED PATH · 26-CONNECTED · <100ms Occupied Free A-Star path Inflation / Semantic danger
A-STAR ALGORITHM DETAILS
Graph: Outer voxel grid · 200×200×100 cells Connect: 26-neighbour (6 face + 12 edge + 8 corner) Heur: Euclidean distance to goal (admissible) Cost: move_dist + semantic_cost(neighbor) Safety: inflate OCCUPIED by safety_margin_m=1.5 Unknown: allow_unknown=False (only fly FREE space) Queue: heapq priority queue (min-heap on f=g+h) Perf: <100ms on 10% occupied 200×200×100 grid Output: NED waypoint list → simplify via RDP
CORRIDOR DETECTION

For inspection missions in confined spaces, AEOS extracts corridor centerlines from a horizontal voxel slice at the target altitude:

# 1. Take XY slice of outer grid at current alt slice = voxel_map.get_slice_xy(alt_m) # 2. Distance transform → distance to nearest wall dist_t = distance_transform(slice == FREE) # 3. Medial axis = centerline of free space axis = medial_axis(dist_t > threshold) # 4. Return as polylines → /nav/corridors

Navigation Modes

AEOS auto-selects a navigation mode based on mission type and state. Each mode carries its own safety margins, terrain-following behaviour, and path strategy. The mode is exposed on the blackboard as /nav/mode and visible in the ground station telemetry panel.

SURVEY

High-altitude grid or transect missions over fields. Wide obstacle margins (4 m stop, 12 m clear). Terrain following enabled at survey altitude. A-Star used to route around tall obstacles detected during approach. Default mode for agricultural mapping missions.

INSPECT

Low-altitude close-range inspection of structures, tree canopies, or row edges. Tight margins (2 m stop). OAK-D vision is critical — nav_health degrades immediately if OAK-D drops. 360° scan triggered at each inspection waypoint for complete situational awareness before approach.

CORRIDOR

Confined-space navigation through tunnels, rows, or hedged paths. Uses A-Star path planning with corridor centerlines from the voxel slice. Lateral avoidance is primary (no heading into walls). Safety margin tighter still — the planned path keeps the drone centred in the free corridor.

RTL

Return-to-Launch with maximum safety margins. Speed limited to 3 m/s regardless of plan. A-Star plans the RTL route through the already-mapped space. If nav_health drops below 0.3, RTL activates automatically and AEOS publishes a failsafe alert to the ground station.

RGB Texture Mapping — Coloured 3D World

Beyond geometry, AEOS records RGB keyframes paired with exact camera poses from the Pixhawk EKF. Each occupied voxel is coloured from the best available keyframe — the result is a photorealistic coloured point cloud streaming to the ground station in real time, and a textured 3D mesh available post-flight via marching cubes reconstruction.

KEYFRAME CAPTURE CRITERIA

A new keyframe (RGB frame + pose) is saved when any of the following is true:

Distance

Drone moved >1.0 m since last keyframe

Ensures adequate scene coverage without excessive redundancy
Rotation

Drone rotated >10° since last keyframe

Captures new geometry exposed by yaw during 360° scans
New voxels

>50 new occupied voxels discovered since last frame

Rapid scene entry → dense keyframing for texture quality
Interval

Maximum 5.0 s between keyframes regardless

Prevents gaps during slow hover or stationary scan
POST-FLIGHT MESH RECONSTRUCTION
## ground/api/services/mesh_builder.py 1. Load voxel grid (.npz) + keyframe manifest (JSON) 2. Gaussian smooth occupancy (sigma=0.5 voxels) 3. marching_cubes → triangle mesh (20K–50K faces) 4. Per vertex: find closest keyframe with good angle 5. Project vertex → keyframe → sample RGB colour 6. Export coloured PLY / textured OBJ Processing: ~5–15 s on ground station Output: 1–5 MB PLY · loads in Three.js / MeshLab Storage per 10-min flight: Keyframes 200–400 × 30KB JPEG ~6–12 MB Colour grids (inner+outer) ~12 MB Voxel map (.npz) ~1–2 MB Total ~20–30 MB

Ground Station — Real-Time 3D Map Viewer

The ground station receives two complementary streams over MQTT. A fast 2D horizontal slice at 1 Hz gives immediate situational awareness. A 3D incremental delta stream at 2 Hz accumulates into a full three-dimensional reconstruction in the browser — orbit-able, zoomable, with drone position and planned path overlaid.

STREAM ARCHITECTURE
2D Slice · 1 Hz

Horizontal voxel slice at drone altitude — RLE compressed, ~3 KB

Drone position + A-Star path + corridor centerlines + scan progress overlaid
3D Deltas · 2 Hz

Only changed voxels since last frame — (x, y, z, state, r, g, b) tuples

~100–500 changed voxels/frame · 360° scan burst ~5K voxels · 45 KB
Initial Snapshot

Full grid sent once on WebSocket connect — ~150 KB compressed

Ground station accumulates deltas from this baseline in server memory
StreamSizeRateBandwidth
2D map slice~3 KB1 Hz~3 KB/s
3D voxel deltas~2 KB2 Hz~4 KB/s
Map stats + path~0.5 KB1 Hz~0.5 KB/s
Total map overhead~7.5 KB/s
Existing streams~86 KB/s
3D MAP VIEWER Live Map 3D View Saved Maps Alt: 5.2 m + AE-001 ▲ GOAL 20 m UNMAPPED Occupied Free Unknown A-Star path RTK FIXED 0.02 m Voxels 12.4K occ / 89.2K free Alt 5.2 m AGL Scan idle ▶ Start 360° Scan Path planned <100ms Nav SURVEY 2D slice 1 Hz · 3 KB/s 3D delta 2 Hz · 4 KB/s total ~7.5 KB/s → ground station
The 3D View tab accumulates incremental delta updates into a Three.js InstancedMesh — 10K coloured voxel boxes rendered at 60 FPS. Saved maps load from GET /api/maps and can be reloaded onto the drone mid-mission.
Mission planning panel — coastal waypoints with A-Star routing and live map overlay
Mission Planning · coastal route · live satellite overlay
Mission planning panel — vineyard row waypoints with precision GPS positioning
Mission Planning · vineyard rows · RTK-precision waypoints