Skip to content

fix(particlefilter): get_xyt returns (x, y, theta) as documented - #752

Merged
petercorke merged 3 commits into
mainfrom
fix/particlefilter-get-xyt-heading
Oct 14, 2026
Merged

petercorke merged 3 commits into
mainfrom
fix/particlefilter-get-xyt-heading

Conversation

@petercorke

@petercorke petercorke commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

ParticleFilter.get_xyt() is documented as returning (x, y, theta) per row (ndarray(n,3)), as is EKF.get_xyt(), but returned only (x, y). It now returns the heading too. The previous result is xyt[:, :2]; a versionchanged:: 1.4.5 note says so.

The only caller in the toolbox is plot_xy(), which uses the first two columns. RVC3-python does not call get_xyt() on a particle filter (it uses get_std()).

The heading is the mean of the particle headings, which is a plain mean of wrapped angles; #735 replaces that with a circular mean, so the heading column is only trustworthy once #735 is merged.

Stacked on #747. Base this PR on main once #747 has merged.

🤖 Generated with Claude Code

@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.

petercorke and others added 2 commits October 14, 2026 09:44
The docstring and the name say (x, y, theta), as does EKF.get_xyt(), but the
result had only the (x, y) columns.  plot_xy() is the only caller in the
toolbox and uses the first two.  xyt[:, :2] is the previous result.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@petercorke
petercorke force-pushed the fix/particlefilter-get-xyt-heading branch from cc4751b to cb2811e Compare October 13, 2026 23:44
@petercorke
petercorke changed the base branch from test/mobile-estimator-regressions to main October 13, 2026 23:44
@petercorke petercorke closed this Oct 14, 2026
@petercorke petercorke reopened this Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (0119d66) to head (6e6b3ea).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/roboticstoolbox/mobile/ParticleFilter.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #752   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        143     143           
  Lines      14274   14274           
=====================================
  Misses     14274   14274           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petercorke
petercorke merged commit 14775a7 into main Oct 14, 2026
22 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 14, 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.

1 participant