Swerve Characterization Problems & Possible Workarounds

Hi Everyone,

We have been using our swerve drive motors with the simple yet effective way of doing percent control desiredSpeed/maxSpeed for the time being, but we are currently trying to implement the necessary control loops (PID + FF) for the drive motors.

The setup is Fast geared SDS Mark 3 Modules w/ Falcons with SRX Mag Encoders on the RIO-side. The drive encoders are the built-in Falcon encoders.

We have run the characterization through the new tool Sysid, however, our rotation motors caused too much error fiddling around. We could not find the generated project by the tool, I believe it does not save it somewhere explicit. So, the workaround we came up with was to pull out the drivetrain template the tool uses and define our rotation motors there, and set the motors to brake. (We could’ve simply used the brake buttons on falcons, but this occurred to us way too late.)

The issues with our characterization were like the following:

  • The quasistatic tests were pretty smooth in terms of robot movement with some drift to one side which is expected. But the dynamic tests were very jittery. The robot was moving forwards (somehow) but the movement was not smooth but very aggressive and had a lot of jittering as if it was dropping packages or it was only trying to move every 4-5 loop iterations rather than all of them. My first diagnosis was the drift of rotation motors causing the wheels to work against each other. So, we made sure our wheels are all perpendicular and gave it another go. We still had the same results.
  • We tried with the data we had even though the dynamic tests were not of significance. It was obviously off by a lot and did not work properly. (The encoder, gyro data, and regular robot code seem to be fine without any package drops, unit errors, etc.)

My questions here are:

  • What could be causing this jittering only in dynamic tests? How can we resolve this?
  • How hard is it to create a custom characterization routine (only for data collection), or is it feasible or advantageous in any way? (I know some teams do this, so I would love to hear about it.)
  • Honestly, our team has had a lot of issues with the characterization step. Thanks to the amazing developers of WPILib and ChiefDelphi, we somehow managed in the past seasons. But still, I was wondering how feasible it is to have a P or PD controller tuned manually for this purpose without FF. Is this a doable option? What possible drawbacks are there of not having FF in terms of FRC competitiveness?

Any further guidance is appreciated. Thanks!

1 Like