Go to Post Who knew a single variable could be so deadly? - 3DWolf [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 27-12-2010, 16:37
SnarkyNinja's Avatar
SnarkyNinja SnarkyNinja is offline
PET Shop Boys
AKA: Matt Duszynski
FRC #1477 (Texas Torque)
Team Role: College Student
 
Join Date: Feb 2010
Rookie Year: 2010
Location: The Woodlands, TX
Posts: 1
SnarkyNinja is an unknown quantity at this point
C++ Vision Camera Problems

Hey there, programming geniuses at Chief Delphi!

We're having a bit of trouble with our vision camera, and I'm hoping you can help. To summarize, when we try to use the camera, our robot completely crashes. This problem came out of nowhere one day; the camera went from working perfectly to not working at all, and there were no changes to the robot or the code in the meantime. I've attached all the errors and messages associated with the problem.

This happens when the camera is plugged in to the cRIO and the code tries to create a camera object. We get one or two frames of video, then robot communication dies on the driver station. If either the camera is unplugged, or the code doesn't try to start the camera, there are no other problems. It happens with our team code, and the unmodified 2010 Vision Example code. We have all the latest updates applied to WPILib/WindRiver (C++ Team Update 4.3/Workbench Version: 3.0.1) and the driver station (update 1.1), and the latest version of the cRIO image (v20).

We've tried: different cRIOs, different programming laptops, reinstalling WindRiver, reimaging the cRIO, reinstalling the driver station, restoring camera to factory settings (we put the FRC/FRC user account back on afterwards), and deploying code that creates the camera object only. The one thing we haven't tried is using a different camera, as we don't have another one available.

The camera works properly (if laggy) in both LabView and Java. It also is fully accessible and streams properly from the web interface. It's only when we use C++ that this problem occurs. From the cRIO console, the camera is pingable at 192.168.0.90. We're using the newer Axis M1011 camera. Any ideas?
Attached Thumbnails
Click image for larger version

Name:	error1.PNG
Views:	129
Size:	98.6 KB
ID:	9539  Click image for larger version

Name:	error2.PNG
Views:	66
Size:	36.6 KB
ID:	9540  Click image for larger version

Name:	error3.PNG
Views:	76
Size:	46.8 KB
ID:	9541  Click image for larger version

Name:	error4.PNG
Views:	79
Size:	36.0 KB
ID:	9542  Click image for larger version

Name:	error5.PNG
Views:	63
Size:	75.6 KB
ID:	9543  


Last edited by SnarkyNinja : 27-12-2010 at 16:51.
Reply With Quote
  #2   Spotlight this post!  
Unread 28-12-2010, 00:39
davidalln's Avatar
davidalln davidalln is offline
World's Worst Coder
AKA: David Allen
FRC #2415 (The Westminster Wiredcats)
Team Role: Programmer
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Atlanta, GA
Posts: 108
davidalln is on a distinguished road
Send a message via AIM to davidalln
Re: C++ Vision Camera Problems

I'm not sure if this helps you, but we got the same error (S_errno_ETIMEDOUT) whenever our camera was correctly plugged in and then somehow unplugged (such as violent turbulence from the robot causing the cord to become unplugged, as I unfortunately learned during a match at championships). From my understanding, the code is initializing the camera correctly but is unable to read any images coming from it. For whatever reason, WPIlib doesn't appear to have any exception handling if the camera doesn't return anything and causes the code to crash.

If I had to point to any potential problem, the new Axis camera might not be compatible with the C++ library. This is just speculation.
__________________
SANTOSH ANDREW DECKER RICK WYNNIE SEAN DEREK MATT
(alamo (semis), p'tree (CHAMPS!), nc (CHAMPS!), newton (quarters))


Best four years of my life. Thanks to everyone who made it happen.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-01-2011, 02:40
PatrickS's Avatar
PatrickS PatrickS is offline
I get my code from /dev/null
FRC #1742 (Shockwave)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Oklahoma City
Posts: 21
PatrickS is an unknown quantity at this point
Re: C++ Vision Camera Problems

It may actually be an incomparability with the new camera. The errors you are receiving seem memory allocation errors. The only strange circumstance is that this issue randomly started occurring. Can you post any more debugging information?
Reply With Quote
  #4   Spotlight this post!  
Unread 10-01-2011, 12:25
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: C++ Vision Camera Problems

There's a Camera Configuration document linked from the Kit of Parts web page. Is the camera properly set up with the correct users? I don't have the code handy to look at, but it's possible that the LabVIEW and Java libraries are trying a name/password combination that the C++ library isn't.
Reply With Quote
  #5   Spotlight this post!  
Unread 11-01-2011, 02:58
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: C++ Vision Camera Problems

Quote:
Originally Posted by SnarkyNinja View Post
Hey there, programming geniuses at Chief Delphi!

We're having a bit of trouble with our vision camera, and I'm hoping you can help. To summarize, when we try to use the camera, our robot completely crashes. This problem came out of nowhere one day; the camera went from working perfectly to not working at all, and there were no changes to the robot or the code in the meantime. I've attached all the errors and messages associated with the problem.

This happens when the camera is plugged in to the cRIO and the code tries to create a camera object. We get one or two frames of video, then robot communication dies on the driver station. If either the camera is unplugged, or the code doesn't try to start the camera, there are no other problems. It happens with our team code, and the unmodified 2010 Vision Example code. We have all the latest updates applied to WPILib/WindRiver (C++ Team Update 4.3/Workbench Version: 3.0.1) and the driver station (update 1.1), and the latest version of the cRIO image (v20).

We've tried: different cRIOs, different programming laptops, reinstalling WindRiver, reimaging the cRIO, reinstalling the driver station, restoring camera to factory settings (we put the FRC/FRC user account back on afterwards), and deploying code that creates the camera object only. The one thing we haven't tried is using a different camera, as we don't have another one available.

The camera works properly (if laggy) in both LabView and Java. It also is fully accessible and streams properly from the web interface. It's only when we use C++ that this problem occurs. From the cRIO console, the camera is pingable at 192.168.0.90. We're using the newer Axis M1011 camera. Any ideas?
Can you try again with the released 2011 source? I guessing that it will still fail. Even if you get those errors accessing the camera (S_errno_ETIMEDOUT or S_errno_ECONNREFUSED), you should not crash your program. My guess is that there are at least 2 bugs here... the one that makes it not work here when it works in Java and LabVIEW, and the one where it crashed with a data access violation when the first condition is true.

-Joe
Reply With Quote
  #6   Spotlight this post!  
Unread 13-01-2011, 13:36
masoug's Avatar
masoug masoug is offline
Food Consumer
FRC #0114
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Planet Earth
Posts: 78
masoug is an unknown quantity at this point
Re: C++ Vision Camera Problems

Seems like socket problems to me...
__________________

JabbaScript
Reply With Quote
  #7   Spotlight this post!  
Unread 14-01-2011, 20:36
James Tonthat James Tonthat is offline
Registered User
FRC #0148 (Robowranglers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Greenville, TX
Posts: 303
James Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond reputeJames Tonthat has a reputation beyond repute
Re: C++ Vision Camera Problems

(I'm not the programming mentor so I'm not fully informed.)

We made a new electronics board with different cRio we had, and had installed 2011 and the newest versions of everything (including the DS update) on a laptop with a fresh install of Windows 7 and we received the same errors.

I'll see if the errors are different than the ones we had gotten with the 2010 software.

Thanks for the input, we'll try some different things and document it at tomorrow's meeting and post back on Chief.

Edit: Could you elaborate on the 'socket problem' comment? Thanks.
__________________
James Tonthat

Mechanical Engineer, RackSolutions, a subsidiary of Innovation First International

Lead Engineer - Texas Torque - 2009-2014
Mentor - Robowranglers - 2015-
Reply With Quote
  #8   Spotlight this post!  
Unread 15-01-2011, 00:42
masoug's Avatar
masoug masoug is offline
Food Consumer
FRC #0114
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Planet Earth
Posts: 78
masoug is an unknown quantity at this point
Re: C++ Vision Camera Problems

When Joe referred to the "S_errno_ETIMEDOUT or S_errno_ECONNREFUSED" errors this means that the socket cannot connect successfully and transfer data safely. The TIMEOUT error means that there is contact with the server, BUT the server is not responding to the client. CONNREFUSED means that the server actively rejected the request from the client. So my suspicions may be the misconfiguration of the camera OR that the current camera code does not handle the camera instance properly. Did other teams get their camera to run successfully under the same conditions?
__________________

JabbaScript
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
2010 Camera and vision problems. s133p Programming 76 08-02-2010 21:35
Vision problems and FIRST members ebmonon36 Chit-Chat 10 21-01-2006 22:43
vision camera Adama Programming 3 19-01-2006 17:12
71's Vision Tracking Problems Bill Beatty Rumor Mill 7 19-04-2005 17:41
CMUCam2 Vision Sensor Testing/Problems cbolin Programming 18 02-02-2005 18:03


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

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