View Full Version : Camera won't initialize when reset from RC - reset from OI and Power-up works,
We've run into an interesting problem. We are using the streamlined code from Kevin Watson's code repository.
1) When we first turn on the RC, it successfully initializes the camera, and begins searching.
2) When we reset the RC by pressing the RESET button on the RC itself, the camera initialization fails. The debug information shows that we fail in STATE #3, with and error code of 131.
This is error what we got when press reset button .....
Camera: Initialized abnormally with the code 131
Camera: Initialization state : 1
Camera: Initialization state : 2
Camera: Initialization state : 3
No camera data ......
HOWEVER
3) If we reset using the ROBOT RESET button on the OI, or if we open and close the main breaker (power-down/power-up), the camera initializes perfectly fine.
We're wondering if anyone else is having this issue, or if this is an isolated problem that just we are having.
Thanks in advance!
Bharat Nain
13-01-2007, 14:19
Are you sure your backup battery is charged?
From Kevin's website:
Q15: We're sure we've got the camera hooked-up correctly, but it doesn't do anything. What do we do?
A15: Enable debugging messages in the camera code by following the embedded instructions in camera.h and run the camera code. If you don't get any debugging information sent to your terminal screen when the code executes, there is a problem with your robot controller or the USB to RS232 converter you may have used to load the code into the robot controller. Call the InnovationFIRST support line at (903) 453-0802. If you get a message that says "Camera: Initialized abnormally with code 131", this means that the serial communications link to the camera isn't working properly. In this case, download the serial port diagnostics software from http://kevin.org/frc and follow the included instructions.Also, what happens when you just power cycle the camera?
Good luck,
Robinson
Power cycling just the camera when initialization fails does not help.
We performed the documented diagnostics on the TTL serial port and the TTL to RS-232 converter board, via the loopback jumpers on both and the DDT, and they both passed.
I'm wondering if the serial port receive interrupt handlers aren't properly reinitialized when the RC's RESET button is pressed, but are reinitialized fine when the entire RC is power cycled, or the OI ROBOT RESET button is pressed.
I'm thinking this might be, because we built a 3-pin camera serial to DB-9 cable, and were able to view the commands being sent to the camera when initialization failed. We saw that the "CR" command for STATE #3 was indeed being sent by the RC properly. Either the camera wasn't ACKing it, or the RC wasn't picking up the ACK.
I THINK the camera was ACKing the "CR" commands, because when I connected to the camera directly with a laptop (immediately after initialization from the RC failed), and issued equivalent "CR" commands from the laptop, the camera ACKed them just fine.
Still just trying to find out if this is an isolated incident though. And right now, it looks like it is. :o
Krunal,
Check out this post by Dave Flowerday:
http://www.chiefdelphi.com/forums/showthread.php?p=483512&highlight=error+131#post483512
Based on his description, this sounds like the exact problem we're running in to.
JBotAlan
14-01-2007, 00:20
Still just trying to find out if this is an isolated incident though. And right now, it looks like it is. :o
Don't be so sure. I'm seeing some "weirdness" with the CMUcam, too. Power cycle the camera, the RC, the camera, the RC again, plug the camera into the computer to make sure it is communicating, plug it back into the robot, error 131--that's as far as I've gotten, but I haven't really tried yet. I actually have a 3-pin to db9 sitting in the drawer, so I guess I should get it out and test before 5th week.....nah!
JBot
Keith Watson
15-01-2007, 00:13
The camera reset problem we had last year was, any type of reset worked fine in the lab, but when connected to the competition port at the regional the camera would not initialize with turning the robot power on. So our autonomous mode failed every time.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.