Go to Post Our behavior – both good and bad – is contagious. Set a good example, behave in a mature, reasoned, professional manner and we will find that others around us will too. - dlavery [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 31-01-2010, 17:44
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
Camera lag...again

As I mentioned in the other thread, Patrick (my programming partner) managed to fix the lag problem by running the drive station under the developer account using 320x240 resolution. That worked...for a day. Now the familiar half-second lag is back, even on 320x240.

Does anybody at all have an idea what's going on? I really don't want to abandon the camera.
  #2   Spotlight this post!  
Unread 31-01-2010, 20:49
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,753
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: Camera lag...again

I'm not sure which thread is which, but as I mentioned elsewhere, big lag of around five seconds is caused by the classmate not being able to keep up with the cRIO. Small lags, 0.5 seconds or so is probably not unreasonable and will depend on the image size.

Since you've started a new thread anyway, please summarize the issues, what you've altered, and how the symptoms changed.

Greg McKaskle
  #3   Spotlight this post!  
Unread 31-01-2010, 22:09
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: Camera lag...again

OK, here's a summary of the issues.

1) Lag started off as 5 seconds. Patrick set all camera settings to the best possible (highest resolution, 0 compression, etc) and the lag reduced to half a second.

2) We found out that, contrary to expectations, decreasing resolution and increasing compression both increased lag time.

3) We then switched to the developer account and found out that lag time on 640x480 was still half a second. Upon switching to 320x240 resolution, lag time decreased to virtually nil and, for the first time, we had a live feed that's actually live.

4) A day later, with no altering of camera settings, lag time increased to half a second again.
  #4   Spotlight this post!  
Unread 01-02-2010, 00:39
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,587
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: Camera lag...again

You might find this answer from the GDC helpful: http://forums.usfirst.org/showthread.php?t=14284
  #5   Spotlight this post!  
Unread 01-02-2010, 10:05
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 137
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
Re: Camera lag...again

I did some testing and didn't see any difference with lag between Developer and Driver accounts. For me, using LabVIEW, a compression of 5% helped. Beyond that didn't make much difference - except very high compression lost sight of the target. While checking loop rates I started out doing some averaging, but I also watch individual loop times. There were occasions when the individual times were obviously too fast (like 2 ms). We did a little poking around and found a timeout in the vision code that was set to 100ms. This means if we took longer, it would return anyway with empty data. The next time through the loop the data might be there after only another millisecond or two. This means for two loops, we really only got one set of vision data, but the timing seemed twice as fast (or at least faster) when averaging.

This doesn't affect actual performance much, but we will be fixing it in the near future. If you want to look at this, you can find it in Program Files\National Instruments\LabVIEW 8.6\vi.lib\Robotics Library\WPI\Camera\Send Images To PC.vi where the Wait for Raw Image String subVI has 100 wired to it.
  #6   Spotlight this post!  
Unread 02-02-2010, 13:09
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: Camera lag...again

Quote:
Originally Posted by Joe Ross View Post
You might find this answer from the GDC helpful: http://forums.usfirst.org/showthread.php?t=14284
Thank you. I'll be waiting for the update, then.
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
2010 FRC Camera Live Feed Lag ideasrule Programming 23 11-02-2010 02:33
Camera lag solution ringo115 Programming 11 31-01-2010 22:05
Camera Lag tutkows1 Java 1 27-01-2010 00:20
Camera Lag jmanela NI LabVIEW 6 25-12-2009 08:48
again, problems with the camera razer Programming 4 02-02-2007 11:50


All times are GMT -5. The time now is 21:30.

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