Repository navigation
fix(mobile): rebuild D* plans and report traversed costs - #1000
Merged
Merged
Conversation
Reset the search tree for each explicit plan, repair the frontier after a priority decrease, and report the cost of the route actually followed. Raise NoPathError for unreachable goals and finish animations on failure. Co-Authored-By: OpenAI Codex (GPT-6 Astra Pro) <noreply@openai.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 26 |
| 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.
5 tasks done
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.
What
Four fixes to
DstarPlanner, by @Afloat16: PR #996 (D* plans), rebased ontomain. That PR sits on a fork and cannot be updated frommain, so its commit is kept here with their authorship; one commit of ours changes theversionchangednotes from 1.6.0 to 1.5.1.plan()builds a fresh search tree from the current goal and costmap, so a second call follows the new goal and edited costs. It kept the old goal's zero-cost root and ignored costmap edits.query()sums the steps actually followed, including a sensor detour. It reported the initial plan's cost (3 for a route that became a1 + 2*sqrt(2)detour).NoPathError, and the animation is finished when a query fails. It returned a path through infinite-cost cells.Supersedes #996; I will close that one with a thank-you.
Behaviour
This changes results in the four cases above, as the
versionchangednotes say. For a plan followed without a sensor, nothing changes: on 40 random cost grids the path, cost and expansion count are identical tomain. The expansion count restarts with an explicit newplan().What I ran, and what I could not
tests/test_dstar_replanning.py(12 cases): 8 fail onmainand all pass here, on the pure-Python path.mainabove, with no sensor.AI assistance
@Afloat16's PR says it was prepared with OpenAI Codex. The rebase, the version change and the checks above were done with Claude Code (Claude Sonnet 5.5), reviewed by the maintainer.
🤖 Generated with Claude Code