Machine-Mavericks / Preseason2022

Codebase for the 2022 preseason challenge
Other
0 stars 0 forks source link

Investigate changes in the swerve drive libraries #15

Open gbuckholtz opened 1 year ago

gbuckholtz commented 1 year ago

This evening I have been reviewing last year swerve drive subsystem in addition to WPI changes made for this year. I think there are going to be some issues. SwerveDriveOdometry (which we make extensive use of) is now based on wheel distances instead of speed. Our swerve odometry will need a rework. This is listed under 'breaking changes' for 2023. The SPS swerve drive library is based on wheel speeds (using the old WPI SwerveModuleState structure), so this will need work if it is to function with odometry (now based on distances) I would like to spend some time to figure out the swerve/odometry differences. (edited) white_check_mark eyes raised_hands

2:02 I didn't see where SPS has updated for 2023, so there may be way to use as-is, or maybe its better to go to plan B. Last year, we found SPS libraries also had some issues of their own. We could generally work around them, but there may be a better way. white_check_mark eyes raised_hands

2:07 Niall: With change to odometry functionality, perhaps it will be more accurate than it was last year. It had ok performance, but not stellar. I also found how one can make functions that execute at faster rates than the typical WPI 50Hz rate. We could easily investigate if shortening integration interval further improves accuracy any. (edited)

gbuckholtz commented 1 year ago

Niall O’Driscoll 11:38 AM I've updated the Roborio image on Elmo, along with the firmware for the swerve motors and cancoders. If we want to try any new software it should be ready to go!