Serve Drive math

Our team is planning on trying to implement swerve drive during the off-season and potentially for next season as well. I’m a relatively new and inexperienced programmer, and I was wondering what the actual math behind a field-centric swerve drive is. Any help is appreciated.

Been there myself, heh.

Good news is, there are plenty of valuable resources available! I’d start with other threads and this in particular.

With something like swerve, it is difficult to explain unless I am over your shoulder writing it myself. So my advice: do some research! Research in any project is critical. That link is full of helpful info.

With that being said, I will gladly offer any assistance to specific questions. It is a rather simple outline for a robot oriented swerve by the way. Simply make your basic cartesian coordinates polar coordinates (look at the link!), do some velocity and angle calculations for each set, apply speeds and positions!

Hope this helps to some extent! Please feel free to reach out and ask anything!

1 Like

Alright, thank you for the references!

Once you understand the theory, WPIlib has swerve drive kinematics implementations that totally rock. Then you can focus more on PID tuning and other fun features of swerve.


Thank you for the help!

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