Repository navigation
fix(trajectory): solve the quintic in normalized time, Hermite form behind method= - #805
Merged
Merged
Conversation
Restore the six-equation teaching solver with a numerical-rank guard. Export the normalized-time Hermite function and use it for sampled quintic trajectories. Cover caller routing, endpoint derivatives and representable duration scaling.
…ehind method= The quintic boundary-condition matrix has entries from 1 to T**5, so its condition number is 1e15 at T=1000 and 1e16 at T=0.001, and lstsq silently drops a boundary condition: quintic(1, 2, 1000) started near zero. quintic_func now solves the same linear system in normalized time tau = t/T, where the matrix is that of the docstring with T = 1 (condition number 762, the same for every trajectory), scales the velocity boundary values by T and the derivatives by 1/T and 1/T**2. The closed-form Hermite basis contributed in #736 is kept, as method="hermite", and is used as an independent check. Raise ValueError for a zero or non-finite duration, and for a trajectory of fewer than two samples, instead of returning a degenerate result. quintic_hermite_func is not a public name. Triggered by #736 from Afloat16. Co-authored-by: Afloat <[email protected]> Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 32 |
| Duplication | -2 |
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.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #805 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 144 144
Lines 14853 14856 +3
=====================================
- Misses 14853 14856 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7 tasks done
This was referenced Oct 16, 2026
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.
Summary
quintic(1, 2, 1000)started near zero instead of 1. The boundary-condition matrix has entries from 1 toT⁵, so its condition number is ~10¹⁵ atT=1000and ~10¹⁶ atT=0.001, and the least-squares solver silently drops a boundary condition.This solves the same linear system in normalized time
τ = t/T: the matrix is the book's matrix withT = 1(condition number 762, the same for every trajectory), the velocity boundary values are scaled byT, and the derivatives by1/Tand1/T². The closed-form Hermite basis from #736 is kept asmethod="hermite"and used as an independent check.quintic_func(..., method="lstsq" | "hermite");quintic()uses the default, so the book's call signatures are unchanged.ValueErrorfor a zero or non-finite duration, and for a trajectory of fewer than two samples (previously a degenerate result).quintic_hermite_funcis not a public name.quintic/mtraj/jtrajconsistency, and the bdsimTrajblock.Found and first fixed by @Afloat16 in #736, whose commits are included here with their authorship.
Co-authored-by: Afloat [email protected]
Related issue
Supersedes #736.
Checklist
test_ERobot/test_fknm_fallbackfailures are identical onmainwith a stale compiled extensionversionchangednotes added🤖 Generated with Claude Code