|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
After getting the camera mounted and tracking, we are working on calculating range. I used the algorithm that Kevin posted, (Target height - camera height)/tan(tilt angle), substituting the formula for tilt angle in terminal.c.
Duee to height constraints and mounting problems, we are limited to a height difference between the target and the camera of 7 inches. Up to a distance of 200 inches, the algorithm provides sensible data, but one step farther and the distance jumps to 400 inches. Can this problem be attributed to the smallness of the height difference? Thank you, |
|
#2
|
|||||
|
|||||
|
Re: Finding range
How are you calculating tan?
Another thing to note... you should calculate your position relative to the light. You still need some sort of fourmula to turn that position into a tilt or speed or whatever variables you are controlling. |
|
#3
|
|||||
|
|||||
|
Re: Finding range
I have an idea of what might be happening to you, but I can't really put it into words. If you could, tape the target to the wall at whatever height you can (higher is better, up to the actual hieght of the target), and then move the camera accordingly, closer and farther. You may not get the giant jump you talked about. Maybe...
[EDIT] Did you mean 7 feet, not inches? The values at seventeen feet looking at something 7" above it would be indiscernable for calculating range... Last edited by Andrew Blair : 10-01-2006 at 21:19. |
|
#4
|
|||
|
|||
|
Re: Finding range
Quote:
Hey, 200 inches is nearly 17 feet. How many teams realistically expect to score from farther away than that? Kareem Abdul-Jabbar scored 38,387 points in the NBA. Three of those points came on 3-pointers. In the ten years the 3-point play was legal during his tenure in the NBA, Abdul-Jabbar attempted 18 3-pointers and only sank 1. He is one of the greatest players ever, and is in the Hall of Fame. I think the teams trying to shoot from outside the paint (to continue abusing basketball metaphors) aren't going to score very often. |
|
#5
|
||||
|
||||
|
Re: Finding range
to get the highest degree of precision you want to use the full range of the camera system, so that at the furthests distance the reading is at one end of its range, and at the closest distance its at the other end.
I want to say the camera should be mounted near the floor, to get the greatest change in angle between close and far, but I dont know all the details of how the camera works but look at it this way, if you mount the camera at the same height as the light, you wont be able to measure distance at all, right? if you cant put the camera lower, maybe you can put a mirror lower on your bot, and point the camera at the mirror, so it sees the light through the mirror? |
|
#6
|
|||||
|
|||||
|
Re: Finding range
It was reasonably accurate up to ~133 (Where it was about 1.5 feet off) inches, not 200 as I previously (mistakenly) stated. And yes im sure it is inches.
Is there any observable problem with the algorithm? With regards to the calculation of tangent, I am using a lookup table with values for angles between 1 degree and 90 degrees. I'm going to try to get the target mounted higher up, but due to the fact that disregarding the gym, all our rooms have 7-8 ft high ceilings, it is going to be pretty hard. Thanks for the help, |
|
#7
|
||||
|
||||
|
Re: Finding range
remember the camera is digital inside. The vertical resolution is measured in pixels, so at some distance you are down to one pixel change.
1.5 feet can be pretty far, if your shots fall 1.5 feet short of the goal. |
|
#8
|
|||||
|
|||||
|
Re: Finding range
Quote:
|
|
#9
|
||||
|
||||
|
Re: Finding range
Quote:
-Kevin |
|
#10
|
|||
|
|||
|
Re: Finding range
I haven't looked over the new camera stuff, but couldn't you look at the bounding box and the X,Y components of the centroid? We didnt use a tilt servo last year, but were able to stop the bot consistently at a fixed distance away from the target by looking at the Y value of the centroid.
|
|
#11
|
|||||
|
|||||
|
Re: Finding range
Quote:
|
|
#12
|
||||
|
||||
|
Re: Finding range
Quote:
-Kevin |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with finding team info | Logan Byers | Scouting | 9 | 03-03-2005 08:40 |
| Camera Range Finding | russell | Programming | 9 | 31-01-2005 19:54 |
| finding grants/funding | Redneck | Fundraising | 4 | 21-10-2004 11:17 |
| Finding new teams | Kit Gerhart | Finding A Team | 8 | 13-04-2004 12:05 |
| Optical range sensor | Ben Mitchell | Technical Discussion | 9 | 12-01-2002 00:11 |