Skip to content

fix(mobile): export complete landmark coordinate pairs from EKF - #720

Draft
Afloat16 wants to merge 2 commits into
petercorke:mainfrom
Afloat16:fix/ekf-export-landmark-offsets
Draft

Afloat16 wants to merge 2 commits into
petercorke:mainfrom
Afloat16:fix/ekf-export-landmark-offsets

Conversation

@Afloat16

@Afloat16 Afloat16 commented Oct 9, 2026

Copy link
Copy Markdown

Summary

EKF.get_map() uses a landmark's first-observation ordinal as its coordinate offset. After the first landmark, exported rows combine coordinates from adjacent landmarks. For example, a learned map [(-3, 8), (7, -4), (2, 3)] is returned as [(-3, 8), (8, 7), (7, -4)] in both mapping and SLAM.

Reuse landmark_x() to obtain each coordinate pair with the existing complete-state indexing, while preserving first-observation order and a separate returned array. Add end-to-end noiseless mapping and SLAM regressions, including nonzero initial pose, different map layouts, empty and single-observation controls, and returned-array independence.

Validation

  • Exact base: 968ed048639c01c9032e256565731e2703de77fe.
  • Corrected regressions on the base: 4 failed, 8 passed. Individual landmark estimates and the first exported row are correct controls.
  • Focused mobile and EKF tests: 29 passed.
  • Complete configured native suite with Swift, collision and QP dependencies: 856 passed, 3 existing explicit skips, 17 subtests passed on Linux/Python 3.12.14. Both compiled extensions are present.
  • Ruff formatting, the new test's lint, and git diff --check pass. The existing EKF source diagnostics decrease from 8 to 7, with no new diagnostics.
  • 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 test 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.

Use landmark_x to export each complete learned coordinate pair in first-observation order, preserving mapping and SLAM state offsets. Add native noiseless regression coverage and clarify the public map contract.

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

codacy-production Bot commented Oct 9, 2026 •

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.

Resolve the two actual Codacy bare-assert findings in the EKF map regression tests with equivalent numpy.testing.assert_equal checks. The focused and complete configured native suites pass.

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

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