Go to Post RoboRIO brownout (v, n): The GDC's alternative to limiting the number of motors allowed on a robot. - GeeTwo [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-01-2006, 20:17
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Question Finding range

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   Spotlight this post!  
Unread 10-01-2006, 20:24
phrontist's Avatar
phrontist phrontist is offline
Proto-Engineer
AKA: Bjorn Westergard
FRC #1418 (Vae Victus)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Falls Church, VA
Posts: 828
phrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond repute
Send a message via AIM to phrontist
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.
__________________

University of Kentucky - Radio Free Lexington

"I would rather have a really big success or a really spectacular crash and failure then live out the warm eventual death of mediocrity" - Dean Kamen
  #3   Spotlight this post!  
Unread 10-01-2006, 20:30
Andrew Blair's Avatar
Andrew Blair Andrew Blair is offline
SAE Formula is FIRST with Gasoline.
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry
Posts: 1,193
Andrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond repute
Send a message via AIM to Andrew Blair Send a message via Yahoo to Andrew Blair
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...
__________________
Reading makes a full man, conference a ready man, and writing an exact man.
-Sir Francis Bacon

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
-Albert Einstein

Last edited by Andrew Blair : 10-01-2006 at 21:19.
  #4   Spotlight this post!  
Unread 10-01-2006, 20:32
Rick TYler Rick TYler is offline
A VEX GUy WIth A STicky SHift KEy
VRC #0010 (Exothermic Robotics)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Redmond, Washington
Posts: 2,000
Rick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond repute
Re: Finding range

Quote:
Originally Posted by dhoizner
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?
I think you are asking, "can this problem be attributed to the small change in angle between the last two measurements," right? If so, I think you are spot on. The farther away you get, the smaller the measured angle differences. I think you found the camera systems cutoff between meaningful angle distances and the noise level.

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.
__________________
Exothermic Robotics Club, Venturing Crew 2036
VRC 10A, 10B, 10D, 10Q, 10V, 10X, 10Z, and 575
  #5   Spotlight this post!  
Unread 10-01-2006, 20:39
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
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   Spotlight this post!  
Unread 10-01-2006, 21:05
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
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   Spotlight this post!  
Unread 10-01-2006, 21:17
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
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   Spotlight this post!  
Unread 10-01-2006, 21:20
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Finding range

Quote:
Originally Posted by KenWittlief
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.
It wasn't off by 1.5 ft constantly, it was wavering, fluctuating between 133 and 151.
__________________
  #9   Spotlight this post!  
Unread 10-01-2006, 22:12
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Finding range

Quote:
Originally Posted by dhoizner
Duee to height constraints and mounting problems, we are limited to a height difference between the target and the camera of 7 inches...

...Can this problem be attributed to the smallness of the height difference?
Yes, you're going to want to mount the camera as low as possible. As Ken pointed out, mounting the camera at the same height as the light will mean that the tilt angle will never need to change, which will prevent you from determining the distance. As the angular values I included in terminal.c are for the prototype pan/tilt mechanism I used, you should verify these values to wring-out the maximum accuracy from your particular pan/tilt mechanism.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 10-01-2006, 22:20
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,188
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
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   Spotlight this post!  
Unread 10-01-2006, 22:30
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Finding range

Quote:
Originally Posted by Kevin Watson
Yes, you're going to want to mount the camera as low as possible. As Ken pointed out, mounting the camera at the same height as the light will mean that the tilt angle will never need to change, which will prevent you from determining the distance. As the angular values I included in terminal.c are for the prototype pan/tilt mechanism I used, you should verify these values to wring-out the maximum accuracy from your particular pan/tilt mechanism.

-Kevin
Kevin, is there a fixed ratio of pwm value to degrees? (In tracking.h it is 2 pwm values for 1 degree, i think)
__________________
  #12   Spotlight this post!  
Unread 10-01-2006, 22:58
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Finding range

Quote:
Originally Posted by dhoizner
Kevin, is there a fixed ratio of pwm value to degrees? (In tracking.h it is 2 pwm values for 1 degree, i think)
I wish I could say I used some kind of crazy NASA pico arcsecond-resolution measurement gizmo to calibrate the angular values I plugged into terminal.c. To be honest, at about 8:30 PM the night before the kick-off (last Friday), I finished the code and did a half-arsed calibration using my eight-year-old son's cheezy protractor. Using the equation found in terminal.c, I would do another calibration <grin>.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
Closed Thread


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


All times are GMT -5. The time now is 14:50.

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