Skip to content

fix(mobile): resolve landmark indices in sensor Jacobians - #927

Merged
petercorke merged 6 commits into
petercorke:mainfrom
Afloat16:fix/sensor-landmark-jacobian
Nov 18, 2026
Merged

petercorke merged 6 commits into
petercorke:mainfrom
Afloat16:fix/sensor-landmark-jacobian

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

RangeBearingSensor.Hp documents accepting either landmark coordinates or a map index. The index path calls LandmarkMap.landmark, which does not exist, so that documented use raises AttributeError.

Change

Resolve the landmark through the map's indexing API, as h and Hx already do. The numerical Jacobian formula is unchanged.

The regression covers Python and NumPy integer indices, compares the result with coordinate-based lookup, and independently checks it against central differences of the observation function.

Original validation

  • Both new cases fail with AttributeError on the original source.
  • PYTHONPATH=src python -m pytest tests/test_sensor_observation_shape.py tests/test_vehicle_estimators.py -q: 64 passed, 30 subtests passed.
  • The modified regression file passes Ruff and formatting.
  • git diff --check passed.

Main-branch update

Updated with main at b53974345598f978d6e5040c46a25aa2788ea1da in merge commit 569f0cb147d383c87e823854f4140140c96ba5e3. The original two-file PR patch is byte-for-byte unchanged relative to the updated base. All files brought in from main retain exactly their upstream blobs, including the coverage updates from #946 and the empty-ETS fallback fix from #949.

Validation on the merged tree:

  • PYTHONPATH=src python -m pytest tests/test_sensor_observation_shape.py tests/test_vehicle_estimators.py --timeout=50 --timeout_method=thread -q: 72 passed, 30 subtests passed on Python 3.12. The regression module also passes Ruff and formatting.
  • Staged and working-tree git diff --check passed.

CI for the updated head has been triggered. The preceding head f852426a0545c31ec1cb54e91b13d72981e67d1b completed its full CI run successfully, including all 15 OS/Python combinations, test-core, coverage and documentation. That completed run belongs to the preceding head; the latest main synchronization is covered by the new run and the repeated local validation above.

Primary contributor: Afloat16, who has reviewed the original submission.

AI assistance for this follow-up: ChatGPT (GPT-6 Astra Pro), used for main-branch synchronization and verification.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Afloat16
Afloat16 marked this pull request as ready for review November 3, 2026 13:56
Refresh the branch with main cee0023. The existing PR patch and all changed file blobs remain unchanged.

Co-Authored-By: ChatGPT (GPT-6 Astra Pro)
@Afloat16

Copy link
Copy Markdown
Contributor Author

Updated with current main (cee0023535) in 23d77061; the original sensor-index fix and regression patch are unchanged. All 15 OS/Python test combinations, test-core, the required All tests passed aggregate, and coverage passed on this head.

The docs-build job successfully builds Sphinx, then fails in the real-Pyodide check after the SymPy wheel download from jsDelivr returns request failed. The log then reports ModuleNotFoundError: No module named 'sympy' and analytic inverse kinematics needs SymPy. This is separate from the advisory mypy errors already present on main and documented above.

Could a maintainer rerun this docs job? I do not have access to rerun the upstream job. Once that dependency download completes, could you review the focused landmark-index fix for merge?

Refresh the branch with main ea35e42. The existing PR patch and its two changed file blobs remain unchanged.

Validation: both complete sensor/estimator test files passed (72 tests and 30 subtests); regression Ruff/format and diff checks passed.

Co-Authored-By: ChatGPT (GPT-6 Astra Pro)
@Afloat16

Afloat16 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for approving this fix and #928. Both branches now include main at b5397434 through normal merge commits. Each original two-file patch is byte-for-byte unchanged relative to the updated base, and the focused suites were rerun successfully after the empty-ETS fallback fix in #949 advanced main.

The preceding heads both completed full CI successfully: all 15 OS/Python combinations, test-core, coverage and documentation passed (#927 run, #928 run). The latest synchronization has separate current-head runs:

PR Current head Validation on this merged tree Current CI
#927 569f0cb Sensor and estimator suites: 72 passed, 30 subtests passed 44045133676
#928 c3302fa Mobile-map and occupancy-bound suites: 46 passed 44045142411

Both validations used the actual merged source on Python 3.12, and both branches pass git diff --check. Once the current required checks pass, could these two approved fixes be merged?

Thank you!

Afloat16 and others added 3 commits November 17, 2026 15:27
Include upstream coverage and pure-Python test updates from main 1cd9bd7. The original two-file PR patch remains byte-for-byte unchanged relative to the updated base.

Validation: both complete relevant test files passed (72 tests and 30 subtests); staged and working-tree diff checks passed.

Co-Authored-By: ChatGPT (GPT-6 Astra Pro)
Include main b539743 while preserving the original focused fix and regression patch unchanged.

Co-Authored-By: ChatGPT (GPT-6 Astra Pro)
@petercorke
petercorke merged commit f11e339 into petercorke:main Nov 18, 2026
24 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants