Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Calculating Camera Distance (http://www.chiefdelphi.com/forums/showthread.php?t=53387)

Inoperational 03-02-2007 17:16

Calculating Camera Distance
 
We have the camera set up on our robot, but we are having some very annoying problems. When we hook up our laptop to the rc, it shows the distance being anywhere between -30 to 67000. If anyone has any idea on the equation for calculating distance from the camera to the green cathodes, please post here. Thanks

Branden Ghena 03-02-2007 17:36

Re: Calculating Camera Distance
 
Kevin Watson has an idea, why not try here
http://kevin.org/frc/2007_frc_range_calc.pdf

Inoperational 03-02-2007 18:04

Re: Calculating Camera Distance
 
we have that already and it is still not working

Skysong 03-02-2007 18:39

Re: Calculating Camera Distance
 
Are you able to get different tilt angles when you move the robot manually towards the light? We did that as an initial test and had the robot stop when it was ten feet away from the light.

Are you using Kevin's default camera code? That seemed to work fine for us.

Mike 03-02-2007 18:48

Re: Calculating Camera Distance
 
Make sure when you are printf'ing you cast the data as an unsigned int.

The yellowdart 03-02-2007 18:57

Re: Calculating Camera Distance
 
Where in the code is the angle defined?

JohnC 04-02-2007 23:48

Re: Calculating Camera Distance
 
Quote:

Originally Posted by The yellowdart (Post 571086)
Where in the code is the angle defined?

Look in terminal.c at the printf()s that print information when the camera has found a target. If you #include the camera header files, you can use the same information that is printed regarding the tilt angle. Just copy all of the math and assign it to a variable in your code.


All times are GMT -5. The time now is 04:15.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi