mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-23 04:36:38 +00:00
add solution drafts, add component decomposition , add spec for other docs
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# L1 Visual Odometry Component
|
||||
|
||||
## Detailed Description
|
||||
**L1 Visual Odometry** handles the high-frequency, sequential tracking of the UAV. It receives the current frame and the previous frame, using **SuperPoint** for feature extraction and **LightGlue** for matching.
|
||||
|
||||
It estimates the **Relative Pose** (Translation and Rotation) between frames. Since monocular VO lacks scale, it outputs a "scale-ambiguous" translation vector or utilizes the altitude prior (if passed) to normalize. It is designed to be robust to low overlap but will flag "Tracking Lost" if matches fall below a threshold.
|
||||
|
||||
## API Methods
|
||||
|
||||
### `process_frame`
|
||||
- **Input:** `current_frame: FrameObject`, `prev_frame: FrameObject | None`
|
||||
- **Output:** `L1Result`
|
||||
- **Description:**
|
||||
1. Extracts features (Keypoints, Descriptors) from `current_frame` (using Model Registry).
|
||||
2. If `prev_frame` exists, matches features with `prev_frame` using LightGlue.
|
||||
3. Computes Essential/Fundamental Matrix and recovers relative pose $(R, t)$.
|
||||
4. Returns `L1Result`: `{ relative_pose: Matrix4x4, num_matches: int, confidence: float, keypoints: list }`.
|
||||
- **Test Cases:**
|
||||
- Frame 1 & Frame 2 (Good overlap) -> High match count, valid pose.
|
||||
- Frame 1 & Frame 10 (Zero overlap) -> Low match count, "Tracking Lost" status.
|
||||
|
||||
### `reset`
|
||||
- **Input:** `void`
|
||||
- **Output:** `void`
|
||||
- **Description:** Clears internal history/state. Used after a "Kidnapped Robot" reset.
|
||||
|
||||
## Integration Tests
|
||||
- **Trajectory Generation:** Feed a sequence of 10 frames. Integrate relative poses. Compare shape of trajectory to ground truth (ignoring scale).
|
||||
|
||||
## Non-functional Tests
|
||||
- **Inference Speed:** Must run < 100ms (TensorRT) or reasonable time on CPU.
|
||||
|
||||
Reference in New Issue
Block a user