-
Notifications
You must be signed in to change notification settings - Fork 162
Add Swerve Setpoint Generator to PPLib Python #917
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
Add Swerve Setpoint Generator to PPLib Python #917
Conversation
|
I don't think additional kinematics is required at the moment, as various places in the library for all languages currently only support using 4 modules. This is mainly due to path flipping, which can only handle properly flipping feedforwards if the modules are in FL, FR, BL, BR order, which is only possible when using 4. |
|
I figured that was the case, but I kept is as a possible. I'll probably leave the code how it is in case someone wants to update it to run with other module configurations in the future, since most of it is built to work with an aribtrary amount of modules. |
|
After fixing all the type errors and adding the additional constructors, I seem to be having a logic error with the drive motor calculations. The steer motors seem to be working correctly, but the drive motors output nearly nothing. This could be from my implementation, but I'll have to double check my translation when I get the chance sometime soon. |
|
Still no luck 😔 |
|
I forgot 2 parenthesis, but after adding them back the setpoint generator works! All that's left to do is to update the documentation, but I'll mark this PR as ready for review. |
|
Should be good now. |
|
Could you duplicate the check from #927 in this? |
I have translated the SwerveSetpointGenerator and such to Python, however there’s a few more things I plan to add:
Additional Kinematics support (currently only works with 4 modules)A fair bit of PathPlanner currently only works with 4 modules, so this won't be added.I also need to test to ensure I translated it correctly.