Some help with Swerve Characterization

I need a little help with the sys id setup for swerve drive, I’m trying to add all four drive motors but it only lets me add the motors as pairs. In addition, it only allows me to have two encoders and it won’t let me add a encoder for each drive motor. here is a screenshot:

i don’t think sysid has a characterization routine specific to swerve drive?
However, swerve drive is pretty much tank drive if you turn off the steer motor on your swerve modules. Align the wheels to the same direction, give sysid the id’s for your swerve modules’ drive motors, and try it out? Don’t know how accurate your values will be. With this solution, you would also have to manually tune the steer motors.
Alternatively, i think some swerve modules vendors give rough estimates for swerve pid and ff vals. Someone might have a better idea tho.


Ok, I can just add the front two drive motors as a pair and the back two drive motors as a pair. Would I just need to add the encoders for two of the motors though? I don’t have the option to add more than two encoders.

I think so? One for the left side and the other for the right side? I don’t believe I ever used CANCoders (sorry). For my team, we use the data port on our spark maxes. For the data port selection, I think sysid just assumes you use the same encoder type for all your drive motors. I don’t know how useful that is for your use case tho.

Ok, thanks. I accidentally pressed on can coders. We are actually using built in motor encoders in our Neo brushless motors. That would be the spark max data port value right?

If you are using the built-in motor neo encoders, I believe that you should select “encoder port”. That’s the one on the side of the spark max, as opposed to the data port (which is located on the top of the spark max). Here is a picture for reference of the encoder port:

Oh, ok. Thanks!

I may be wrong about this because we don’t have swerve, but you should be able to characterize the steer motors with the general mechanism setup and the robot just resting on the ground. You could do all four separately or just copy the numbers from one to all the others.

1 Like

My swerve code does not have a feed forward value for each module, it uses a overall drive ks kv ka for the drivetrain so I might not be able to do that. I’ll try it though.

Drive motors should all be the same constants and probably so should the steer, but with the steer you have the option to do them separately. (Might be worth doing this to make sure one doesn’t have more resistance than the others, not for separate values)

Oh ok

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