mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 17:11:14 +00:00
622b1a1ebe
- VisualOdometry mirrors ISequentialVisualOdometry (4 methods) - GlobalPlaceRecognition mirrors IGlobalPlaceRecognition (7 methods) - SatelliteTileLoader mirrors SatelliteDataManager public API (11 methods) - MetricRefiner mirrors IMetricRefinement (6 methods) - MAVLinkBridgeProtocol mirrors MAVLinkBridge public API (8 methods) - CoordinateTransformsProtocol mirrors CoordinateTransformer (9 methods) - All Protocols runtime_checkable; backwards-compat I-prefixed aliases exposed for vio/gpr/metric (deprecated in Phase 2) - Pure-additive: zero existing files touched - isinstance check confirms SatelliteDataManager and CoordinateTransformer already satisfy the new Protocols structurally
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
"""Protocol surface for the VIO component (ARCH-05).
|
|
|
|
Phase 1: defines the Protocol that concrete adapters in this directory
|
|
implement. Method signatures mirror ``ISequentialVisualOdometry`` from
|
|
``core/vo.py``. Adapters are NOT moved here yet — see Plan 04 (VIO).
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
from typing import Protocol, runtime_checkable
|
|
|
|
import numpy as np
|
|
|
|
from gps_denied.schemas import CameraParameters
|
|
from gps_denied.schemas.vo import Features, Matches, Motion, RelativePose
|
|
|
|
|
|
@runtime_checkable
|
|
class VisualOdometry(Protocol):
|
|
"""Sequential visual odometry surface (mirrors ISequentialVisualOdometry)."""
|
|
|
|
def compute_relative_pose(
|
|
self, prev_image: np.ndarray, curr_image: np.ndarray, camera_params: CameraParameters
|
|
) -> RelativePose | None: ...
|
|
|
|
def extract_features(self, image: np.ndarray) -> Features: ...
|
|
|
|
def match_features(self, features1: Features, features2: Features) -> Matches: ...
|
|
|
|
def estimate_motion(
|
|
self, matches: Matches, camera_params: CameraParameters
|
|
) -> Motion | None: ...
|
|
|
|
|
|
# Backwards-compat alias — Phase 2 will deprecate the I-prefix.
|
|
ISequentialVisualOdometry = VisualOdometry
|