Skip to content

fix: stop quintic paths at their terminal time - #909

Open
Afloat16 wants to merge 2 commits into
petercorke:mainfrom
Afloat16:fix/quintic-planner-terminal-sample-20261030
Open

Afloat16 wants to merge 2 commits into
petercorke:mainfrom
Afloat16:fix/quintic-planner-terminal-sample-20261030

Conversation

@Afloat16

@Afloat16 Afloat16 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The quintic planner previously sampled through T + dt. When the step does not divide the duration, it can evaluate beyond the terminal boundary and return a path beyond the requested goal.

Generate samples strictly below T and append T exactly once. Validate that dt is positive and finite before constructing the samples.

Numerical results and public behavior

Non-dividing and oversized time steps now finish at the requested terminal state instead of extrapolating beyond it. Non-positive or non-finite dt values raise ValueError. Public signatures are unchanged.

Regression coverage

Non-dividing and oversized steps, terminal position/velocity/heading, exact-grid controls, and invalid time steps.

On the unchanged original baseline, the 17 new regression cases reported 6 failures and 11 passes; all 17 pass with the fix.

Recorded focused validation

The earlier follow-up run used Linux and Python 3.12.14. The selected suites reported 50 passed.

PYTHONPATH=src python -m pytest -q tests/test_quintic_planner_terminal_sample.py tests/test_mobile_planners_a.py tests/test_planner_failure_contract.py

The result above is the previously recorded focused run. The new regression test files passed Ruff lint and formatting, and git diff --check passed. Full local repository, local documentation and local cross-platform runs are outside that result.

Current branch and hosted CI

The branch includes upstream main at 879fb363580840e19ee70b6b175e8cd3543e2b38; current head: 87a68c08a666334d24091bd93ea5a4f2c1a86f13.

Current-head CI is successful, including mypy, core tests, the Linux/macOS/Windows test matrix and the documentation build. The docs-deploy and Dependabot auto-merge checks are skipped in their applicable workflow context.

Checklist

  • Final diff reviewed and validation results checked.
  • Regression tests cover the affected behavior.
  • Numerical and public behavior changes are stated above.
  • Branch updated from main.
  • Current hosted CI passes.
  • PR is ready for review.

Co-Authored-By: ChatGPT (GPT-6 Astra Pro)
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

@petercorke

Copy link
Copy Markdown
Owner

Thank you. The change looks right to me. I checked that nothing else here calls the planner, and the changed numbers for durations that dt does not divide are what I would expect.

Could you read the diff yourself and tick the "personally read, run and understood" box? Then please update the branch from main (that clears the red mypy, now fixed) and mark it ready for review.

@Afloat16
Afloat16 marked this pull request as ready for review November 3, 2026 08:32
@Afloat16

Afloat16 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

I have reviewed the final diff and the validation results. The branch includes main at 879fb363, and the PR is ready for review. CI for 87a68c08 passes, including mypy. The planner now samples below T and appends T once, so non-dividing and oversized steps reach the requested terminal state without extrapolation.

This branch has not been deployed

No deployments
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.

2 participants