Files
gps-denied-onboard/docs/03_tests/39_route_chunk_connection_spec.md
T
Oleksandr Bezdieniezhnykh 2037870f67 add chunking
2025-11-27 03:43:19 +02:00

6.1 KiB

Acceptance Test: AC-5 - Multi-Fragment Route Connection

Summary

Validate Acceptance Criterion 5 (partial): "System should try to operate when UAV made a sharp turn, and all the next photos has no common points with previous route. In that situation system should try to figure out location of the new piece of the route and connect it to the previous route. Also this separate chunks could be more than 2."

Linked Acceptance Criteria

AC-5: Connect multiple disconnected route fragments

Preconditions

  1. System with "Atlas" multi-map capability (factor graph with native chunk support)
  2. F12 Route Chunk Manager functional
  3. F10 Factor Graph Optimizer with multi-chunk support
  4. L2 global place recognition functional (chunk semantic matching)
  5. L3 metric refinement functional (chunk LiteSAM matching)
  6. Geodetic map-merging logic implemented (Sim(3) transform)
  7. Test dataset: Simulate 3 disconnected route fragments

Test Description

Test system's ability to handle completely disconnected route segments (no overlap between segments) and eventually connect them into a coherent trajectory using global GPS anchors.

Test Steps

Step 1: Create Multi-Fragment Flight

  • Action: Create flight with 3 disconnected segments:
    • Fragment 1: AD000001-010 (sequential, connected)
    • Fragment 2: AD000025-030 (sequential, no overlap with Fragment 1)
    • Fragment 3: AD000050-055 (sequential, no overlap with Fragments 1 or 2)
  • Expected Result: Flight created with all 18 images

Step 2: Process Fragment 1

  • Action: Process AD000001-010
  • Expected Result:
    • L1 provides sequential tracking
    • L3 provides GPS anchors
    • Local trajectory fragment created (Map_Fragment_1)
    • Accurate GPS estimates

Step 3: Detect Discontinuity (Fragment 1 → 2)

  • Action: Process AD000025 after AD000010
  • Expected Result:
    • L1 fails (no overlap, large displacement ~2km)
    • System proactively creates new chunk (Map_Fragment_2)
    • Processing continues immediately in new chunk
    • Chunk matching attempted asynchronously

Step 4: Process Fragment 2 Independently

  • Action: Process AD000025-030
  • Expected Result:
    • New sequential tracking starts in chunk_2
    • Frames processed within chunk_2 context
    • Relative factors added to chunk_2's subgraph
    • Chunk_2 optimized independently for local consistency
    • Chunk semantic matching attempted when ready (5-20 frames)
    • Chunk LiteSAM matching with rotation sweeps attempted

Step 5: Process Fragment 3

  • Action: Process AD000050-055 after AD000030
  • Expected Result:
    • Another discontinuity detected
    • Map_Fragment_3 initialized
    • Independent processing

Step 6: Global Map Merging

  • Action: Factor graph attempts geodetic map-merging
  • Expected Result:
    • All 3 chunks have GPS anchors from chunk LiteSAM matching
    • Chunks merged via Sim(3) transform (translation, rotation, scale)
    • Fragments aligned in global coordinate frame
    • Single consistent trajectory created
    • Global optimization performed

Step 7: Validate Fragment Connections

  • Action: Verify all 18 images have global GPS coordinates
  • Expected Result:
    • All fragments successfully located
    • Internal consistency within each fragment
    • Global alignment across fragments

Step 8: Accuracy Validation

  • Action: Compare all 18 estimates vs ground truth
  • Expected Result:
    • Each fragment individually accurate
    • No systematic bias between fragments
    • Overall accuracy meets AC-1 (≥ 80% < 50m)

Success Criteria

Primary Criterion (AC-5):

  • System processes all 3 disconnected fragments
  • Fragments successfully localized in global frame
  • No manual intervention required (unless extreme failures)

Supporting Criteria:

  • Each fragment internally consistent
  • GPS anchors (L3) connect fragments globally
  • Final trajectory is coherent
  • Accuracy maintained across all fragments

Expected Results

Multi-Fragment Flight:
- Fragment 1: AD000001-010 (10 images)
  Internal consistency: Excellent
  Global location: Accurate via L3 anchors
  
- Fragment 2: AD000025-030 (6 images)
  Disconnected from Fragment 1 (~2km gap)
  Internal consistency: Excellent
  Global location: Recovered via L2/L3
  
- Fragment 3: AD000050-055 (6 images)
  Disconnected from Fragment 2 (~1.5km gap)
  Internal consistency: Excellent
  Global location: Recovered via L2/L3

Merging Results:
- All 18 images localized globally
- No fragments "lost"
- Overall accuracy: 16/18 < 50m (88.9%)
- Mean error: 27.3m

AC-5 Status: PASS
Processing Mode: Multi-Map Atlas

Pass/Fail Criteria

TEST PASSES IF:

  • All 3 fragments processed successfully
  • Fragments localized in global frame via GPS anchors
  • No fragment lost or unlocatable
  • Overall accuracy acceptable (≥ 75% < 50m)

TEST FAILS IF:

  • Any fragment completely fails to localize
  • Fragments have large systematic bias (> 100m offset)
  • System requires manual intervention for each fragment
  • Merging produces inconsistent trajectory

Architecture Elements

Multi-Map "Atlas" (per solution document):

  • Each disconnected segment gets own local map
  • Local maps independently optimized
  • GPS anchors provide global reference
  • Geodetic merging aligns all maps

Recovery Mechanisms:

  • Proactive chunk creation on tracking loss (immediate, not reactive)
  • Chunk semantic matching (aggregate DINOv2) finds location for chunk
  • Chunk LiteSAM matching (with rotation sweeps) refines GPS anchor
  • Factor graph creates new chunk subgraph
  • Sim(3) transform merges chunks into global trajectory

Fragment Detection:

  • Large displacement (> 500m) from last image
  • Low/zero overlap
  • L1 failure triggers proactive new chunk creation
  • Chunks processed independently with local optimization
  • Multiple chunks can exist simultaneously

Notes

  • AC-5 describes realistic operational scenario (multiple turns, disconnected segments)
  • System must not assume continuous flight path
  • GPS anchors (L3) are critical for connecting fragments
  • Without L3, fragments would be isolated with scale ambiguity
  • This validates core ASTRAL-Next architecture: hierarchical + anchor topology