Can someone confirm/explain the difference between driving Jaguars via kPercentVbus which is a plain -1 to +1 PWM duty cycle (ie: 0.5 means 50% ON in the forward direction), and kVoltage (ie: 5 means +5V).
I assume the latter means the Jag will output an average of +5V during its PWM cycle irrespective of battery voltage (assuming it is > some minimum above 5V) (what is that minimum delta? maybe 1V?).
For the examples above that means, if the Battery is 12V, a kPercentVbus will provide an average V of 6V whereas in the second it will be 5V. This can then be an effective way (easier than PID) to provide a known power input to the motor irrespective of the varying state of the battery. So for example driving the shooter power via kVoltage would be quite predictable after calibration. May even be more predictable than fidling with a PID.
Now onto some confusing documentaion:
From:
http://javadoc.waltonrobotics.org/edu/wpi/first/wpilibj/CANJaguar.html#kControllerRate
getOutputVoltage
public double getOutputVoltage()Get the voltage being output from the motor terminals of the Jaguar.Returns:
The output voltage in Volts.
Also:
configMaxOutputVoltage
public void configMaxOutputVoltage(double voltage)Configure the maximum voltage that the Jaguar will ever output. This can be used to limit the maximum output voltage in all modes so that motors which cannot withstand full bus voltage can be used safely.
Parameters:
voltage - The maximum voltage output by the Jaguar.
This implies the output votage from the Jag is analogue not just ON/OFF???
If so then getOutputVoltage() will NOT return the average V of a PWM cycle.