Skip to content

feat(mobile): animate range-bearing sensor beam and sensing region - #858

Open
huxiaoyi-ovo wants to merge 2 commits into
petercorke:mainfrom
huxiaoyi-ovo:fix/range-bearing-visualization-753-clean
Open

huxiaoyi-ovo wants to merge 2 commits into
petercorke:mainfrom
huxiaoyi-ovo:fix/range-bearing-visualization-753-clean

Conversation

@huxiaoyi-ovo

Copy link
Copy Markdown
Contributor

Summary

Closes #753.

Implement animated visualization for RangeBearingSensor:

  • Draw and update the sensing-region polygon using poly_style, accounting for the robot pose, range limits, and angular field of view.
  • Draw and update the observed-landmark beam using line_style.
  • Reuse Matplotlib artists across readings, hide the beam when no observation is available, and reset artists during initialization.
  • Remove obsolete documentation and commented-out MATLAB code.

Validation

  • Added headless Agg regression tests covering sensor movement, styling, artist reuse, missing observations, reset behaviour, and unspecified sensing limits.
  • Full fork CI passed across Linux, macOS, and Windows with Python 3.10–3.14.
  • Core tests: 1820 passed, 16 skipped, 106 subtests passed.
  • mypy, documentation build, coverage and PR title checks passed.

[Full CI results](https://github.com/huxiaoyi-ovo/robotics-toolbox-python/actions/runs/39250192578)

Behaviour changes

When plot=True, the sensing region and observation beam are now rendered and updated. Sensor measurements and returned landmark IDs are unchanged.

AI Assistance

ChatGPT (OpenAI GPT-6) assisted with implementation and regression tests. The changes were reviewed and validated before submission.

huxiaoyi-ovo and others added 2 commits October 19, 2026 20:11
Co-Authored-By: ChatGPT (OpenAI GPT-6) <noreply@openai.com>
Co-Authored-By: ChatGPT (OpenAI GPT-6) <noreply@openai.com>
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 26 high

Alerts:
⚠ 26 issues (≤ 0 issues of at least minor severity)

Results:
26 new issues

Category Results
ErrorProne 1 high
Security 25 high

View in Codacy

🟢 Metrics 31 complexity · 0 duplication

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

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (7666c63) to head (03497cd).

Files with missing lines Patch % Lines
src/roboticstoolbox/mobile/sensors.py 0.00% 55 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #858   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        146     146           
  Lines      16867   16921   +54     
=====================================
- Misses     16867   16921   +54     

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

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.

RangeBearingSensor: line_style and poly_style are accepted but unused; animate the sensing beam and region

1 participant