Skip to content

fix(mobile): DistanceTransformPlanner.next() calls undefined Error() - #587

Merged
petercorke merged 1 commit into
mainfrom
fix/distance-transform-planner-error
Aug 10, 2026
Merged

petercorke merged 1 commit into
mainfrom
fix/distance-transform-planner-error

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

`next()` called `Error("No distance map computed, you need to plan.")`
instead of raising it -- `Error` isn't a builtin or ever imported, so this
crashed with `NameError` instead of the intended `ValueError` whenever
`next()` was called before `plan()`.

Reported in #507 (2026-01-18), which also removed an unrelated
`from numpy import disp` -- that half is already independently fixed
(NumPy 2.0 dropped `numpy.disp`, and the current file no longer imports it).
Fixes #507.

Test plan

  • New regression test: `test_distance_transform_next_before_plan_raises`
  • Full local suite green

next() called Error("No distance map computed, you need to plan.")
instead of raising it -- Error isn't a builtin or ever imported, so
this crashed with NameError instead of the intended ValueError
whenever next() was called before plan(). Reported in PR #507
(2026-01-18), which also removed an unrelated from numpy import disp
that's since been independently fixed (NumPy 2.0 dropped numpy.disp).
@codecov

codecov Bot commented Aug 9, 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 (0bb9645) to head (e876f58).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...roboticstoolbox/mobile/DistanceTransformPlanner.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #587   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        142     142           
  Lines      13788   13825   +37     
=====================================
- Misses     13788   13825   +37     

☔ 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 8cb7e65 into main Aug 10, 2026
18 checks passed
@petercorke
petercorke deleted the fix/distance-transform-planner-error branch October 22, 2026 04:38
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