Whenever our joystick is tilted even the slightest amount to the right, the robot’s wheels violently jerk right at maximum speed and then stop moving. Our robot then stops responding to any commands but if we quickly hit disable and reenable it continues responding.
I think your issue is either the program and Jagaur, a faulty jagaur, or possibly you digital side car.
Make sure that your program says slowly increase its speed as you move the controller to the right. I am not a programmer so I don’t know exactly what that would be called. I think because it jerks to the right and turns off that the jagaur is just getting over loaded. I know that if we jerk our robot forward and backwords that the jaqaurs have to restart sometimes. This may be whats happening. So I would try NOT disabling the robot after this happen’s, wait at least a 10 seconds (may work better if left for a longer period of time) and try moving again.
The other issue might be that your jaguar is thinking itshould be put at full power, when it shouldn’t be. I’m not sure if there is a “reset” for them or not, but if there is try reseting your jaguar. If that doesn’t work try replacing it with a new one.
The digital side car might be telling the jaquar to go at full power, instead of steadily increasing like it should. Try “reset” if there is one, if not replace it.
Most likely the issue is the first one, then maybe second, if not try the third. I am not a programmer of Electrical person, so dont trust me 100% with this. But I have enough experience with both to help troubleshoot. Good luck! Hope this works out for you!
We tried waiting a few minutes after the robot kicked, but it did not respond. This makes it less likely the jags are overdrawing. We will try resetting the jags
While someone looks at the code for problems, have someone else double-check the wiring from your speed controllers to your motors. If something is cross-wired, you can get really weird results that only show up under specific conditions.
We lost our old code from last year and are trying to reprogram it for an unofficial competition coming up soon. We are using the new compact cRIO - last year we had used the cRIO I. The robot hasn’t worked well since we changed cRIOs and lost the code.
Our programmer was thinking that it had to do with pointers in C++; he had been getting the “MotorSafetyController.cpp at line 123” error, but he fixed that and the problem is still present.
While someone looks at the code for problems, have someone else double-check the wiring from your speed controllers to your motors. If something is cross-wired, you can get really weird results that only show up under specific conditions.
We’ll check on that too, thanks. We are pretty certain nothing has changed since last seasons competition - where the bot worked fine - but there have been a lot of people around the robot so anything is possible.
We attached our code in our OP and we are using WPILib. Two joysticks, one is arcade style.
@Alan: The wiring is solid.
@akoscielski: We reset the jaguars but it is still having the problems. Whenever we move the drive joystick the SLIGHTEST bit towards the right, even a tiny, indistinguishable bit, the robot kicks out.
Could someone explain why this would cause the drivetrain would work fine in the forward, and reverse, and rotate left directions, but not in the rotate right direction?
Assume four motors, two on each side. Further assume that the wiring is such that one side’s motors run “forward” and the other side’s motors run “reverse” for forward travel of the robot.
The DS can “sneak” some power from the PWM signals coming from the cRIO. When the robot is being commanded neutral, it’s getting four 1.5ms pulses every so often, and that’s enough to make it work. When it’s being commanded either forward or reverse, two of the signals get shorter, but two get longer, and it balances out. When it’s being commanded to turn left, all four signals get longer. But when it’s being commanded to turn right, all four signals get shorter, the DS gets starved for power, and things stop working.