Go to Post I'm a zit. - Andy Baker [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-01-2010, 19:32
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
2010 FRC Camera Live Feed Lag

We managed to get the live feed working, the only problem being that it isn't live. At first, with the camera set to low resolution and a moderate amount of compression, there was around 5 seconds of lag (and a similar frame rate). Then Patrick logged into the camera, did something, and the lag magically became 0.5 s with a 2Hz frame rate. The following conversation ensued:

Me: What did you do?
Patrick: I changed it to all the best settings. (640x480, 0 compression, etc)
Me: And then it worked.
Patrick: Right.

We tried everything to try and reduce the lag to something acceptable. Decreasing resolution and increasing compression both increased lag time, while changing the exposure/white balance settings did nothing. We did install the Labview update, the DS update, and all of that. We did create a FRC/FRC account. We did image the cRIO with v19.

Help!
  #2   Spotlight this post!  
Unread 24-01-2010, 19:43
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,988
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: 2010 FRC Camera Live Feed Lag

Reducing compression reduces load on the processor.
Smaller frame size means less data to fit through that (relatively) tiny pipeline
Fewer frames per second also means less data. 2 Hz is 2 frames per second, 1/2 second lag is the best you can get at that frame rate.
__________________

I am N2IRZ - What's your callsign?
  #3   Spotlight this post!  
Unread 24-01-2010, 19:49
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
Re: 2010 FRC Camera Live Feed Lag

Quote:
Originally Posted by Don Rotolo View Post
Smaller frame size means less data to fit through that (relatively) tiny pipeline
I thought so too, but decreasing frame size increased lag time.

Quote:
Fewer frames per second also means less data. 2 Hz is 2 frames per second, 1/2 second lag is the best you can get at that frame rate.
I know that, but I want to both reduce lag and increase frame rate, not one or the other. (I didn't manually set the frame rate; I let the camera do that.)
  #4   Spotlight this post!  
Unread 24-01-2010, 22:24
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: 2010 FRC Camera Live Feed Lag

This is more lag that I'd expect. Can you describe how you are running the code and the DS? Can you describe the development tools?

Greg McKaskle
  #5   Spotlight this post!  
Unread 24-01-2010, 22:34
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
Re: 2010 FRC Camera Live Feed Lag

The DS is the Classmate, but tomorrow we'll try using another laptop as the DS and see how that works. As for development tools, we're using Java with Netbeans 6.8 on a separate laptop. I just press the "Run" button to run the code; as far as I know, that builds the project, deploys the code, reboots the cRIO, and listens for output from the cRIO.
  #6   Spotlight this post!  
Unread 24-01-2010, 22:38
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: 2010 FRC Camera Live Feed Lag

Try going to control panels, power options and set the laptop to "Always On". This will ensure the processor is running at 1.6GHz when plugged in. The factory pre-load has it set on Max Battery which causes reduced performance even when plugged in.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #7   Spotlight this post!  
Unread 24-01-2010, 23:16
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: 2010 FRC Camera Live Feed Lag

It seemed as though some teams were fast user switching and leaving both accounts logged on. That seemed to cause pretty big lags for vision.

Greg McKaskle
  #8   Spotlight this post!  
Unread 25-01-2010, 13:56
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
Re: 2010 FRC Camera Live Feed Lag

OK, here's what I just tried:

Setting battery options to "Always On".
Running the driver station software under the Developer account.
Running the software with the Dashboard selected.
Logging on to only one account at a time.
Using a laptop as the driver station.
Setting the camera's frame rate to 5 frames/sec.

None of the above had an appreciable effect on the lag. Help!
  #9   Spotlight this post!  
Unread 25-01-2010, 14:00
TheDominis TheDominis is offline
Registered User
FRC #2152
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Port Orange, Florida
Posts: 88
TheDominis has a spectacular aura aboutTheDominis has a spectacular aura about
Re: 2010 FRC Camera Live Feed Lag

Quote:
Originally Posted by ideasrule View Post
OK, here's what I just tried:

Setting battery options to "Always On".
Running the driver station software under the Developer account.
Running the software with the Dashboard selected.
Logging on to only one account at a time.
Using a laptop as the driver station.
Setting the camera's frame rate to 5 frames/sec.

None of the above had an appreciable effect on the lag. Help!
Increase FPS? I don't know what you mean by lag. You are only going to get a new image every 200ms at that speed....
  #10   Spotlight this post!  
Unread 25-01-2010, 14:59
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
Re: 2010 FRC Camera Live Feed Lag

The problem is that I'm NOT getting one frame every 200 ms. I'm getting one frame every 500 ms. If I were getting 5fps, I'd be happy.
  #11   Spotlight this post!  
Unread 25-01-2010, 18:29
Patrickwhite's Avatar
Patrickwhite Patrickwhite is offline
May the North be with you
FRC #0610 (The Coyotes)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Toronto
Posts: 88
Patrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of light
Re: 2010 FRC Camera Live Feed Lag

Well, we found *a* problem. We had been using the driver account on the ClassMate as the driver station, silly us, of course it's not designed for that exact purpose. When we logged off the driver account and switched to the developer account, the frame rate jumped up by a factor of ten or twenty (on 320x240 resolution), and the lag all but disappeared. What worries us now is we don't know whether this will be allowed at the competition (looked through the competition documents). Does anyone else have this problem and/or have a solution, or know if the Developer account will be allowed for use at the competition?
Closed Thread


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
Yet Another Axis Camera Live Feed Issue z2daj FRC Control System 2 24-01-2010 13:47
Live Feed with Axis Camera CHSboy Programming 6 24-03-2009 14:43
2009 - Live camera feed to drivers during a match? Travis Hoffman Rules/Strategy 23 21-01-2009 17:43
Getting Live Feed from Axis Camera in Windriver Inoperational C/C++ 8 15-01-2009 01:21
live feed? miop Programming 1 02-02-2008 21:24


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

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