[wpimath] Fix trapezoid profile#8556
Open
cb144p wants to merge 40 commits into
Open
Conversation
calcmogul
reviewed
Jan 9, 2026
062aeae to
eb8b150
Compare
calcmogul
requested changes
Jul 6, 2026
3b376d2 to
47077ca
Compare
calcmogul
requested changes
Jul 8, 2026
calcmogul
requested changes
Jul 9, 2026
calcmogul
reviewed
Jul 9, 2026
calcmogul
requested changes
Jul 9, 2026
calcmogul
requested changes
Jul 10, 2026
Member
|
There's merge conflicts in the Python tests. |
4e53ffa to
cc43549
Compare
calcmogul
requested changes
Jul 10, 2026
calcmogul
reviewed
Jul 10, 2026
295bc53 to
03c87e7
Compare
calcmogul
approved these changes
Jul 10, 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.
Closes #7917.
This PR rewrites the trapezoid profile implementations in WPILib to use a phase space formulation. In doing so, the API is updated to match the exponential profile implementations. The following changes to functionality have been made:
TimeLeftUntilmethod has been updated to take two states instead of a distance from the last state passed into theCalculatemethod. This functionality matches that of the exponential profile.The tests have been updated to check for these bugs and to reflect the API change. The algorithm used in the new implementation has been documented in TrapezoidProfile.md.
Additionally, the LinearSystemLoopTest.java file has been updated to properly use the TrapezoidProfile class.