-
Notifications
You must be signed in to change notification settings - Fork 133
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 C++ #926
Conversation
Could you duplicate the check from #927 in this? |
Done. Probably won't pass any tests due to wpilibsuite/allwpilib#7549, but probably you would like to fix that on another PR to keep things clear. Also I'll update the docs until the python implementation PR is merged to prevent a merge conflict. |
Tests should be able to run now if you merge in main. Feel free to update docs whenever, the merge conflict would probably be very minor since it would just be separate tabs + removing the note about being Java exclusive. The python PR still needs that 927 check so whichever one is done first will be merged first. Has this translation actually been run/tested in sim at least yet? |
pathplannerlib/src/main/native/include/pathplanner/lib/util/swerve/SwerveSetpointGenerator.h
Outdated
Show resolved
Hide resolved
I have not tested it yet, will be working on that in the next couple of days, I'll let you know when it's done. |
When you get a chance, can you add the changes from #930 as well? |
I updated the docs and added the changed from #930, still need to test it, hope to get it done during the weekend. |
Got another change to bring over: #948 |
Hopefully the last one: #944 |
A quick update on this, I've been testing it with my own code and CTRE Swerve Drive and found out that the maxSteerVelocity on the generator has to be set up around 90 to 100 rad/s to allow the robot to move but that just causes some weird behaviors due to the high value of the steering speed. I've tried to debug it but no luck yet, will update when I find the issue. Also not sure if that is caused by something else. |
Should be good now, I was totally confusing the units, just made the change to match Java and Python. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #926 +/- ##
=======================================
Coverage 84.71% 84.71%
=======================================
Files 95 95
Lines 9611 9611
=======================================
Hits 8142 8142
Misses 1469 1469 ☔ View full report in Codecov by Sentry. |
I translated the swervepoint generator to C++, but documentation still needs to be updated but just wanted to create the PR in case there is something wrong with the translation