Tuning swerve robot with an uneven mass distribution

In our team we are trying swerve for the first time and so far we are doing pretty good. We built a square chassis with the electronics and 4 swerve modules and I wrote some code to drive it, and it worked pretty well. A couple of weeks into the season, our robot is starting to take shape and we just tested the drive train with some of the mechanical elements on top and realized that it would no longer drive straight since some corners had more pressure than the others.

Initially I just had the same PIDF values for all four wheels. I am now thinking I might need to have separate PIDF values for all wheels in order for the robot to drive properly. This seems complicated though, especially tuning values for individual wheels, so I was wondering if other teams that are in similar situations have found alternate and more simple solutions to this problem.

Thanks!

Are you using a gyro with your swerve drive? If you are you can run a PID loop to adjust for any non-straight driving.

Keep in mind the interaction of this with other robots on the field, if a robot is pushing on the corner of your robot and trying to turn you, it might not be the driver’s intention to try to resist the turn, they may simply want to move away.

Just something to keep in mind, it may or may not come into play, however if it does, it might not always be intuitive in the heat of the moment what is going on.

We don’t experience much of this as our swerve have compression springs to try and mitigate a slight amount of uplift we can experience.
However, in auton we run a feedback loop for our gyroscope to mitigate issue. A more prevalent we had experienced was slight turning while driving straight, which also was fixed with a feedback loop on the gyro.

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