BroncBotz3481/YAGSL-Example

setDesiredState Does not use FeedForward

MarshallTappen opened this issue · 1 comments

(Updated in comment below)
SetModuleState in SwerveModule.java has the following line:
driveMotor.setReference(velocity, 0);

This sets the feedforward to 0. We are using CANSparkMax, what is the right way to use feedforward?

This may cause of the reported issues of wheels not moving. If you use the default PID values for the NEO files, the actual set value to the motor is 0 because the error is scaled down to ~0.08.

Thanks!

OK, this is a false alarm. After looking at REV documentation, the feedforward term in the SparkMAX PID controller will work fine. It should probably be set around 0.2, but we are still tuning. I can submit a PR later if it would help.