Go to Post Some advice I wish I had as a college freshman: If you don't understand it, or are struggling to keep up, ask for help. - DonRotolo [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 12-01-2004, 14:17
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
Official Beacon Tracking Code Posted

I've posted the official IR beacon and IR beacon tracking and navigation code that was used at the kick-off here: http://kevin.org/frc. The folks at IFI will also be posting the code on their website. If you have questions about the code, please leave 'em here and I'll try to keep up .

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #2   Spotlight this post!  
Unread 12-01-2004, 15:54
Andy Brockway Andy Brockway is offline
Engineer
FRC #0716 (Who'sCTEKS)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Falls Village, CT
Posts: 459
Andy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond reputeAndy Brockway has a reputation beyond repute
Re: Official Beacon Tracking Code Posted

Thanks Kevin,

Do we run this in the EduBot RC as a separate system?

Is anyone able to convert this to Pbasic so I can run it on a Parallax BOE?
__________________
Andy Brockway
Team 716, The Who'sCTEKS
  #3   Spotlight this post!  
Unread 12-01-2004, 16:01
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Kevin Watson
The folks at IFI will also be posting the code on their website.
Beacon.zip and navigate.zip are on Innovation First's website now.
  #4   Spotlight this post!  
Unread 12-01-2004, 16:01
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: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Andy Brockway
Thanks Kevin,

Do we run this in the EduBot RC as a separate system?
Yes, it was designed this way on purpose so that teams would be able to generate the beacon on their own fields. The field for this years game will use a EDU-RC to generate the beacon waveforms.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #5   Spotlight this post!  
Unread 12-01-2004, 18:43
galewind's Avatar
galewind galewind is offline
... more like a temperate breeze
AKA: Chris Gregory
FRC #1089 (Team Mercury)
Team Role: Teacher
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Hightstown, NJ
Posts: 410
galewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond repute
Send a message via AIM to galewind
Re: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Kevin Watson
Yes, it was designed this way on purpose so that teams would be able to generate the beacon on their own fields. The field for this years game will use a EDU-RC to generate the beacon waveforms.

-Kevin
hmmm.. that will be problematic if I don't go and get a 2nd 7.2v battery.
__________________
Chris G
Advisor, Team Mercury (1089), Hightstown High School
  #6   Spotlight this post!  
Unread 12-01-2004, 21:53
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: Official Beacon Tracking Code Posted

Quote:
Originally Posted by galewind
hmmm.. that will be problematic if I don't go and get a 2nd 7.2v battery.
Just get a 7.2V generic AC adaptor and add the necessary connector to make it connect to the EduRC.
  #7   Spotlight this post!  
Unread 12-01-2004, 22:13
galewind's Avatar
galewind galewind is offline
... more like a temperate breeze
AKA: Chris Gregory
FRC #1089 (Team Mercury)
Team Role: Teacher
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Hightstown, NJ
Posts: 410
galewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond repute
Send a message via AIM to galewind
Re: Official Beacon Tracking Code Posted

I haven't read up yet on this, but where can we find what materials we will need to actually emit the waveforms?
__________________
Chris G
Advisor, Team Mercury (1089), Hightstown High School
  #8   Spotlight this post!  
Unread 12-01-2004, 22:43
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Official Beacon Tracking Code Posted

Can you please describe the beacon waveform?
__________________
1139 Alumni
  #9   Spotlight this post!  
Unread 12-01-2004, 23:04
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: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Rickertsen2
Can you please describe the beacon waveform?
I'm working on additional documentation for the beacon and beacon tracking software. I'll post it as I complete it. Meanwhile have a look at this thread for a description.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 12-01-2004, 23:19
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Kevin Watson
I'm working on additional documentation for the beacon and beacon tracking software. I'll post it as I complete it. Meanwhile have a look at this thread for a description.

-Kevin
Thanks. That scheme is relatively simple. Maybie if i find some time(not likley) i will post an alernative circuit, for those who do not wnat to use the edubot. This setup is easy to replicate using a handful of resistors, capacitors, and 555 timers.

Hmmm... I might have to look into the whole triangulation thing.
__________________
1139 Alumni

Last edited by Rickertsen2 : 12-01-2004 at 23:21.
  #11   Spotlight this post!  
Unread 13-01-2004, 13:01
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: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Rickertsen2
Can you please describe the beacon waveform?
I've done an Illustration showing the beacon waveforms and the infrared sensors response. It's here: http://kevin.org/frc.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #12   Spotlight this post!  
Unread 17-01-2004, 01:16
Phil Roth Phil Roth is offline
Registered User
#0011 (BASF)
 
Join Date: Jan 2003
Location: Mt. Olive New Jersey
Posts: 31
Phil Roth is an unknown quantity at this point
Send a message via AIM to Phil Roth Send a message via Yahoo to Phil Roth
Re: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Kevin Watson
I'm working on additional documentation for the beacon and beacon tracking software. I'll post it as I complete it. Meanwhile have a look at this thread for a description.

-Kevin

Kevin,
Thanks for the link explaining that the system uses BOTH beacons instead of ONE. I guess it finally clicked. I had trouble understanding how to manuever both directions ( left and right )using using a single "line of sight" source. My trig skills havn't been used in 20 years so I hope the students can help us out with triangulation.

I am still a little confused why 4 receiving LEDS are used and not 2, 1 for each beacon. ??

-Phil
  #13   Spotlight this post!  
Unread 17-01-2004, 11:47
Phil Roth Phil Roth is offline
Registered User
#0011 (BASF)
 
Join Date: Jan 2003
Location: Mt. Olive New Jersey
Posts: 31
Phil Roth is an unknown quantity at this point
Send a message via AIM to Phil Roth Send a message via Yahoo to Phil Roth
Re: Official Beacon Tracking Code Posted

I'm trying to fully understand the code and working with the External ISRs first. It seems their sole purpose is to measure the amount of time of the active low pulse, categorize it as beacon 1 or 2, and then update Sensor_Stats[0].Beacon_Count[n] accordingly. Beacon 0 pulses every 1 MS and Beacon 2 pulses every 2 MS.


SO:
SENSOR #1
Sensor_Stats[0].Beacon_Count[0] increments a running count of pulses from beacon 1
Sensor_Stats[0].Beacon_Count[1] increments a running count of pulses from beacon 2

SENSOR #2
Sensor_Stats[1].Beacon_Count[0] increments a running count of pulses from beacon 1
Sensor_Stats[1].Beacon_Count[1] increments a running count of pulses from beacon 2

SENSOR #3
Sensor_Stats[2].Beacon_Count[0] increments a running count of pulses from beacon 1
Sensor_Stats[2].Beacon_Count[1] increments a running count of pulses from beacon 2

SENSOR #4
Sensor_Stats[3].Beacon_Count[0] increments a running count of pulses from beacon 1
Sensor_Stats[3].Beacon_Count[1] increments a running count of pulses from beacon 2


Ideally counts for beacon #1 should be incremented 26 times for beacon 1 and 13 times for beacon 2 when the Timer_1_Int_handler runs
Every 26.2MS, Timer_1_int_handler subtracts the "last" running count of pulses from the "new" running count of pulses to determine the number of pulses that occured over the last 26.2MS perion.

SO:
Sensor_Stats[0].Beacon_Quality[0] = Number of pulses that sensor #1 received from beacon 1 that occurred during the last 26.2 MS
Sensor_Stats[0].Beacon_Quality[1] = Number of pulses that sensor #1 received from beacon 2 that occurred during the last 26.2 MS

Sensor_Stats[1].Beacon_Quality[0] = Number of pulses that sensor #2 received from beacon 1 that occurred during the last 26.2 MS
Sensor_Stats[1]Beacon_Quality[1] = Number of pulses that sensor #2 received from beacon 2 that occurred during the last 26.2 MS

Sensor_Stats[2].Beacon_Quality[0] = Number of pulses that sensor #3 received from beacon 1 that occurred during the last 26.2 MS
Sensor_Stats[2].Beacon_Quality[1] = Number of pulses that sensor #3 received from beacon 2 that occurred during the last 26.2 MS

Sensor_Stats[3].Beacon_Quality[0] = Number of pulses that sensor #4 received from beacon 1 that occurred during the last 26.2 MS
Sensor_Stats[3].Beacon_Quality[1] = Number of pulses that sensor #4 received from beacon 2 that occurred during the last 26.2 MS


End result is:
The values held in the element Beacon.Quality[n] are the number of pulses from each sensor that occurr every 26.2MS where n = beacon #1 or #2. These values are updated every 26.2MS

AND

There are 4 sensors index by Sensor_Stats[n]
where n = of of 4 sensors

Ideally Beacon.Quality[n] should be contain 26 for beacon #1 and 13 for beacon #2.


Is this basically what's happenning in receiver.c ??
Sorry to be so "anal" but I like to fully understand how the code works in order to understand the entire system and move on to understanding tracker.c and then navigate.c where the rubber meets the road. All this while trying to work out out an approach to manage current and software optomization of a 4 motor drive system. I guess my weekend is shot.

-Phil

Last edited by Phil Roth : 17-01-2004 at 12:16.
  #14   Spotlight this post!  
Unread 17-01-2004, 12:52
Krash Krash is offline
Registered User
AKA: Steve K
#0836 (RoboBee's)
 
Join Date: Jan 2004
Location: St. Mary's County, MD
Posts: 1
Krash is an unknown quantity at this point
Re: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Kevin Watson
I've posted the official IR beacon and IR beacon tracking and navigation code that was used at the kick-off here: http://kevin.org/frc. The folks at IFI will also be posting the code on their website. If you have questions about the code, please leave 'em here and I'll try to keep up .

-Kevin

Kevin,
Is there a "Theory of Operation" or White paper available to explain how this all works? I am assuming that type-0 operates on one side of the field and type-1 operates on the other side. Is this correct?

Also, is the waveform chart on your website accurate? I assume that the pulse repetition interval's (PRI) are fixed as depicted on the chart.

Thanks,
Steve...
  #15   Spotlight this post!  
Unread 17-01-2004, 13:33
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: Official Beacon Tracking Code Posted

Quote:
Originally Posted by Phil Roth
I'm trying to fully understand the code and working with the External ISRs first. It seems their sole purpose is to measure the amount of time of the active low pulse, categorize it as beacon 1 or 2, and then update Sensor_Stats[0].Beacon_Count[n] accordingly. Beacon 0 pulses every 1 MS and Beacon 2 pulses every 2 MS.
Actually, the beacon 0 pulse width is 1ms, the beacon 1 pulse width is 2ms. The beacon flashes every 10ms for a beacon rate of 100Hz.



Quote:
Originally Posted by Phil Roth
SO:
SENSOR #1
Sensor_Stats[0].Beacon_Count[0] increments a running count of pulses from beacon 1
Sensor_Stats[0].Beacon_Count[1] increments a running count of pulses from beacon 2

SENSOR #2
Sensor_Stats[1].Beacon_Count[0] increments a running count of pulses from beacon 1
Sensor_Stats[1].Beacon_Count[1] increments a running count of pulses from beacon 2

SENSOR #3
Sensor_Stats[2].Beacon_Count[0] increments a running count of pulses from beacon 1
Sensor_Stats[2].Beacon_Count[1] increments a running count of pulses from beacon 2

SENSOR #4
Sensor_Stats[3].Beacon_Count[0] increments a running count of pulses from beacon 1
Sensor_Stats[3].Beacon_Count[1] increments a running count of pulses from beacon 2


Ideally counts for beacon #1 should be incremented 26 times for beacon 1 and 13 times for beacon 2 when the Timer_1_Int_handler runs
Every 26.2MS, Timer_1_int_handler subtracts the "last" running count of pulses from the "new" running count of pulses to determine the number of pulses that occured over the last 26.2MS perion.
As the beacon rate is 100Hz (=10ms), the counts for both beacon types will increment by 2 or 3 everytime the timer_1_int_handler executes.



Quote:
Originally Posted by Phil Roth
SO:
Sensor_Stats[0].Beacon_Quality[0] = Number of pulses that sensor #1 received from beacon 1 that occurred during the last 26.2 MS
Sensor_Stats[0].Beacon_Quality[1] = Number of pulses that sensor #1 received from beacon 2 that occurred during the last 26.2 MS

Sensor_Stats[1].Beacon_Quality[0] = Number of pulses that sensor #2 received from beacon 1 that occurred during the last 26.2 MS
Sensor_Stats[1]Beacon_Quality[1] = Number of pulses that sensor #2 received from beacon 2 that occurred during the last 26.2 MS

Sensor_Stats[2].Beacon_Quality[0] = Number of pulses that sensor #3 received from beacon 1 that occurred during the last 26.2 MS
Sensor_Stats[2].Beacon_Quality[1] = Number of pulses that sensor #3 received from beacon 2 that occurred during the last 26.2 MS

Sensor_Stats[3].Beacon_Quality[0] = Number of pulses that sensor #4 received from beacon 1 that occurred during the last 26.2 MS
Sensor_Stats[3].Beacon_Quality[1] = Number of pulses that sensor #4 received from beacon 2 that occurred during the last 26.2 MS


End result is:
The values held in the element Beacon.Quality[n] are the number of pulses from each sensor that occurr every 26.2MS where n = beacon #1 or #2. These values are updated every 26.2MS
Yes, this is correct except the beacons are #0 and #1



Quote:
Originally Posted by Phil Roth
There are 4 sensors index by Sensor_Stats[n]
where n = of of 4 sensors
Yes, with index values of 0-3. How the individual sensors map to loacations on the tracker assembly is noted at the top of tracker.c



Quote:
Originally Posted by Phil Roth
Ideally Beacon.Quality[n] should be contain 26 for beacon #1 and 13 for beacon #2.
No, ...Beacon.Quality[n] should contain 2 or 3 when the beacon is in view. The algorithm in tracker.c assumes the beacon is in view of that particular sensors "quality" is greater than 0.



Quote:
Originally Posted by Phil Roth
Is this basically what's happenning in receiver.c ??
Yes, you have a very good grasp of how it works



Quote:
Originally Posted by Phil Roth
Sorry to be so "anal" but I like to fully understand how the code works in order to understand the entire system and move on to understanding tracker.c and then navigate.c where the rubber meets the road.
No problem at all. This is a great discussion that other folks can hopefully learn from.



Quote:
Originally Posted by Phil Roth
All this while trying to work out out an approach to manage current
Have a look at Rich Petras' code in navigate.c for an example of motor stall detection using the new current sensors.



Quote:
Originally Posted by Phil Roth
I guess my weekend is shot.
Sorry, dude, whether you know it or not, your next five weekends are shot .

-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
What is your most prefered programming language? Hailfire Programming 156 19-01-2005 21:42
InfraRed autonomous code ... mtrawls Programming 1 11-01-2004 00:25
Autonomous code PBoss Programming 7 14-01-2003 15:29
Does your team use the Default code. Jeff McCune General Forum 2 09-01-2003 14:46
Patent source code? Kyle Fenton Chit-Chat 3 20-10-2001 17:53


All times are GMT -5. The time now is 10:36.

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