Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Camera Initialization Lags robot (http://www.chiefdelphi.com/forums/showthread.php?t=83396)

Bart 22-02-2010 15:49

Camera Initialization Lags robot
 
Hi,

Whenever I try to initialize the camera using:
AxisCamera &axisCam = AxisCamera::GetInstance();

The robot starts to lag (The watchdog dies even with a 500ms timeout), and worst of all, the robot STILL does not send video to the dashboard

Yes we have the latest dashboard, crossover cable, camera set up properly. Any suggestions?

Zme 22-02-2010 16:26

Re: Camera Initialization Lags robot
 
did you give the camera time to boot up fully before trying to use it in your code? if not it can hang the robot really easily, try adding a few waits before and after it

Laaba 80 22-02-2010 16:54

Re: Camera Initialization Lags robot
 
Where are you putting that in the code? I have it in Robot Init and it does not seem to slow anything down, and I get video. I have also noticed that the camera delays more with a low battery, so be sure to keep batteries fresh.

mikets 22-02-2010 18:16

Re: Camera Initialization Lags robot
 
One thing we found about the camera is that if you don't have communication with it, the GetInstance will take some time then timed out. The cause for us was that we used a wrong ethernet cable. You need a cross-over cable for the camera. We knew about the cross over cable requirement but we didn't realize the cable we grabbed wasn't cross-over. So make sure you label your cable correctly if you make your own.

Bart 22-02-2010 21:32

Re: Camera Initialization Lags robot
 
Got it working, I changed the following:
Put camera init code in teleop, that way it waits a bit before starting, and I changed the camera subnet mask to 255.0.0.0

Radical Pi 24-02-2010 00:04

Re: Camera Initialization Lags robot
 
yeah, if the camera code hasn't finished we found the same issuse of timeouts and other bad things happening to the robot (took a whole 1.5 hours of our testing time to figure out it was the camera :( ). The problem seems to be WPILib's internal handling of errors and their lack of a limiter on number of errors per second. It looks like the I/O gets overwhelmed and code slows down


All times are GMT -5. The time now is 13:05.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi