Go to Post I think applying Gracious Professionalism to strictly legal game play trivializes what is a much more important and fundamental FIRST concept. - jimfortytwo [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 25-01-2012, 14:55
fsgond's Avatar
fsgond fsgond is offline
Why aren't you throwing balls?!
AKA: Anthony
FRC #5484 (Memento Vitam)
Team Role: Coach
 
Join Date: Oct 2007
Rookie Year: 2007
Location: South Bend
Posts: 106
fsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant futurefsgond has a brilliant future
Post Camera Lag Problems

Our programming team is having problems with camera lag. When we go direct to the camera webpage we can see the stream in real time (or close). When we are running it through the cRio, the video is 3-5 seconds behind. We have stripped the code down to nothing accept what is needed to get the video and put it on the dashboard and are still having the issues. Does anyone have any insight into what we can change in order to fix this issue. We are using Labview, using the provided examples and figure we must be missing something.


Any help would be appreciated.
__________________
Anthony Rubio
Co-Coach, Memento Vitam Team 5484, 2015-????
Mentor, Black Knights Team 135, 2009-2015
Student, Black Knights Team 135, 2007-2008
  #2   Spotlight this post!  
Unread 25-01-2012, 15:18
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Camera Lag Problems

To view the video stream on the Dashboard, don't put it through the cRIO first. Put it on the DLink @ 10.xx.yy.11.

Both the Dashboard and the cRIO can independently each open their own camera streams and get great response.
If either system doesn't need it then it doesn't have to use it.

The default code is setup to use the camera this way.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 25-01-2012, 15:35
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,751
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 Problems

As Mark said, the recommended setup should work much better.

I'll also explain why this lag happens. If you have the camera or any other TCP device start pumping out data faster than the other end is consuming it, you will see data collect in the TCP buffers. If you configure the camera to produce 30 fps and the PC reads at 29 fps, then each second, another frame if video collects in the buffer, making the PC lag another image behind. After 30 seconds, the PC is now 1 full second lagging behind (provided the buffers are that large). If you slow the PC to reading at 20fps, then 10 frames collect per second, and in 3 seconds you are one second lagged.

It turns out that the TCP buffers on the camera and PC will typically hold several seconds of images, meaning that you will see your video streams several seconds lagged with occasional jumps to catch up a bit.

One solution, is to slow down the camera or speed up the PC so that the buffer is kept relatively empty. And as Mark mentioned, the dashboard and other pieces now default to a more efficient configuration now that the robot contains an enet switch.

Greg McKaskle
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


All times are GMT -5. The time now is 23:36.

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