Repository navigation
fix(mobile): reject PRM maps with no free cells - #931
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| 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.
Refresh the branch with main cee0023. The existing PR patch and all changed file blobs remain unchanged. Co-Authored-By: ChatGPT (GPT-6 Astra Pro)
|
The updated head The docs-build job builds Sphinx successfully, then fails in the real-Pyodide check: the SymPy wheel download from jsDelivr returns Could a maintainer rerun this docs job and review the occupied-map fix for merge? I do not have access to rerun the upstream job. |
Problem
PRM roadmap construction rejection-samples coordinates until it finds an unoccupied point. When the occupancy grid has no free cells, that loop never terminates. This can also occur after obstacle inflation removes the last free cell.
Change
Before sampling a nonempty roadmap, check whether the effective occupancy grid contains any free cells and raise
NoPathErrorif it does not. Document the error onplan. Empty roadmap requests retain their existing behaviour.The regression covers both an initially full grid and a grid made full by inflation, plus a free-space control that builds a real roadmap. The impossible cases use the project's timeout plugin to detect the former infinite loop.
Validation
PYTHONPATH=src python -m pytest tests/test_prm_free_space.py tests/test_mobile_planners_a.py tests/test_mobile_performance.py -k 'PRM or prm or free_cells' -q: 14 passed, 22 deselected.git diff --checkpassed.Main-branch update
Updated with
mainatcee0023535988e4ae9490c81d639a46f2311b8fdin merge commit73651a81d2d2916866be5fa333419a29a5337baf. The original PR patch is byte-for-byte unchanged relative to the updated base, andgit diff --checkpasses.Fresh CI for the updated head records the new build and test results. The local validation figures above describe the original submission.
CI note:
mypyreports the same eight errors inblocks/mobile.pyandblocks/arm.pyas current main. Both files and the type-check configuration are unchanged by this PR. The current workflow runs this check as advisory withcontinue-on-error: true.Primary contributor: Afloat16, who has reviewed the original submission.
AI assistance for this follow-up: ChatGPT (GPT-6 Astra Pro), used for main-branch synchronization and verification.