Go to Post What language does your programming mentor have the most experience with? That's the language you should use. - Rosiebotboss [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 20-03-2012, 08:19
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,754
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: Target Tracking PID Lag

The camera is a slow sensor, 30Hz tops, and depending on the exposure time, compression time, transmission time, decompression time, and processing time, tends to have quite a bit of lag. To get an idea of what it is, the most clever test I've seen (not mine), displays a high resolution clock on the computer screen and the camera image next to it. The camera is pointed at the screen so that you can see the clock, the computer reads the image and displays it next to the clock -- but lagged, and at any point you can do a screen capture to see how the clock and image of the clock differ. The clock can be a LV numeric with a loop updating the current time or the milliseconds primitive value.

To measure on the cRIO, I've usually used an LED, like the user LED on the cRIO. I setup the camera to stare at the LED, then the code starts with it off and at t0 turns it on. When a camera frame shows the LED on, that is t1. Do this a number of times with intentional jitter to avoid the aliasing of when the camera takes its exposure, and you can calculate an average and deviation given the camera and other elements. My expectation is that the 206 and M1011 are pretty similar lag if using MJPG. I saw the 206 being faster if requesting successive jpegs. The compression rate doesn't have much to do with the lag (it is assisted by HW), except that the cRIO memory manager takes longer to allocate or resize blocks above 16KB. The M1011 allows for more elaborate specification, I think it allows for fixed size streaming, but WPILib doesn't expose this.

So, clearly this is doable, but you need to pay attention to the details. To give ballpark numbers, I measured this in 09 on the 206 and cRIO and got about 60ms at the small and medium image size -- if I remember correctly. This included decoding, but minimal analysis. If you measure your analysis times, you should be able to add 60ms and get an idea of the lag.

Another comment, fps impacts how often an acquisition takes place but doesn't impact the lag of a particular acquisition.

Greg McKaskle
Reply With Quote
 


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 22:12.

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