We seem to be having some strange issues this year. Last week we had a working program for our practice robot. We then put on a separate program to test some autonomous code. When we were done were put the old working code back on to find that our drive system axes were inverted. Basically backwards was forwards and forwards was backwards on the xbox controller. We made no changes to the code before sticking it back on. Does anyone have an idea as to why this occurred?
The robot used the 2015 control system with 4 jaquars.
If you didn’t change any code, then it sounds like you might have changed the wiring (or Jaguar ID numbers, if you use CAN).
If nobody admits to having changing anything, then why it changed is likely to remain a mystery.
We looked into that and no wiring had been tampered with, looks like it will be a mystery!
if no one wants to admit wiring your jaquars wrong. You can easily fix your problem by going into the code and inverting the numerical value that comes out of your axis, then putting this corrected value back into the tank drive.
If you have a tank drive system with PWM, and forwards and reverse have been swapped, but turning right is still turning right and turning left is still turning left, the left and right signals got swapped. This could have most easily happened:
- in code
- along the pwm lines
- between the speed controllers and the motors
As you have four motors, it would seem more likely that the change was in code or where the PWM lines connect to the RoboRIO, or at some connector halfway along the wire from the 'RIO to the jaguars, perhaps where you switched from a single cable to a wye cable.