-
Notifications
You must be signed in to change notification settings - Fork 143
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
Replace iterative solver in SwerveSetpointGenerator with direct solutions #944
Replace iterative solver in SwerveSetpointGenerator with direct solutions #944
Conversation
I have now added the derivations alongside the implementations, and verified that PathPlannerLib still builds. I have not yet tested this implementation with a robot project, although the solutions themselves have been tested and seem correct in my original implementation here. |
I've noticed an oversight in my |
Just out of curiosity, do you have any data on how this affects setpoints (if at all) and the performance? Also, this will need to be added to the python version (maybe the c++ version as well depending on which gets merged first). I can help do the translation if you need it. |
I wrote a small test that runs each implementation 1 million times with random inputs (source here), the results on my laptop are:
I don't currently have access to a RoboRIO to test on-robot performance, but I assume the results would be similar. |
This replaces the iterative root finder in SwerveSetpoint generator, used for
findDriveMaxS
andfindSteeringMaxS
, with direct solutions for each of them.This is currently a draft because: