mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-23 02:06:36 +00:00
refactor(vo): address code review for CuVSLAMMonoDepthVisualOdometry
- test_depth_hint_scales_translation: replace assert True with mock-based verification of scale factor - _init_tracker / _compute_via_cuvslam: logger.exception for stack traces - _init_tracker: loud warning when Jetson path disabled - drop personal attribution (git blame suffices) - translate Ukrainian test docstrings to English
This commit is contained in:
@@ -415,7 +415,6 @@ class CuVSLAMMonoDepthVisualOdometry(ISequentialVisualOdometry):
|
||||
Note — solution.md records OdometryMode=INERTIAL which requires stereo.
|
||||
This class uses OdometryMode=MONO_DEPTH, the correct mode for our hardware.
|
||||
Decision recorded in docs/superpowers/specs/2026-04-18-oss-stack-tech-audit-design.md.
|
||||
By Yuzviak, 2026-04-18.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
@@ -462,8 +461,11 @@ class CuVSLAMMonoDepthVisualOdometry(ISequentialVisualOdometry):
|
||||
tracker_params.odometry_mode = self._cuvslam.OdometryMode.MONO_DEPTH
|
||||
self._tracker = self._cuvslam.Tracker(rig_params, tracker_params)
|
||||
logger.info("cuVSLAM tracker initialised in Mono-Depth mode")
|
||||
except Exception as exc:
|
||||
logger.error("cuVSLAM Mono-Depth tracker init failed: %s", exc)
|
||||
except Exception:
|
||||
logger.exception(
|
||||
"cuVSLAM Mono-Depth tracker init FAILED — falling back to ORB. "
|
||||
"Production Jetson path is DISABLED until this is fixed."
|
||||
)
|
||||
self._cuvslam = None
|
||||
|
||||
@property
|
||||
@@ -503,8 +505,8 @@ class CuVSLAMMonoDepthVisualOdometry(ISequentialVisualOdometry):
|
||||
tracking_good=True,
|
||||
scale_ambiguous=False,
|
||||
)
|
||||
except Exception as exc:
|
||||
logger.error("cuVSLAM Mono-Depth tracking failed: %s", exc)
|
||||
except Exception:
|
||||
logger.exception("cuVSLAM Mono-Depth tracking step failed — frame dropped")
|
||||
return None
|
||||
|
||||
def _compute_via_orb_scaled(
|
||||
|
||||
Reference in New Issue
Block a user