|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
Re: Distance Calculation in Workbench
verticalServo->GetAngle() gets you the angle, then use some trig
|
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
||||
|
||||
|
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. |
|
#5
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |