Team-OKC-Robotics / FRC-2022-CPP

a c++ port of our FRC-2022 code as training in C++
Other
0 stars 2 forks source link

Add Swerve Drive Support #11

Open danielbrownmsm opened 1 year ago

danielbrownmsm commented 1 year ago

Add Swerve Drive Support

Summary We have a swerve drive. It needs to be coded.

Work Required

Verification

jkleiber commented 1 year ago

We should make the swerve drive into its own subsystem rather than mixing it with the Drivetrain/DrivetrainIO system. Something like SwerveDrive and SwerveDriveIO seem like names we could use

danielbrownmsm commented 1 year ago

why?

danielbrownmsm commented 1 year ago

also, research thus far:

jkleiber commented 1 year ago

It makes more sense to start with a clean slate since the swerve drive will use different amounts of motors and different driving/odometry logic. It's almost totally different so we should make it a separate subsystem, saving the current drivetrain code as legacy code in case we make a west coast drive again

danielbrownmsm commented 1 year ago

Working under the assumption that we are plugging the absolute encoders into the roboRIO. If we're plugging them directly into the sparkMAXes instead, we'll need to change some code

danielbrownmsm commented 1 year ago

https://github.com/wpilibsuite/allwpilib/blob/main/wpilibcExamples/src/main/cpp/examples/SwerveBot/cpp/SwerveModule.cpp