mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 11:06:36 +00:00
1.7 KiB
1.7 KiB
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:
- Extracts features (Keypoints, Descriptors) from
current_frame(using Model Registry). - If
prev_frameexists, matches features withprev_frameusing LightGlue. - Computes Essential/Fundamental Matrix and recovers relative pose
(R, t). - Returns
L1Result:{ relative_pose: Matrix4x4, num_matches: int, confidence: float, keypoints: list }.
- Extracts features (Keypoints, Descriptors) from
- 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.