fresh start v2

This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-04-29 17:07:28 +03:00
parent af5eb13ecb
commit 3ef26c515e
15 changed files with 0 additions and 1864 deletions
-98
View File
@@ -1,98 +0,0 @@
# Tech Stack Evaluation
## Requirements Analysis
| Requirement | Implication |
|-------------|-------------|
| Jetson Orin Nano Super, 8 GB, 25 W | Prefer Python orchestration with C++/TensorRT hot paths; benchmark memory early. |
| Fixed nadir monocular nav camera | Avoid stereo-only VO dependencies; use custom planar VO/IMU. |
| ArduPilot v1 GPS substitute | Use `pymavlink` `GPS_INPUT`; defer `ODOMETRY`. |
| Offline satellite cache | Use local SQLite/MBTiles-like packages with explicit manifests and precomputed descriptors. |
| OpenAPI docs | Use FastAPI for local control/health/object API. |
| No raw frame persistence | FDR stores metadata, estimates, MAVLink, IMU, health, generated tiles, and failure thumbnails only. |
## Technology Evaluation
### Language and Runtime
| Option | Fitness | Maturity | Security | Team/Cost | Scalability | Score | Decision |
|--------|---------|----------|----------|-----------|-------------|-------|----------|
| Python 3.11+ orchestration | High | High | Medium | High | Medium | 4/5 | Selected |
| C++ hot-path modules | High | High | Medium | Medium | High | 4/5 | Selected for VO/matching kernels as needed |
| .NET backend | Low | High | High | Medium | High | 2/5 | Rejected for onboard CV hot path |
| Rust hot-path modules | Medium | Medium | High | Medium | High | 3/5 | Deferred unless memory safety becomes critical |
### Vision and Inference
| Option | Fitness | Maturity | Security | Team/Cost | Scalability | Score | Decision |
|--------|---------|----------|----------|-----------|-------------|-------|----------|
| OpenCV | High | High | Medium | High | Medium | 5/5 | Selected |
| TensorRT | High | High | Medium | Medium | High | 5/5 | Selected for deployed models |
| PyTorch runtime | Medium | High | Medium | High | Medium | 3/5 | Dev/training only, not hot v1 runtime |
| cuVSLAM | Low for v1 | High | Medium | Medium | High | 2/5 | Rejected for v1 sensor mismatch |
| ORB-SLAM3 / VINS-Fusion | Medium | Medium | Low licensing fit | Medium | Medium | 2/5 | Experimental only |
### Matching and VPR
| Option | Fitness | Maturity | Security | Team/Cost | Scalability | Score | Decision |
|--------|---------|----------|----------|-----------|-------------|-------|----------|
| AnyLoc/DINOv2-VLAD style descriptors | High | Medium | Medium | Medium | High | 4/5 | Selected with benchmark |
| FAISS CPU/HNSW-flat | High | High | Medium | High | Medium | 4/5 | Selected v1 baseline |
| FAISS GPU/cuVS | Medium | Medium | Medium | Low on Jetson | High | 3/5 | Optimization only |
| ALIKED + LightGlue | High | Medium | Medium | Medium | High | 4/5 | Selected learned-feature candidate |
| OpenCV SIFT/AKAZE | Medium | High | High | High | Medium | 3/5 | Selected legal baseline |
| DeDoDe | Medium | Medium | Medium | Medium | Medium | 3/5 | Experimental fallback |
| Official Magic Leap SuperPoint weights | High | Medium | Low for product | Medium | High | 1/5 | Rejected unless commercial license is obtained |
### State, API, and Storage
| Option | Fitness | Maturity | Security | Team/Cost | Scalability | Score | Decision |
|--------|---------|----------|----------|-----------|-------------|-------|----------|
| ESKF with NumPy/SciPy prototype, C++ Eigen if needed | High | High | Medium | Medium | High | 5/5 | Selected |
| FastAPI + Pydantic | High | High | Medium | High | Medium | 5/5 | Selected |
| SQLite / MBTiles-like local cache | High | High | Medium | High | Medium | 4/5 | Selected |
| COG/GeoTIFF + GDAL/Rasterio exchange | High | High | Medium | Medium | High | 4/5 | Selected |
| PostgreSQL/PostGIS onboard | Low | High | Medium | Low | High | 2/5 | Rejected for embedded v1; too heavy |
| Parquet/JSONL FDR segments | High | High | Medium | High | Medium | 4/5 | Selected |
### MAVLink and Ground Station
| Option | Fitness | Maturity | Security | Team/Cost | Scalability | Score | Decision |
|--------|---------|----------|----------|-----------|-------------|-------|----------|
| pymavlink `GPS_INPUT` | High | High | Medium | High | Medium | 5/5 | Selected |
| MAVSDK telemetry plumbing | Medium | High | Medium | High | Medium | 4/5 | Selected for non-GPS telemetry where useful |
| Mission Planner support | Low | High | Medium | Medium | Medium | 2/5 | Out of scope |
| QGroundControl | High | High | Medium | High | Medium | 5/5 | Selected |
## Tech Stack Summary
- **Primary language**: Python 3.11+ for orchestration, API, data pipelines, tests, and integration.
- **Hot path**: C++/CUDA/TensorRT modules only where profiling proves Python/OpenCV is insufficient.
- **Computer vision**: OpenCV, TensorRT, DINOv2/AnyLoc-style descriptors, ALIKED + LightGlue candidate, SIFT/AKAZE legal baseline, DeDoDe experimental fallback.
- **State estimation**: ESKF in local NED/ENU, prototyped in Python and migrated to C++ Eigen only if latency requires.
- **Autopilot**: pymavlink `GPS_INPUT` v1; MAVSDK only for general telemetry if it does not interfere with GPS emission.
- **API**: FastAPI with generated OpenAPI at `/openapi.json`, local-first deployment.
- **Storage**: SQLite/MBTiles-like onboard cache, manifest sidecars, GDAL/Rasterio for COG/GeoTIFF exchange, segmented FDR logs.
- **Testing**: pytest, SITL ArduPilot, replay harness, Jetson benchmark harness, thermal/memory profiling.
## Risk Assessment
| Risk | Impact | Mitigation |
|------|--------|------------|
| Noncommercial SuperPoint weights enter product build | High | Reject official Magic Leap weights by default; CI/license scan model artifacts; use ALIKED + LightGlue or SIFT/AKAZE unless a commercial grant exists. |
| VPR model too slow or memory-heavy | High | Conditional VPR only; benchmark DINOv2-S/tiny variants; CPU FAISS baseline; precompute gallery descriptors. |
| Cross-view false positives in sparse fields | High | Top-K retrieval, local geometry, freshness gates, ESKF innovation gating, covariance calibration. |
| ArduPilot EKF source behavior changes by version | High | Pin ArduPilot version and SITL tests; v1 GPS_INPUT only. |
| Cache format exceeds 10 GB | Medium | Validate provider compression and descriptor index size before implementation freeze. |
| Python hot path misses 400 ms p95 | High | Profile first; move only measured bottlenecks to C++/TensorRT. |
## Learning / Validation Requirements
| Area | Required Proof |
|------|----------------|
| Jetson runtime | Benchmark VO, VPR trigger, local matching, ESKF, API, and FDR together under sustained load. |
| Scheduler latency | Prove bounded latest-frame queue, frame-drop accounting, and timestamp-correct GPS_INPUT under heavy VPR/local-matcher load. |
| ArduPilot integration | SITL proves `GPS_INPUT` acceptance, failsafe behavior, and no ODOMETRY emission in v1. |
| Dataset realism | Add real FC IMU logs or approved SITL IMU generated from the trajectory. |
| Cache ingestion | Validate COG/GeoTIFF import, local package generation, manifests, and stale-tile rejection. |
| Safety | Monte Carlo validates false-position and cache-poisoning budgets before production release. |