Go to Post Is Atlanta an Indian word for "take the longest path between two places"? - Klondike Mike [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 Rating: Thread Rating: 3 votes, 4.67 average. Display Modes
  #16   Spotlight this post!  
Unread 21-01-2005, 22:10
neilsonster's Avatar
neilsonster neilsonster is offline
Registered User
AKA: Andrew Neilson
FRC #0772 (Sabre Bytes)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Waterloo, ON, Canada
Posts: 188
neilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to all
Send a message via MSN to neilsonster
Re: Example gyro code released.

Quote:
For now, we are using the BEI gyrochip provided in the 2003 kit. This is for testing purposes, seeing as they are illegal for robot use.
Where did you hear they are illegal? Check the Q&A under ID 1118:
Quote:
Q: Can we use Gyros from previous year's kits on our robot?
A: Yes as long as it passes the 2005 Part Use Flowchart and you account for its cost according to the cost accounting rules.
EDIT: Nevermind... I guess the Q&A people didn't look up the price...

Last edited by neilsonster : 22-01-2005 at 12:19.
  #17   Spotlight this post!  
Unread 21-01-2005, 23:10
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: Example gyro code released.

Quote:
Originally Posted by neilsonster
There shouldn't be a problem with you using the gyrochip on your robot.
Sweet, thanks for the info. I was under the impression it was illegal seeing as it was up for sale in a FIRST yard sale.
  #18   Spotlight this post!  
Unread 22-01-2005, 00:16
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: Example gyro code released.

Quote:
Originally Posted by Tom Bottiglieri
Sweet, thanks for the info. I was under the impression it was illegal seeing as it was up for sale in a FIRST yard sale.
I've updated the gyro code to include scaling factors for the two different BEI GyroChip gyros that FIRST has included in the KOP in the past. The code can be found here: http://kevin.org/frc.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #19   Spotlight this post!  
Unread 22-01-2005, 00:45
CyberWolf_22's Avatar
CyberWolf_22 CyberWolf_22 is offline
Programming and Electrical Mentor
AKA: Allen Gregory
FRC #2587 (Afrobots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Houston, Texas
Posts: 227
CyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really nice
Re: Example gyro code released.

I don't believe that the BEI gyro's are legal because the lowest price I have been able to find them for is approximately $350 which over the $200 price limit for additional electronics. If anyone has seen a gyro for sale cheaper then that, that would follow the vendor requirements that FIRST has laid out please post a link because I have 3 of them sitting in the shop that I would love to use on this years robot.
__________________
  #20   Spotlight this post!  
Unread 22-01-2005, 10:46
kutty18 kutty18 is offline
Registered User
#0234 (Cyberblue)
Team Role: Programmer
 
Join Date: Jun 2004
Location: Indianapolis, IN
Posts: 23
kutty18 is on a distinguished road
Send a message via AIM to kutty18 Send a message via Yahoo to kutty18
Re: Example gyro code released.

Quote:
Originally Posted by Kevin Watson
I have some serious magic that I can throw at the problem if people can't use their gyros because of too much drift.
Hmmm..Magic?...We tried to calibrate the gyro, but there was too much drift. We mounted it to a square piece of wood, but we still had too much drift. Is there any way to control the drift?

Thanks
  #21   Spotlight this post!  
Unread 22-01-2005, 12:02
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: Example gyro code released.

Quote:
Originally Posted by kutty18
Hmmm..Magic?...We tried to calibrate the gyro, but there was too much drift. We mounted it to a square piece of wood, but we still had too much drift. Is there any way to control the drift?

Thanks
What kind of gyro are you using? Did you try the manual method that uses Set_Gyro_Bias()? Just make sure the gyro is motionless as the bias is being calculated.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #22   Spotlight this post!  
Unread 22-01-2005, 12:08
kutty18 kutty18 is offline
Registered User
#0234 (Cyberblue)
Team Role: Programmer
 
Join Date: Jun 2004
Location: Indianapolis, IN
Posts: 23
kutty18 is on a distinguished road
Send a message via AIM to kutty18 Send a message via Yahoo to kutty18
Re: Example gyro code released.

Quote:
Originally Posted by Kevin Watson
What kind of gyro are you using? Did you try the manual method that uses Set_Gyro_Bias()? Just make sure the gyro is motionless as the bias is being calculated.

-Kevin
We are using ADXRS300ABG & ADXRS300EB-ND Gyros. Yes we tried the manual method that uses Set_Gyro_Bias()?
  #23   Spotlight this post!  
Unread 22-01-2005, 12:13
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: Example gyro code released.

Quote:
Originally Posted by kutty18
We are using ADXRS300ABG & ADXRS300EB-ND Gyros. Yes we tried the manual method that uses Set_Gyro_Bias()?
How much drift are you seeing (you need to calibrate the scaling factor first).

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #24   Spotlight this post!  
Unread 22-01-2005, 12:19
neilsonster's Avatar
neilsonster neilsonster is offline
Registered User
AKA: Andrew Neilson
FRC #0772 (Sabre Bytes)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Waterloo, ON, Canada
Posts: 188
neilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to all
Send a message via MSN to neilsonster
Re: Example gyro code released.

Quote:
Originally Posted by CyberWolf_22
I don't believe that the BEI gyro's are legal because the lowest price I have been able to find them for is approximately $350 which over the $200 price limit for additional electronics. If anyone has seen a gyro for sale cheaper then that, that would follow the vendor requirements that FIRST has laid out please post a link because I have 3 of them sitting in the shop that I would love to use on this years robot.
Ok, I just looked into this as well and you're right. The darn things are too expensive! (now we need to buy a new gyro..)

Edit: Actually, on second thought, does anyone know for sure if the fact that FIRST gave it to us in previous years makes a difference?

Last edited by neilsonster : 22-01-2005 at 12:23.
  #25   Spotlight this post!  
Unread 22-01-2005, 12:26
kutty18 kutty18 is offline
Registered User
#0234 (Cyberblue)
Team Role: Programmer
 
Join Date: Jun 2004
Location: Indianapolis, IN
Posts: 23
kutty18 is on a distinguished road
Send a message via AIM to kutty18 Send a message via Yahoo to kutty18
Re: Example gyro code released.

Quote:
Originally Posted by Kevin Watson
How much drift are you seeing (you need to calibrate the scaling factor first)
The values for "rate" and "angle" are empty in the terminal window. Once in a while, "angle" is 0. When we manually set Bias, the values for "rate" and "angle" are gibberish...Also, sometimes, the dreaded "windows fatal error" screen comes up. We have followed the steps that was in the readme.txt file. And no changes to the code were made...except for, changing to the right gyro model #.

Last edited by kutty18 : 22-01-2005 at 13:11.
  #26   Spotlight this post!  
Unread 22-01-2005, 13:19
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: Example gyro code released.

Quote:
Originally Posted by kutty18
...Also, sometimes, the dreaded "windows fatal error" screen comes up.
I think you'll need to find a different windows machine to use before you'll be able to make any progress.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #27   Spotlight this post!  
Unread 22-01-2005, 17:53
kutty18 kutty18 is offline
Registered User
#0234 (Cyberblue)
Team Role: Programmer
 
Join Date: Jun 2004
Location: Indianapolis, IN
Posts: 23
kutty18 is on a distinguished road
Send a message via AIM to kutty18 Send a message via Yahoo to kutty18
Re: Example gyro code released.

Quote:
Originally Posted by Kevin Watson
I think you'll need to find a different windows machine to use before you'll be able to make any progress.
Hey, thanks. We got it to work. We took it to a "quiet" place, and it worked fine. Maybe its those machines that messed it up...
  #28   Spotlight this post!  
Unread 23-01-2005, 10:37
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Example gyro code released.

Quote:
Originally Posted by Kevin Watson
How much drift are you seeing (you need to calibrate the scaling factor first).

-Kevin
We used the code with the ADXRS300 as well and were seeing about 8 degrees of drift over 2-1/2 minutes on a motionless robot. We modified the code to average the bias over more than a single group of samples and increased the sample size to 16 to get the extra precision. That seemed to improve the results.

Can you tell us what you were seeing for drift over time? I just wasn't sure what to expect for results and so we tried these modifications.

Also, I have a question. You're locking the A/D onto Channel 1 to presumably eliminate that acquisition time when switching channels. How much time does actually take (for teams that want more than one analog input)?

And do you know what the conversion time is once the channel is switched?

Thanks again for posting the code.

Brad
  #29   Spotlight this post!  
Unread 23-01-2005, 13:36
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: Example gyro code released.

Quote:
Originally Posted by BradAMiller
We used the code with the ADXRS300 as well and were seeing about 8 degrees of drift over 2-1/2 minutes on a motionless robot. We modified the code to average the bias over more than a single group of samples and increased the sample size to 16 to get the extra precision. That seemed to improve the results.

Can you tell us what you were seeing for drift over time? I just wasn't sure what to expect for results and so we tried these modifications.
Without actively tracking the bias, you're getting performance that is about what I would expect from a ADXRS300. I'd be pretty happy with a gyro that only drifted a degree over the entire autonomous period. For reference, I have a ADXRS150EB that drifts a degree over about a minute and I tested an old GyroChip that did even better.


Quote:
Originally Posted by BradAMiller
Also, I have a question. You're locking the A/D onto Channel 1 to presumably eliminate that acquisition time when switching channels. How much time does actually take (for teams that want more than one analog input)?
No, I take control of the ADC hardware because I'm trying to be pretty efficient and not use up a lot of CPU time. You'll notice that in response to the timer interrupt, I read the ADC result register and then immediatly start another conversion. If you used the ADC after my conversion was done, I'd have lost the conversion result the next time the timer interrupt fires off. One way around this is to increase the timer interrupt rate and interleave the ADC measurements.


Quote:
Originally Posted by BradAMiller
And do you know what the conversion time is once the channel is switched?
I'm sure it's considerably less time than the timer interrupt period, but I don't know the exact value. The data sheet would be a good document to consult for this information.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #30   Spotlight this post!  
Unread 23-01-2005, 13:38
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: Example gyro code released.

Quote:
Originally Posted by Kevin Watson

No, I take control of the ADC hardware because I'm trying to be pretty efficient and not use up a lot of CPU time. You'll notice that in response to the timer interrupt, I read the ADC result register and then immediatly start another conversion. If you used the ADC after my conversion was done, I'd have lost the conversion result the next time the timer interrupt fires off. One way around this is to increase the timer interrupt rate and interleave the ADC measurements.
-Kevin
Is it possible for us to use the ADC for say.. another gyro?
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
Sourceforge for Code Repository and other stuff SilverStar Programming 9 15-01-2005 21:16
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Wierd gyro code problems...pls help Salik Syed Programming 4 14-03-2004 01:29
Infrared Beacon and Sensor Diagnostics Code Released Kevin Watson Programming 3 25-02-2004 17:50
gyro code odin892 Programming 2 08-04-2003 14:50


All times are GMT -5. The time now is 08:02.

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