Skip to content

fix(mobile): guard VehicleDriverBase against workspace=None#541

Open
petercorke wants to merge 1 commit into
mainfrom
fix/mobile-vehicle-control-typeerror
Open

fix(mobile): guard VehicleDriverBase against workspace=None#541
petercorke wants to merge 1 commit into
mainfrom
fix/mobile-vehicle-control-typeerror

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

  • VehicleDriverBase.__init__ crashed whenever workspace was left at its own default (None), because spatialmath.base.expand_dims(None) raises TypeError despite advertising None as its default (tracked upstream in spatialmath-python's tech-debt.md).
  • Fixed the docstring runblock example that surfaced this: RandomPath(10) passed 10 positionally into dthresh, not workspace (which only exists via **kwargs). Now RandomPath(workspace=10).

Test plan

  • Rehearsed in a clean venv: RandomPath(workspace=10) construction + print(bike) succeeds end-to-end
  • pytest tests/ -k "mobile or Vehicle or driver" — 25 passed, 1 skipped

🤖 Generated with Claude Code

…omPath docstring example

expand_dims(None) raises TypeError despite None being its own advertised
default (spatialmath-python bug, tracked in that repo's tech-debt.md), so
VehicleDriverBase.__init__ crashed whenever workspace was left unset.

Separately, VehicleBase.control's runblock example passed RandomPath(10)
positionally, landing in dthresh instead of workspace via **kwargs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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