Quote:
Originally Posted by Alan Anderson
...or calibrating their control system to their joysticks. Doing it in software is not as convenient as using the built-in feature of the Victor, but it helps keep autonomous control values consistent.
|
Yes, this is quite important for autonomous. I would not recommend doing what Al said (calibrating the Victors to the joysticks). This is what we do:
- First, calibrate the joysticks such that the OI reads 127 when the joystick is centered. The IFI Dashboard makes this really easy.
- Next, determine the minimum and maximum values that each joystick axis will output - they'll usually all be different (again, IFI Dashboard comes in handy).
- Write scaling code that scales each joystick axis to the full 0-254 range.
- Use this scaled value everywhere in code for driving. This allows your autonomous routines to send in a 0-254 value and look just like the joysticks.
- Finally, we have special software that we use to calibrate the Victors. It does not output raw joystick values, but rather ensures that the PWM outputs are driven through their full range from 0 to 254.
After all this is done, from that point on the only thing that needs to be done is to adjust the joystick "min" and "max" values if a joystick is replaced, or to recalibrate a Victor only if it is replaced. Like Alan said, doing this ensures that your autonomous behaves correctly.