Repository navigation
test: pin that relative visual measurements must not add absolute position information (T2-2) - #132
Merged
Merged
Conversation
…ition information (T2-2) Run vision_only_clone, vision_only and gnss_only through the benchmark's run_case and read the per-epoch position covariance. The clone never claims a smaller position variance than the initial prior, in any direction or in total. The single-anchor control does, by a wide margin, and is pinned as the defect with a band. A GNSS-aided run shrinks below the prior, which is correct, so the check tells absolute information from relative information. One paragraph in docs/results.md points at the test. Tests only, nothing under src/. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #110
Tests only.
git diff --statshows no file undersrc/. Synthetic data, the benchmark'svision_only,vision_only_cloneandgnss_onlycases.What the tests assert (
tests/test_observability.py)The cases go through
navkit.benchmark.run_case, the code path the benchmark uses. The test file keeps the estimator result (a wrapper aroundErrorStateKalmanFilter.run, in the test file) to readresult.position_cov, which has shape (epochs, 3, 3). The prior is read from the run's recorded filter config (initial_pos_sigma_m), and every ratio comes from the covariance the run returned. No number was copied from the prompt.test_the_clone_never_becomes_more_certain_about_absolute_position_than_its_prior. Forvision_only_clone, at every epoch the smallest eigenvalue of the position covariance and the trace stay at or above the prior (relative tolerance 1e-6). Growth is allowed and shrinkage below the prior is not; the docstring says so. The test also asserts that vision updates were fused and no GNSS fix was used, so it cannot pass for the wrong reason.test_the_anchor_model_still_becomes_more_certain_about_absolute_position_and_that_is_pinned. The control row. Forvision_onlythe smallest position standard deviation falls to a fraction of the prior, pinned in a band, in the style oftest_gnss_denial_still_over_trusts_vision_and_that_is_pinned: a documented defect that must stay visible. If the row stops violating the property, it fails loudly with "the control row no longer violates the property".test_an_absolute_sensor_shrinks_the_position_covariance_below_the_prior. Forgnss_only(anchor model, no vision) the covariance does shrink below the prior. This shows the check separates information from an absolute sensor from information from relative poses.Measured quantities, margins and reasons
Run on current main, prior sigma 1.0 m (read from the config), 6001 epochs per case.
vision_only_clonevision_only(anchor)gnss_onlyMutation checks (not committed)
(a) The clone test with the anchor config (
vision_only_clonewithvision_model: anchor):(b) The anchor test with the clone config (
vision_onlywithvision_model: clone):Both files restored; the three tests pass on the unmutated code.
Skipped
EstimatorResultexposesposition_covonly, and the trajectory metadata holds no attitude block. Exposing it needs a change insrc/, which this package does not make. The module docstring says so.Other
docs/results.mdpoints at the new test, with no typed numbers.tests/test_quoted_numbers.pyand the other page tests pass.1589collected).Checks
ruff check,ruff format --check,mypy src,check_doc_tables.py,metrics.py --check,check_links.pypass. The new file runs in about 3 s. Full suite:1558 passed, 29 skipped, 2 xfailed in 637.54s (0:10:37)(the skips are the dataset-dependent tests; the dataset is absent in this clone). The coverage ratchet is left to CI.🤖 Generated with Claude Code