Quote:
Originally Posted by Jefferson
Now that we have slip rings on our swerve modules, we spend some time at the roll-over point of our analog encoders (the point where it rolls from 5V to 0V). We were surprised that there was significant "chatter" around this point and chalked it up to a bug in the PIDContoller to be found latter.
In trying to debug some different weirdness observed in crab, I started looking more closely at the values reported for GetAverageValue from the modules. I was surprised to find that the encoders never report anything greater than 970, but roll over all the way to 0.
A few things we checked:
Encoders are providing a full 0-5V output range.
GetValue provides the same range.
|
Is there any reason you are not using the GetVoltage entry-point? That will take into account factory-calibrated scaling coefficients unique to every module. You will get far more accurate results using that method. At the very least, try that and see how closely it matches your DMM at that max value.
Also keep in mind that the range of the module is -10V to 10V.
Joe