Go to Post My first reaction was "Where am I am gonna find pool noodles AND inner tubes in the middle of winter in Michigan?" - KTorak [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 26-11-2016, 11:27
wilsonb wilsonb is offline
Registered User
FRC #0694
 
Join Date: Nov 2016
Location: New York City
Posts: 2
wilsonb is an unknown quantity at this point
Unhappy roboRio arbitrarily stops connecting to LifeCam, though Windows still can

We used a LifeCam HD-3000 (connected to a roboRio USB port) for a few weeks, and then seemingly out of nowhere, the roboRio was no longer able to connect to (get images from) the LifeCam. We replaced it with a new LifeCam, and it worked again for a while.

This whole sequence repeated itself three times, with three LifeCams. All the LifeCams can still be used from a PC, so we're pretty certain that we weren't just damaging our LifeCams.

Has anyone else had this problem? Any idea how to fix it? Thanks for any help.

Extra info: after a LifeCam stops being able to connect, the little blue light on the LifeCam turns on momentarily at startup and then goes off. The normal, working behavior is that the light remains on whenever the robot is on.

We are using an OpenCV VideoCapture (in Java) to connect to the camera.
Reply With Quote
  #2   Spotlight this post!  
Unread 28-11-2016, 12:12
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: roboRio arbitrarily stops connecting to LifeCam, though Windows still can

What happens prior to you connecting the LifeCam? Are you powering up the robot? Are you restarting your code without power cycling?
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #3   Spotlight this post!  
Unread 28-11-2016, 12:35
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,544
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: roboRio arbitrarily stops connecting to LifeCam, though Windows still can

Is there anything interesting in dmesg?

Have you tried accessing the camera on the roboRIO through another method (ie WPILib's CameraServer, or LabVIEW)?
Reply With Quote
  #4   Spotlight this post!  
Unread 28-11-2016, 17:47
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,620
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: roboRio arbitrarily stops connecting to LifeCam, though Windows still can

I am not in a position to test this right now but:

When you plug in that webcam it should create a new device in /dev.
When it works take note of that device and when it doesn't see if you get a different device name in /dev or no device at all when the camera is plugged in.

Maybe a udev issue. Sometimes, for example, a default ethernet interface will move to eth1 from eth0.
Reply With Quote
  #5   Spotlight this post!  
Unread 28-11-2016, 20:04
BenBernard BenBernard is offline
Registered User
FRC #5687 (The Outliers)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Portland, ME
Posts: 39
BenBernard is an unknown quantity at this point
Re: roboRio arbitrarily stops connecting to LifeCam, though Windows still can

By any chance are you using a USB hub or extension cable between your Lifecam and the rio? We've had very bad luck with both.

As another diagnostic point, do they show up in the roborio webdashboard?

Lastly, the blue light on the lifecam turns on briefly and then off ANY time it's plugged into the rio...it turns on and stays on only when it is active.

We had similar behavior to what you describe on our rPi, when our (open-cv based) vision code was attempting to access the camera and failing due to a bad driver setting. To rule out opencv problems, try adding basic streaming code to your robotInit to see if that works.

In addition to ports switching (mentioned by another poster above) it's also possible that you are sending bad parameters to the openCV library. We ran into trouble with exposure and brightness settings--which are sometimes "remembered" by the lifecam and sometimes are not. A poster in another thread recommended resetting the lifecam using the windows utility, but I've never tried that.

Last edited by BenBernard : 28-11-2016 at 20:11.
Reply With Quote
  #6   Spotlight this post!  
Unread 30-11-2016, 19:57
wilsonb wilsonb is offline
Registered User
FRC #0694
 
Join Date: Nov 2016
Location: New York City
Posts: 2
wilsonb is an unknown quantity at this point
Re: roboRio arbitrarily stops connecting to LifeCam, though Windows still can

@adciv: We always tested with a power cycle in between, but it didn't change anything.

@Joe Ross and @techhelpbb those are both (trying to connect to the camera through something other than OpenCV, like WPILib; and checking /dev) good points, which I'll try as soon as I can.

@BenBernard, we're connecting the LifeCam's USB male directly to the roboRio. We haven't checked the web interface (admittedly that was quite an oversight). A while back, we ran into the problems you describe about the camera settings like exposure being reset. We resolved it by configuring the camera on startup with the v4l-ctl utility (in apt package libv4l-dev).

Oddly enough, the roboRio can see the camera now, without swapping the camera out for a new one. This suggests hardware issues to me, or possibly something with configuration of the camera (perhaps when plugging it into a laptop, the configuration reset and fixed something).
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


All times are GMT -5. The time now is 08:44.

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