[AZ-701] Fix Jetson e2e harness infrastructure blockers

- gtsam_isam2_estimator: shim for gtsam>=4.3a0 aarch64 pre-release
  where IncrementalFixedLagSmoother/FixedLagSmootherKeyTimestampMap
  moved from gtsam_unstable to gtsam
- inference_factory: eager import of c7_inference package so
  register_component_block runs before config.components is read
- docker-compose.test.jetson.yml: remove companion and
  operator-orchestrator (not needed by replay CLI tests and crash
  in test env due to AZ-618 live-mode deps); add db-migrate and
  tile-init setup-profile services for Alembic migrations and FAISS
  fixture provisioning; update e2e-runner depends_on to db only
- scripts/mk_test_faiss_fixture.py: generate minimal HNSW32 FAISS
  descriptor index into the tile-data volume for the test harness

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-20 19:01:36 +03:00
parent 1b65619524
commit 21a7784682
4 changed files with 143 additions and 30 deletions
@@ -39,6 +39,17 @@ from uuid import UUID, uuid4
import gtsam
import gtsam_unstable
import numpy as np
# gtsam >=4.3a0 (aarch64 pre-release) moved IncrementalFixedLagSmoother and
# FixedLagSmootherKeyTimestampMap to the main gtsam module. Fall back to gtsam
# when gtsam_unstable no longer carries these symbols so the estimator works
# on both 4.2.x (x86_64 PyPI) and 4.3a0 (aarch64 pre-release).
try:
_IncrementalFixedLagSmoother = gtsam_unstable.IncrementalFixedLagSmoother
_FixedLagSmootherKeyTimestampMap = gtsam_unstable.FixedLagSmootherKeyTimestampMap
except AttributeError:
_IncrementalFixedLagSmoother = gtsam.IncrementalFixedLagSmoother
_FixedLagSmootherKeyTimestampMap = gtsam.FixedLagSmootherKeyTimestampMap
from numpy.linalg import LinAlgError
from gps_denied_onboard._types.geo import LatLonAlt
@@ -168,7 +179,7 @@ class GtsamIsam2StateEstimator(StateEstimator):
self._isam2 = gtsam.ISAM2(gtsam.ISAM2Params())
window_seconds: float = block.keyframe_window_size * _FRAME_PERIOD_S
self._smoother = gtsam_unstable.IncrementalFixedLagSmoother(window_seconds)
self._smoother = _IncrementalFixedLagSmoother(window_seconds)
self._graph = gtsam.NonlinearFactorGraph()
self._values = gtsam.Values()
@@ -1689,14 +1700,14 @@ def _build_pose_noise(covariance: Any | None) -> gtsam.noiseModel.Base:
def _make_timestamp_map(
keys: list[int], ts_ns: int
) -> gtsam_unstable.FixedLagSmootherKeyTimestampMap:
) -> _FixedLagSmootherKeyTimestampMap:
"""Build a ``FixedLagSmootherKeyTimestampMap`` for the smoother.
The smoother needs per-key arrival timestamps in seconds (its
sliding-window evict logic uses them); we feed every newly
inserted key the same window-end timestamp.
"""
ts_map = gtsam_unstable.FixedLagSmootherKeyTimestampMap()
ts_map = _FixedLagSmootherKeyTimestampMap()
ts_seconds = ts_ns * 1e-9
for key in keys:
ts_map.insert((key, ts_seconds))
@@ -20,6 +20,13 @@ from typing import TYPE_CHECKING
from gps_denied_onboard.runtime_root.errors import RuntimeNotAvailableError
# Eager package import so c7_inference.__init__.py runs
# `register_component_block("c7_inference", C7InferenceConfig)` before
# `_c7_config(config)` reads `config.components["c7_inference"]` below.
# The package __init__.py is import-safe (no concrete strategy modules)
# per the Risk-2 mitigation documented in c7_inference/__init__.py.
import gps_denied_onboard.components.c7_inference # noqa: F401
if TYPE_CHECKING:
from gps_denied_onboard.components.c7_inference import (
C7InferenceConfig,