Quote:
|
Originally Posted by Keith Watson
We encountered a problem for the first time today at the regional. It only happens in autonomous mode. Take the robot to the playing field, plug in the backup battery, power on the main battery, press reset on the controller, the camera does not initialize.
I've read other people have encountered the same problem but have not seen anyone have an actual fix.
The camera code is correctly called from autonomous mode and works if the robot is put into user mode then back into autonomous mode (which you obvisously cannot do on the field). We even did this in the pits and left the robot powered on till it was put on the playing field. It worked that time.
We have since found a spot in the code which is called in autonomous mode right before the inner while loop. We are going to try to reset the camera intialization variable there and test it during the finals.
The behavior is the same as if a controller reset does not call the program's static initializers in autonomous mode!
|
I got to thinking about this. Is this the reason IFI has the second "initialization" section directly before the autonomous
while loop? Would it be a good idea just to bypass IFI's initialization calls altogether and make your own initialized / not initialized flag that, when zero, calls the init routine and sets the flag to 1?
I distinctly recall a similar problem in our custom code last year, with the robot acting completely bezerk on the field, yet in the pit with the dongle, it worked perfectly. I had heard a rumor about the Arena Controller forcing some king of sync with the OI and RC; is there anything to justify this rumor? It might explain a lot of the "it worked perfectly until I put it on the field" problems.
Would this issue be reproducable on a 2004/2005 RC, since it seems to be a problem with IFI's default code?
Just some ideas...

__________________
CMUCam not working? Tracks sporadically? Try this instead:
http://www.falconir.com!
PM me for more information if you are interested (it's open source!).
Want the FIRST Email blasts? See here:
http://www.chiefdelphi.com/forums/sh...ad.php?t=50809
"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine
If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.
"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous
I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL