Go to Post You are what this world needs: a hero kids of all ages and backgrounds can look up to. I am a better person today than before I met you, because of how you touched my life. I thank-you. - Paul Copioli [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 05-02-2004, 20:59
epsilon's Avatar
epsilon epsilon is offline
Registered User
#0103 (Cybersonics)
 
Join Date: Sep 2002
Location: Palisades High School
Posts: 6
epsilon is an unknown quantity at this point
Send a message via AIM to epsilon
triangulation

Hey, we were messing with the robot's autonomous sequence and using the IR Sensors on top of servos. When we went to program in the triangulation, we realized we couldnt see how to do it. We know the distance between the sensors, and each servos angle relative to the front of the robot. Also the field isnt going to move, so we know that there 24' between the IR sensors. From this we should be able to determine distance relative to the IR beacons (x and y) and relative angle to the line between the 2 beacons. If anyone could explain this out to us we would really appreciate it. Thanks
__________________
At any given moment we must be prepared to disregard all of previous theories in light of new evidence.
  #2   Spotlight this post!  
Unread 05-02-2004, 21:26
Random Dude Random Dude is offline
Oregon State Head FTA
AKA: Chris
no team (Oregon Robotics Tournament & Outreach Program)
 
Join Date: Aug 2002
Rookie Year: 1998
Location: Oregon
Posts: 142
Random Dude will become famous soon enoughRandom Dude will become famous soon enough
Re: triangulation

Quote:
Originally Posted by epsilon
Hey, we were messing with the robot's autonomous sequence and using the IR Sensors on top of servos. When we went to program in the triangulation, we realized we couldnt see how to do it. We know the distance between the sensors, and each servos angle relative to the front of the robot. Also the field isnt going to move, so we know that there 24' between the IR sensors. From this we should be able to determine distance relative to the IR beacons (x and y) and relative angle to the line between the 2 beacons. If anyone could explain this out to us we would really appreciate it. Thanks

Well, the simplest way to only use one beacon. You will then have a triangle with 2 known angles (the servos) and one known distance (distance bettween servos). Try figuring out the math that way. If you still need help i'll try and draw some things up to help you.
  #3   Spotlight this post!  
Unread 05-02-2004, 22:26
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: triangulation

basically, given the sensors you have, you can do one of the following:

1. home both trackers on one beacon, then triangulate to know the distance and angle to the sensor from the bot. Note - you do not actually know the position of the bot, only the relative position of the beacon.

2. home one tracker on each beacon, then try to get one beacon behind you while the other is in front. again, you do not know the exact location of the bot itself, only a relative position.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #4   Spotlight this post!  
Unread 05-02-2004, 22:33
KevinB's Avatar
KevinB KevinB is offline
Registered User
AKA: Alum
no team
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2001
Location: AL
Posts: 188
KevinB will become famous soon enoughKevinB will become famous soon enough
Send a message via ICQ to KevinB
Re: triangulation

Quote:
Originally Posted by epsilon
Hey, we were messing with the robot's autonomous sequence and using the IR Sensors on top of servos. When we went to program in the triangulation, we realized we couldnt see how to do it. We know the distance between the sensors, and each servos angle relative to the front of the robot. Also the field isnt going to move, so we know that there 24' between the IR sensors. From this we should be able to determine distance relative to the IR beacons (x and y) and relative angle to the line between the 2 beacons. If anyone could explain this out to us we would really appreciate it. Thanks
You cannot triangulate absolute position this way. You only know one angle and one side of the big triangle (you dont know the distance from either of the beacons to you!). You will have to devise a way to compute the distance from you to the beacon (create another triangle that you CAN triangulate) before you could determine absolute position.
  #5   Spotlight this post!  
Unread 05-02-2004, 22:39
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: triangulation

for instance, if you had 3 servos, each with a mounted sensor-pair (two homing on one beacon, one on the other), you would have enough information to compute the trapezoid and thus compute your position on the field.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #6   Spotlight this post!  
Unread 06-02-2004, 15:17
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: triangulation

You can't do absolute position because there's no indicator for Red/Blue side, you'd have to put a "compass" in the bot. Not that that's difficult.
  #7   Spotlight this post!  
Unread 06-02-2004, 22:44
Gene F's Avatar
Gene F Gene F is offline
FIRST Fanatic
AKA: Gene Falendysz
#0343 (Metal in Motion)
Team Role: Engineer
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Oconee County, SC
Posts: 218
Gene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to behold
Send a message via AIM to Gene F
Re: triangulation

Given that A and B are the lengths of the segments of the line between the beacons bisected by a perpendicular line to your robot of length C and the angles from that perpendicular to the beacons are given as T1 and T2.

A + B = 24

TAN = Opposite/Adjacent

T1 and T2 are angles gleaned from finding the beacons.

TAN(T1) = A/C

TAN(T2) =B/C

Therefore:

C*TAN(T1) = A

C*TAN(T2) = B

C*TAN(T1) + C*TAN(T2) = 24

C*( TAN(T1) + TAN(T2)) = 24

C = 24/( TAN(T1) + TAN(T2)) - The distance away from the middle of the field!

A = C*TAN(T1) - The distance from the left side of the field

B = C*TAN(T2) - The distance to the right side of the field.

Be careful this gets a little flakey as you approach the middle of the field.

The compass is required to determine the perpendicular and to determine which side of the field you are on.


I'm a little rusty on my Trig. So correct me if I've made a mistake!
__________________
- Gene Falendysz
  #8   Spotlight this post!  
Unread 18-02-2004, 19:28
lnxpenguin4ever lnxpenguin4ever is offline
Penguins Rule!
#1023 (Bedford Express)
Team Role: Mentor
 
Join Date: Feb 2004
Location: Bedford
Posts: 3
lnxpenguin4ever is an unknown quantity at this point
Re: triangulation

One problem you WILL run into is the fact that when you're in the center of the field, the angle of the servos relative to the beacons will be 90 degrees (and the triangulation will fail, as you can't divide by zero
  #9   Spotlight this post!  
Unread 21-02-2004, 21:05
leo_singer's Avatar
leo_singer leo_singer is offline
Registered User
#1111 (Seahawks)
Team Role: Programmer
 
Join Date: Mar 2003
Rookie Year: 2003
Location: Edgewater, MD
Posts: 15
leo_singer is an unknown quantity at this point
Question Re: triangulation

Quote:
Originally Posted by Gene F
Given that A and B are the lengths of the segments of the line between the beacons bisected by a perpendicular line to your robot of length C and the angles from that perpendicular to the beacons are given as T1 and T2.
You're trig is fine.

I've also been playing around with using the IR beacons to keep track of absolute position, and I've come up against a few ... obstacles. So maybe you can help me.

It's just that it's not so easy to keep track of those two angles, T1 and T2.

At the beginning of a match, you know both your position and heading (because you know where you've put your bot). Hence you can quickly calculate T1 and T2, as well as A, B, and C.

(You may recall from your old trig class that this is the angle-side-angle triangle congruency theorem.)

If you go straight ahead, then you can still keep reading off T1 and T2 because the altitude constructed from your bot to the midline of the field is still in the same place.

In fact, as long as the bot is perpendicular to that midline, you can figure out exactly where you are.

If you turn somewhere along the line, you can still find T1 and T2 *as*long*as* you know the angle from that altitude to a line parallel to your robot. This angle is your heading. You have a number of ways to keep track of heading -- you can use a gyro to sense your angular velocity, you can mount encoders on your wheels to count revolutions, and so forth.

However, your absolute position (i.e., the values of A, B, and C) will only be as accurate as your heading; in fact it will be slightly less accurate because of the (presumably small) amount of error introduced by the IR sensors.

The upshot of all this is that if you want to know you're absolute position, it's probably a little easier and little simpler to just use gyros and/or rotary encoders, which in the above setup would be necessary anyway. My conclusion: that if your autonomous objective is to shoot towards the 10 point ball, use the IR trackers. You don't even need any trig to do that; it's easy to find your distance *relative* to one beacon or the other. But at this time (which is pretty late) I haven't come up with any way to use the IR trackers to gauge *absolute* position.

I'm not saying it can't be done; I just haven't found a way. For now, I'm stuck with plain, old, dead reckoning. If any other team has a solution, I would be eager to hear it.
  #10   Spotlight this post!  
Unread 22-02-2004, 01:58
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Re: triangulation

Quote:
Originally Posted by Astronouth7303
You can't do absolute position because there's no indicator for Red/Blue side, you'd have to put a "compass" in the bot. Not that that's difficult.
Correct me if I'm wrong, but each beacon sends out a unique time signature. From this you can point each servo at each beacon. Knowing the two angles that the servos form will give you enough information to complete the trapezoid. You have two lengths and two angles. It's too late right now to go into details and it wouldn't give you much of a competetive edge to know where your robot is on the field with absolute position. If so desired I could elaborate more.
__________________
Suddenly being rejected from college feels right during the build season. Now I am a mentor.
  #11   Spotlight this post!  
Unread 22-02-2004, 02:22
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: triangulation

the problem is that the two lengths you know are not necessarily parallel, which is required for a trapezoid. hence the reason one would need a compass.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #12   Spotlight this post!  
Unread 22-02-2004, 13:10
Kevin Karan's Avatar
Kevin Karan Kevin Karan is offline
Linux Guy
AKA: maxdamage
None #0174 (Arctic Warriors)
Team Role: Alumni
 
Join Date: Jan 2003
Location: Liverpool, NY
Posts: 141
Kevin Karan will become famous soon enoughKevin Karan will become famous soon enough
Send a message via AIM to Kevin Karan
Re: triangulation

Remember, there is no math library included, so you will have to make your own.
__________________
It isnt ALWAYS the programmers falt!
2004: Buckeye team website award
2002: Rutgers semi-finalists
2001: National semi-finalists
2001: Rutgers semi-finalists
1998: Manchester Rookie All-Star Award
  #13   Spotlight this post!  
Unread 22-02-2004, 14:42
jacob_dilles's Avatar
jacob_dilles jacob_dilles is offline
Registered User
AKA: theshadow
FRC #0620 (WarBots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Vienna, VA
Posts: 245
jacob_dilles will become famous soon enough
Send a message via AIM to jacob_dilles
Re: triangulation

has anyone sucsesfuly tried using the standerd CPP math library by inporting it into mplab?
__________________
--------------------------
"You're not a real programmer until all your sentences end with semicolons;"
  #14   Spotlight this post!  
Unread 22-02-2004, 15:28
Kevin Karan's Avatar
Kevin Karan Kevin Karan is offline
Linux Guy
AKA: maxdamage
None #0174 (Arctic Warriors)
Team Role: Alumni
 
Join Date: Jan 2003
Location: Liverpool, NY
Posts: 141
Kevin Karan will become famous soon enoughKevin Karan will become famous soon enough
Send a message via AIM to Kevin Karan
Re: triangulation

Quote:
Originally Posted by jacob_dilles
has anyone sucsesfuly tried using the standerd CPP math library by inporting it into mplab?
I doubt it, a standard library would be rather large. I made my own, its a little slow but it gets the job done.
__________________
It isnt ALWAYS the programmers falt!
2004: Buckeye team website award
2002: Rutgers semi-finalists
2001: National semi-finalists
2001: Rutgers semi-finalists
1998: Manchester Rookie All-Star Award
  #15   Spotlight this post!  
Unread 22-02-2004, 17:16
telkanuru's Avatar
telkanuru telkanuru is offline
Generic Carbon Unit
#0246 (Overclocked)
Team Role: Engineer
 
Join Date: Feb 2004
Location: Amherst, MA
Posts: 27
telkanuru is an unknown quantity at this point
Send a message via AIM to telkanuru
Re: triangulation

Trig seems a little bit on the touchy side. You have the problem of the tracking, the angle, and the precision. Being off by a degree could send you very much where you don't want to go. My team discussed this early on, and discarded it. An INS and a gyro chip will be much easier, although a bit pricy, and it's a bit late in the season. Have fun with that. I don't envy your programmer.
__________________
"He who has cares also has brandy."
-Gothe

Murphey was an optimist.
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


All times are GMT -5. The time now is 23:58.

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