Go to Post I thought we agreed to just put up a teaser, not a picture of the robot! - IBdrummer [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   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,752
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
  #2   Spotlight this post!  
Unread 20-03-2012, 22:58
androb4's Avatar
androb4 androb4 is offline
..is trying to take this year off.
AKA: Andrew A.
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2003
Location: Houston, TX
Posts: 220
androb4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to behold
Re: Target Tracking PID Lag

If I DO, measure the lag. How would I program it to compensate it??

Also I have heard that you can measure the angle from target to center of the camera using: xPosition*(FOD/2). I have tried this but the camera is always updating the xPos. How can I 'store' the xPos so I can get ONE angle out of that and put it in our gyro PID?

Edit: Oops. I heard that here
__________________
FRC 441 Mentor 2012-2015
FRC 441 Alumni 2009-2012
FTC 4673 Alumni 2011-2012
FRC 1484 Alumni 2006-2008

Reply With Quote
  #3   Spotlight this post!  
Unread 21-03-2012, 17:10
androb4's Avatar
androb4 androb4 is offline
..is trying to take this year off.
AKA: Andrew A.
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2003
Location: Houston, TX
Posts: 220
androb4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to behold
Re: Target Tracking PID Lag

Any help???
__________________
FRC 441 Mentor 2012-2015
FRC 441 Alumni 2009-2012
FTC 4673 Alumni 2011-2012
FRC 1484 Alumni 2006-2008

Reply With Quote
  #4   Spotlight this post!  
Unread 21-03-2012, 20:28
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Target Tracking PID Lag

Quote:
Originally Posted by androb4 View Post
Any help???
See this thread: http://www.chiefdelphi.com/forums/sh...d.php?t=104327
__________________
-
An ounce of perception is worth a pound of obscure.
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 22:07.

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