Repository navigation
Conversation
Build the circular dilation footprint from the requested world radius instead of rounding the radius to whole cells. Preserve inclusive cell boundaries and reject invalid radii before modifying the map. Co-Authored-By: ChatGPT (GPT-6 Astra Pro) <noreply@openai.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 16 |
| 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.
Contributor
Author
|
Could a maintainer rerun the failed jobs in this workflow run? At head The inflation change and its local regression results are unchanged. I could not retry the workflow: the API returned 403 and the GitHub run page offered no re-run control. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Obstacle inflation rounds the requested radius to a whole number of cells before building its circular footprint. This changes the requested clearance in either direction: at 1.45 cells, diagonal neighbors only sqrt(2) cells away remain free; at 1.55 cells, axial neighbors two cells away are incorrectly blocked.
The error reaches real planning: a distance-transform path with inflation 1.45 can pass within 1.414 cells of an occupied center, while a corridor with two cells of clearance is rejected at inflation 1.55.
Change
Use the requested floating-point radius for footprint membership, with a ceiling only for the footprint's bounding box. Include exact cell boundaries despite floating-point division rounding, and reject negative or nonfinite radii before modifying the grid. The existing dilation operation is retained.
Behavior change: fractional-cell inflation now uses the documented world-space radius. Paths and corridor availability can consequently change. Invalid radii raise
ValueErrorwithout changing the map.Validation
DistanceTransformPlannertests check minimum obstacle clearance and a narrow corridor at two cell sizes.mypy: all 166 source files passed. New tests pass Ruff lint/format;git diff --checkpasses.Prior work
Checked all 105 prior fork heads and the relevant upstream patches. The older occupancy-region fork retains the rounding implementation. #779 changes annotations, documentation and a spelling error around inflation; #928 clips regions and #790/#769 guard negative indices. None changes fractional-radius footprint membership.
Primary contributor: Afloat16.
Prepared with ChatGPT (GPT-6 Astra Pro) assistance.