Skip to content

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

Open
Afloat16 wants to merge 1 commit into
petercorke:mainfrom
Afloat16:fix/sensor-landmark-jacobian
Open

Afloat16 wants to merge 1 commit 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.

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.

@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

This branch has not been deployed

No deployments
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.

1 participant