Go to Post Our "gracious professionalism" credo insists that we make decisions that are based solely on the desire to inspire and recognize science and technology using robot construction and competition as a vehicle. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 23-01-2009, 20:17
tekman1001 tekman1001 is offline
Registered User
FRC #2342
 
Join Date: Jan 2009
Location: New Hampshire
Posts: 11
tekman1001 is an unknown quantity at this point
Distance Calculation in Workbench

Hi I was wondering if anyone had figured out how to do distance calculation using the axis camera in workbench. Any help would be appreciated. We were thinking of using angles to find the distance to the flag.

Last edited by tekman1001 : 23-01-2009 at 20:19.
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2009, 20:54
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Distance Calculation in Workbench

verticalServo->GetAngle() gets you the angle, then use some trig
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2009, 21:02
tekman1001 tekman1001 is offline
Registered User
FRC #2342
 
Join Date: Jan 2009
Location: New Hampshire
Posts: 11
tekman1001 is an unknown quantity at this point
Re: Distance Calculation in Workbench

Sorry I should have been more specific we are hard mounting the camera is there anyway to get the vertical angle from the center of the image to the flag but thanks.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-01-2009, 22:58
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Distance Calculation in Workbench

Well with just the camera you can tell what point the target is at, and you can tell how big it appears. You know how big it should be and how high it should be. So compare the two. I am looking over this as well and it will probably be pathagerian therom like this:

(height)^2 * X^2 = (actual distance)^2

where height is the height in the picture compared to the actual trailer height and actual distance is a comparison between the size of the target and the apparent size of the target.

I think this is correct, but I am still thinking it over and working on it myself, I hope this helps you.
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2009, 09:16
Kruuzr Kruuzr is offline
Mentor - electrical, software
AKA: Steve Cote
FRC #1922 (Ozram)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Henniker, NH
Posts: 33
Kruuzr has a spectacular aura aboutKruuzr has a spectacular aura about
Re: Distance Calculation in Workbench

One method that does not rely on the size of the blobs is to calibrate your robot so that it knows the distance using the y-offset of the target. The closer you are, the higher the blobs are in the image. You need to be consistent as to which color data you are getting the info from (such as always the bottom one). We will be calibrating ours by setting out a tape measure and moving the target trailer right next to the robot. Record the y-offset. Move the target 3-4 inches (whatever resolution you want) and record the y-offset again. Keep going until you have the makings of a look-up table. Our tests at about 10 feet gave us 2-3 inch distance resolution.

Steve C
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Obscure Wind River Workbench Problem {td} C/C++ 16 21-01-2010 10:11
Teams happy with Wind River Workbench? gvarndell C/C++ 59 28-07-2009 21:13
Issue on using Windriver Workbench in Eclipse CBuckhaults C/C++ 3 24-01-2009 13:41
Workbench is not working. Need help Please electrowave89 Technical Discussion 5 19-01-2009 10:58
Windriver Workbench Demo Videos neutrino15 Programming 8 27-11-2008 00:06


All times are GMT -5. The time now is 02:29.

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