Swerve Drive

Hello, I am trying to learn how to code swerve drive as a side project to help learn and teach it to the high school team. Right now my friend and I built one using the MK4i modules using the neo brushless motors, sparkmax CAN, the built in encoders on the Neos and a NavX. Was wondering if anyone could help me learn how to get this thing moving.

Do you want to understand the math or do you want to know how to program one to work?

I’ve never coded swerve, but I’ve heard great things about YAGSL.

2 Likes

This video FRC 0 to Autonomous: #6 Swerve Drive Auto - YouTube is fantastic, and I thought it was a great entry point into actually understanding swerve code. Understanding your goals and experience might help with giving advice. If you just want to get driving as quickly as possible, using YAGSL is probably the best choice. If you want to learn about how to code swerve, following that video or otherwise modifying starter code would probably give you more experience.

7 Likes

OMG that video was a life saver for me this year

You do have a absolute encoder right?

1 Like

both, the video that the other mentor posted is helping but my code is stuck

Do you know a resource for learning the math behind it? I’m interested in learning that.

1 Like

Look up ether swerve derivation.

1 Like

Thanks!

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