-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wpimath] Implement Tsitouras 5th order numerical integrator #7383
base: main
Are you sure you want to change the base?
Conversation
7a33067
to
17135d5
Compare
wpimath/src/main/native/include/frc/system/NumericalIntegration.h
Outdated
Show resolved
Hide resolved
wpimath/src/test/java/edu/wpi/first/math/system/NumericalIntegrationTest.java
Outdated
Show resolved
Hide resolved
wpimath/src/test/native/cpp/system/NumericalIntegrationTest.cpp
Outdated
Show resolved
Hide resolved
wpimath/src/main/native/include/frc/system/NumericalIntegration.h
Outdated
Show resolved
Hide resolved
wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java
Outdated
Show resolved
Hide resolved
wpimath/src/main/native/include/frc/system/NumericalIntegration.h
Outdated
Show resolved
Hide resolved
wpimath/src/main/native/include/frc/system/NumericalIntegration.h
Outdated
Show resolved
Hide resolved
wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java
Outdated
Show resolved
Hide resolved
wpimath/src/test/native/cpp/system/NumericalIntegrationTest.cpp
Outdated
Show resolved
Hide resolved
8d64dab
to
f39bda2
Compare
/format |
wpimath/src/test/native/cpp/system/NumericalIntegrationTest.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot the WPI_UNIGNORE_DEPRECATED macro that pops the diagnostic state.
wpimath/src/test/native/cpp/system/NumericalIntegrationTest.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Tyler Veness <[email protected]>
Looks like the arm simulation test hung in C++ and Java on a few platforms. This could indicate a bug in the new integrator that's causing the max error to be really large (so the steps are tiny and the solver takes forever). |
The issue could be related to numerical precision, a bug in the implementation, or a bug in the paper. You could compare it against https://github.com/SciML/OrdinaryDiffEq.jl/tree/master/lib/OrdinaryDiffEqTsit5/src. |
The float method in the linked repo appeared to be at most 4 decimal places more precise, I can try updating the constants. In addition, the signs for the b2 constants are flipped in my code and the paper when compared to the other repo, so I will try swapping those as well. |
Closes #7123