|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|
#2
|
|||||
|
|||||
|
Re: Calculating Camera Distance
Kevin Watson has an idea, why not try here
http://kevin.org/frc/2007_frc_range_calc.pdf |
|
#3
|
|||
|
|||
|
Re: Calculating Camera Distance
we have that already and it is still not working
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||||
|
|||||
|
Re: Calculating Camera Distance
Make sure when you are printf'ing you cast the data as an unsigned int.
|
|
#6
|
||||
|
||||
|
Re: Calculating Camera Distance
Where in the code is the angle defined?
|
|
#7
|
||||
|
||||
|
Re: Calculating Camera Distance
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calculating distance | sur2124 | Programming | 10 | 15-03-2006 18:36 |
| How do I get distance between Camera and the target? | sjung9442 | Programming | 5 | 27-01-2006 09:44 |
| Camera Tracking Maximum Distance | MikeDubreuil | Programming | 0 | 18-01-2006 10:18 |