Quote:
Originally Posted by dheerm
our team was having trouble with encoders as well. Yes different battery voltages do matter when sending a value to a Victor because the value sent to the victor is the equivalent of a percentage of your current voltage. So to try to get a better measurement, I tried a last minute fix.
Wheel Motor Voltage = Value sent to Victor * Battery Voltage.
Therefore, Value Sent to Victor(Or other speed controller) = (End Voltage / Battery Voltage).
All you have to tune is the End Voltage that you want your wheel to have. Batter Voltage can be calculated (in Java) by instantiating a DriverStation object and using the getVoltage() method.
Same method should be in other API's.
It didn't give us 100% consistency but it did significantly improve it. There are of course other variables.
|
I'd recommend caution with this technique. You can end up with some interesting interactions since you'll be drawing more power, which will drop the voltage more, which will draw more power, etc. etc.