Swerve Drive Tuning Tips and Debugging Steps

I am trying to compile a list of common debugging and tuning steps for YAGSL in this discussion to help out teams using YAGSL and in general any teams using Swerve Drive and may not know all of the little nuances that cause it to fail. I do not have any steps or instructions on how to use SysID since I have never done that myself for it yet. All contributions are welcome, hopefully this can contain a wealth of knowledge on swerve drive mistakes we have all suffered or will suffer from!

1 Like

An important step if you want your odometry to work is to do a distance calibration. Move the robot a specific distance in software (say 20-50 feet) ON CARPET, and measure how far it goes in the real world. Go slow to eliminate slipping. Calibrate your effective wheel diameter based on the results.

Also, put comments in your code as to what the constants DO, and what the expected range of adjustable ones might be. IE, your theoretical wheel OD is say 4", and it can’t be outside if a rabge of 3.75 to 4.25". You can base that range on bump tops vs the bottom of the tread grooves.

Bonus points for recording the history of your adjustable constants in the comments. That will help if you have to revert or if you mess up on a measurement.

1 Like

YAGSL took care of the comments and history part by moving those to a json file. But i love your suggestion on calculating effective wheel diameter.

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