Repository navigation
Conversation
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).
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 7 |
| Duplication | 0 |
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).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #720 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 143 143
Lines 14785 14782 -3
=====================================
+ Misses 14785 14782 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for your interest in RTB, and for taking the time to create a PR. It'd help me if you could provide some context or a small code example for this. TBH the whole first paragraph is pretty cryptic. |
Merge current upstream main into fix/ekf-export-landmark-offsets, retaining the upstream NDArray annotation and the existing landmark coordinate-pair fix and regressions. Validated with the configured native test suite and coverage, mypy, Sphinx HTML build, and an independent review of the exact tree. Existing unrelated lint and documentation diagnostics are preserved. AI assistance: OpenAI Codex (gpt-6.1-sol).
|
A concrete example is exporting a map after the EKF has learned three landmarks. The individual estimates are correct, but Here is a stationary, noiseless mapping example: import numpy as np
from roboticstoolbox import Bicycle, EKF, LandmarkMap, RangeBearingSensor
robot = Bicycle(x0=[1.0, -2.0, 0.4])
robot.control = [0.0, 0.0]
points = np.array([[-3.0, 7.0, 2.0], [8.0, -4.0, 3.0]])
sensor = RangeBearingSensor(robot, LandmarkMap(points),
covar=np.zeros((2, 2)))
ekf = EKF(robot=(robot, None), sensor=(sensor, np.eye(2) * 0.01),
animate=False)
ekf.run(T=2.0)
ids = list(ekf.landmarks) # first-observation order
print(np.array([ekf.landmark_x(i) for i in ids]).round(6).tolist())
print(ekf.get_map().round(6).tolist())The individual estimates are The cause is that the landmark dictionary records observation order 0, 1, 2, while each landmark occupies two state entries. I rechecked this small example on Linux/Python 3.12.14 with the exact submitted and upstream |
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
968ed048639c01c9032e256565731e2703de77fe.git diff --checkpass. The existing EKF source diagnostics decrease from 8 to 7, with no new diagnostics.Checklist
pytest), with the existing skips listed aboveAI assistance: prepared with OpenAI Codex (
gpt-6.1-sol). The validation above was executed in the native environment.