Skip to content

fix(mobile): preserve range-bearing observation rows - #721

Draft
Afloat16 wants to merge 1 commit into
petercorke:mainfrom
Afloat16:fix/range-bearing-observation-rows
Draft

Afloat16 wants to merge 1 commit into
petercorke:mainfrom
Afloat16:fix/range-bearing-observation-rows

Conversation

@Afloat16

@Afloat16 Afloat16 commented Oct 9, 2026

Copy link
Copy Markdown

Summary

RangeBearingSensor.h() currently squeezes any single observation row into a vector. With a one-landmark map, visible() then enumerates range and bearing as two separate features. Range/angle filtering raises a scalar indexing error, and EKF can receive the nonexistent landmark ID 1. An explicit batch containing one vehicle pose also loses its row axis.

Preserve observation rows when requesting all landmarks or a pose batch. Keep the existing two-element vector for an explicit landmark and a scalar vehicle pose. Add modern type hints, clarify these shapes, and test analytic observations, range/angle visibility, reading IDs, empty/multiple controls, and real one-landmark mapping/SLAM.

Validation

  • Exact base: 968ed048639c01c9032e256565731e2703de77fe.
  • New regressions on the base: 10 failed, 5 passed.
  • Focused sensor and mobile tests: 32 passed.
  • Complete configured native suite with Swift, collision and QP dependencies: 859 passed, 3 existing explicit skips, 17 subtests passed on Linux/Python 3.12.14. Both compiled extensions are present.
  • Ruff formatting, new-test lint and git diff --check pass. The existing sensor source reports the same 9 lint diagnostics on the base and the patch, with no additions.
  • The configured Sphinx HTML build succeeds and prints the same 21 existing runblock errors at the same four locations as the base. Those examples are not claimed as passing.
  • Other operating systems, Python versions, physical hardware and browser/Pyodide execution were not tested locally.

Checklist

  • PR title follows Conventional Commits
  • Tests pass locally (pytest), with the existing skips listed above
  • Added tests for this change
  • Changed method and new tests use modern type hints
  • Docstring updated
  • Change is focused
  • No project-specific data or notebooks added

AI assistance: prepared with OpenAI Codex (gpt-6.1-sol). The validation above was executed in the native environment.

Preserve observation rows for all-landmark measurements and explicit pose batches, including singleton maps and singleton batches. Retain scalar explicit-landmark vectors and add analytic native sensor/reading/EKF regressions.

AI assistance: OpenAI Codex (gpt-6.1-sol).
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 11 complexity · 0 duplication

Metric Results
Complexity 11
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.

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