On Saturnday, April 12, at Nationals, our robot experienced a strange Robot Controller error which crippled it through the User Control Mode of the two matches we had that day. To view these matches, check out arc_108 and arc_123 at http://www.soap108.com/2003/movies/arc/.
Early on Saturday, We perfected an autonomous mode program designed to take out a HP stack and then go up the center of the ramp (showcased in Match #123). We downloaded the program, and all 4 pages downloaded successfully (at least that is what it said). We proceeded to our first match of the day (#108). In the match we ran an old autonomous routine (straight up the center). However, the pitch gyro on the robot did not stop the robot after it went over the ramp (as it should have), so as result the robot hit the wall. There the robot sat for the most of the match except for a short period at the end where it crawled with drastically reduced power.
Once the robot got back to the pit, we frantically tried to troubleshoot the problem. Nothing was disconnected or broken. We tethered the robot and ran User Mode (we did not run Auto Mode first, but in hindsight we should have). Everything ran fine, the motors were giving full power. With the pit announcer queuing us for about the third time, we rushed the robot back to the field hoping the error would not happen again. The only explanation I could come up with to explain last match’s performance was: the gyro malfunctioned, causing the drive motors to stall out against the wall, causing the voltage to drop below critical, causing the controller to enter Safe Mode (a problem we had last year), causing the motor power to be reduced.
In Match 123, We ran the new autonomous routine. We successfully knocked over a HP 5 Stack and went up the center of the ramp. At the end of auto mode, the robot rolled back down the ramp where it remained immobile for the rest of the match. As in the last match, functions other than the drive train seemed to be working fine. I knew Safe Mode was not the problem.
We got the robot back the pit and ran new tests. We tethered the bot and ran User Mode, it was fine. We ran Auto Mode (with dongle) and then User Mode, and the problem occurred again. We figured out there must be something wrong with variable declarations across pages so we loaded (successfully) the program we used coming into Nationals (although it had identical variable declarations). The robot worked flawlessly. Curious, we reloaded the new program we loaded that morning (the exact same one that was having problems) and all 4 pages downloaded successfully. The problem was gone! We even ran a practice match on 118’s ramp to confirm that the robot was working correctly.
The best explanation I can give for this strange occurrence is a communication error during the download (which was completed successfully) caused a pointer to be changed. I assume the RC uses a CRC (Cyclic Redundancy Code) to verify data integrity over the download. A CRC is very good measure, but there still is a slight chance the data was corrupted somehow. All that would have to happen for a motor problem like this to occur in User Mode would be a bad reference for p1_wheel. We dont declare p1_wheel in the Autonomous pages of the code (since it would be 127) but we use it as a throttle in the User Mode page (it scales the joystick, a low value would nearly disable it). Maybe it got crossed with the Pitch gyro integration variable (which didnt work in the first match and wasnt used in the second) which is used only in Autonomous Pages. The throttle (p1_wheel) was turned all the way up while the error occurred so that was not the problem. The throttle behaved normally after the program was reloaded.
I think this error occurred because a fluke hardware miscommunication corrupted the software in the EEPROM banks of the RC. I couldnt put debug statements in the code, and I cannot reproduce the error, even with the same code, so I will never know for sure. If anyone has any incite into this occurrence or similar experiences (however unlikely that is) please post about them to help better understand this problem. I will answer any questions you post or pm about incident.
P.S. Sorry for the length of this post, but I thought I should tell my whole story.