Programming the Swerve Drive

Hey! Our team just got the swerve drive delivered and we’re hoping to have it running for the upcoming season. It’s the MK4i model with falcons 500 as the rotating motors and Neo’s as motors for the backwards/forwards motion. We almost have it on the frame and the biggest issue for us is programming it. Please, share any tips or advice for setting it up in the code. Any recourses used for programming it would also be appreciated! Just need to get the head start in the code and getting any little bits of information about it would be wonderful. Also, thinking about switching to field-centric programming for this season (new drivetrain, new driver), so tips on that would be useful too, if they relate to the swerve drive. Thank you!

first of all why not put the Neo as the steer motor and the Falcons as the drive motor so you’d be faster and quicker

and as for your question check out other team’s swerve implementations like 364 base swerve code and you can also check out 6624’s swerve guide.

Thanks for the links! We put the falcons as the steer motors, since our encoder didn’t come yet, so we can start using the build-in encoders in the motors for that purpose. I don’t know how that’s going to work though, so we might switch the motors around.

1 Like

NEOs also have built in encoders. You should switch to using Falcons for drive and NEOs for steering. The slight extra power from falcons will help with driving while steering doesn’t need the extra power so it can do with NEOs.

2 Likes

364 is like the swerve code

1 Like

There is also the yagsl library, but I have not used it myself.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.