Go to Post If I understand what you're saying, you don't understand very far. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-02-2010, 15:49
Bart Bart is offline
Registered User
FRC #2625
 
Join Date: Feb 2010
Location: Canada
Posts: 5
Bart is an unknown quantity at this point
Angry 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?
Reply With Quote
  #2   Spotlight this post!  
Unread 22-02-2010, 16:26
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
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
Reply With Quote
  #3   Spotlight this post!  
Unread 22-02-2010, 16:54
Laaba 80 Laaba 80 is offline
Registered User
AKA: Joey
FRC #1714 (MORE Robotics)
Team Role: Alumni
 
Join Date: Dec 2007
Rookie Year: 2001
Location: San Jose, CA
Posts: 495
Laaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond reputeLaaba 80 has a reputation beyond repute
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.
__________________
Driving Record - 75-43-8
Coaching Record - 92-65
Reply With Quote
  #4   Spotlight this post!  
Unread 22-02-2010, 18:16
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 671
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-02-2010, 21:32
Bart Bart is offline
Registered User
FRC #2625
 
Join Date: Feb 2010
Location: Canada
Posts: 5
Bart is an unknown quantity at this point
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
Reply With Quote
  #6   Spotlight this post!  
Unread 24-02-2010, 00:04
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
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
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Camera Declaration/Initialization scolbertrocks C/C++ 3 22-02-2010 07:26
ADC Initialization problem Shomron1690 Programming 4 14-02-2007 18:06
???Abnormal Camera Initialization???????????? cdennisxlx2 Programming 4 07-11-2006 00:45
Reciever Initialization problem PuiChi Programming 1 26-01-2004 23:54
Master uP Initialization Routine Ulibrium Technical Discussion 5 24-01-2002 16:43


All times are GMT -5. The time now is 03:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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