You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Initially in issue #11 (Add Swerve Drive Support), I didn't think we needed a SwerveModule class, as we could go without it, and I didn't really feel like writing one/know what would be in one. Coding further into it though, especially using the WPILib swerve drive support and following the example code, a lot of repetitive and not-very-fun-to-read code could be simplified using a SwerveModule class. The class should have getters and setters for all the WPILib swerve odometry and kinematics stuff (SwerveModuleState, SwerveModulePosition, etc), PID controllers for turn and steer, parameter loading support, and sensible default values.
Unsure whether to write a specific unit test for the SwerveModule class, as that seems like it would get tested in the SwerveDrive subsystem tests anyways. Might be worth it though.
Work Required
Create a SwerveModule class
Rewrite SwerveDrive subsystem to use the Swerve Module class (although this is more Add Swerve Drive Support #11's domain)
Verification
CI passes
Code is sufficiently commented and readable
The text was updated successfully, but these errors were encountered:
Just as a note, its probably easier to write unit tests for the SwerveModule class than the entire subsystem, and imo would be quite valuable since subsystems are harder to test (due to some functions being real time)
Summary
Initially in issue #11 (Add Swerve Drive Support), I didn't think we needed a SwerveModule class, as we could go without it, and I didn't really feel like writing one/know what would be in one. Coding further into it though, especially using the WPILib swerve drive support and following the example code, a lot of repetitive and not-very-fun-to-read code could be simplified using a SwerveModule class. The class should have getters and setters for all the WPILib swerve odometry and kinematics stuff (SwerveModuleState, SwerveModulePosition, etc), PID controllers for turn and steer, parameter loading support, and sensible default values.
Unsure whether to write a specific unit test for the SwerveModule class, as that seems like it would get tested in the SwerveDrive subsystem tests anyways. Might be worth it though.
Work Required
Verification
The text was updated successfully, but these errors were encountered: