I’ve been looking into using .setVoltage() for the swerve module to get rid of voltage sag and I saw that in the SwerveBot example provided by wpilib https://github.com/wpilibsuite/allwpilib/blob/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervebot/SwerveModule.java, they did not use the kA value for the SimpleMotorFeedforward. Is there a reason behind this? Is it better to use or not use the kA value?
Look at this note on the WPILib feedforward docs page.
Compared to the friction from the carpet, the rotational inertia of a swerve module is very small. So the kA term can be omitted (set to zero).
2 Likes
Oh I see, thanks
Does this mean the kA term is to account for the resistance to torque of the mechanism, depending on its MOI?
(Or, for linear mechanisms that’d just be force & mass)
Correct. kA determines how much feedforward goes towards accelerating the system. The higher the system’s inertia (mass or MoI), the higher kA needs to be.
From the Intro to DC Feedforward page:
1 Like
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.