Go to Post When FIRST teams are as numerous and as well supported as basketball teams, we will know that our culture is preparing young people to compete in the 21 st century and we are spending our 2 million minutes wisely. - N7UJJ [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 06-01-2008, 14:09
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Reading gyro before Autonomous mode

Before the autonomous mode starts (Hybrid mode) and after the robot is booted, can you initialize the gyro and get readings from it to see how stable it is?

So while the robot is sitting can you initalize the gyro and get readings? If so can you store data from it? Anything special you have to do?
__________________
Doug Leppard
  #2   Spotlight this post!  
Unread 06-01-2008, 14:14
Joohoo's Avatar
Joohoo Joohoo is offline
Registered User
FRC #0340 (G.R.R.)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Rochester
Posts: 241
Joohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really nice
Send a message via AIM to Joohoo Send a message via Yahoo to Joohoo
Re: Reading gyro before Autonomous mode

One thing that you could do, is in the initialization function. you could initialize the value to a function return or a hard coded value. so inside the initialization function you would do this
Quote:
gyroHeading = initGyroHeading();
or something to that effect, this should set the heading to what ever you want it to be. Im not %100 sure that you can get values straight off the pins right away before you exit whatever mode you are in before a match, but i dont see why.
  #3   Spotlight this post!  
Unread 06-01-2008, 14:23
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: Reading gyro before Autonomous mode

Last year for our drive-by autonomous mode, we used a gyro on our arm to get the angle that we had to turn to. As soon as the robot was turned on, we set the code to initialize the gyro (which takes a few seconds) on our arm before autonomous started. As soon as the gyro is initialized, it would sit right around 0, but over long periods of time the default value can drift as much as 15 degrees over a two or three minute period.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
  #4   Spotlight this post!  
Unread 06-01-2008, 14:26
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Reading gyro before Autonomous mode

Before Hybrid Mode starts, you really can't read anything, since the robot is 'disabled', but in the first microsecond of the match, the gyro is at rest (as is the robot) and so the reading you get should be zero.

If your concern is some kind of calibration to know what "not turning" looks like, I don't think you have to worry much, just read the value in that first microsecond. If the value happens to be read before that - such as when you snap the power on when setting the robot onto the field - then it's a bonus.

The sensor is very well-behaved in our experience - zero means zero, it did not really drift or move enough to worry about. In our 2007 'bot, we never looked for an initial value, we just used whatever the reading came back as and never saw any issues

We're thinking that we'll be using the gyro to help with those 180 degree left turns.

Good luck,
Don

[Edit: Maybe this needs to be tried. Our experience may be different from yours]
__________________

I am N2IRZ - What's your callsign?
  #5   Spotlight this post!  
Unread 06-01-2008, 14:38
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Re: Reading gyro before Autonomous mode

Quote:
Originally Posted by artdutra04 View Post
Last year for our drive-by autonomous mode, we used a gyro on our arm to get the angle that we had to turn to. As soon as the robot was turned on, we set the code to initialize the gyro (which takes a few seconds) on our arm before autonomous started. As soon as the gyro is initialized, it would sit right around 0, but over long periods of time the default value can drift as much as 15 degrees over a two or three minute period.
So you did the initialize routine before start of automode? If so that is good.
__________________
Doug Leppard
  #6   Spotlight this post!  
Unread 06-01-2008, 14:39
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Re: Reading gyro before Autonomous mode

Quote:
Originally Posted by Don Rotolo View Post
Before Hybrid Mode starts, you really can't read anything, since the robot is 'disabled', but in the first microsecond of the match, the gyro is at rest (as is the robot) and so the reading you get should be zero.

If your concern is some kind of calibration to know what "not turning" looks like, I don't think you have to worry much, just read the value in that first microsecond. If the value happens to be read before that - such as when you snap the power on when setting the robot onto the field - then it's a bonus.

The sensor is very well-behaved in our experience - zero means zero, it did not really drift or move enough to worry about. In our 2007 'bot, we never looked for an initial value, we just used whatever the reading came back as and never saw any issues

We're thinking that we'll be using the gyro to help with those 180 degree left turns.

Good luck,
Don

[Edit: Maybe this needs to be tried. Our experience may be different from yours]
I thought the gyro once initialized had to sit still for a second before being moved, not a micro second?
__________________
Doug Leppard
  #7   Spotlight this post!  
Unread 06-01-2008, 15:31
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: Reading gyro before Autonomous mode

Quote:
Originally Posted by Doug Leppard View Post
So you did the initialize routine before start of automode? If so that is good.
Yes.
Quote:
Originally Posted by Doug Leppard View Post
I thought the gyro once initialized had to sit still for a second before being moved, not a micro second?
While the gyro is initializing, you cannot move it. Once it is initialized, then it's all right to move it as much as you want, so long as you don't exceed the maximum degrees/second of the gyro. (If this occurs, you won't break the sensor, you'll just get saturated readings.)

If the KoP gyro has the same specs as last year, they can only sense a maximum of 90o per second. So we used the KoP gyro on our arm, and purchased a 300o per second gyro from SparkFun Electronics to use for drive-train related things on our 2007 robot.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
  #8   Spotlight this post!  
Unread 06-01-2008, 15:38
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Reading gyro before Autonomous mode

Quote:
Originally Posted by Don Rotolo View Post
Before Hybrid Mode starts, you really can't read anything, since the robot is 'disabled'
At the beginning of the match, the robot is disabled, but auto mode is not yet set. It's worth noting that the bot is reading inputs, it's just not setting any outputs.

Team 95 has used this for years to set autonomous strategies, reset our gyros, and other initialization stuff in the minutes between the bot being turned on and autonomous mode starting.
  #9   Spotlight this post!  
Unread 06-01-2008, 18:37
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: Reading gyro before Autonomous mode

Quote:
Originally Posted by kaszeta View Post
At the beginning of the match, the robot is disabled, but auto mode is not yet set. It's worth noting that the bot is reading inputs, it's just not setting any outputs.
I agree with kaszeta, here. We've used AnalogDevices yaw rate sensors since 2004. While in competition (disabled) mode, we simply read the gyro and average it with the previous reading. When the mode changes, the final averaged value becomes our neutral point, which we use for the match. In the past many teams have taken several hundred samples during competition mode and created an average neutral point from them. Either way gives you a good 0 yaw rate point to use for the next 2:15

Eric
__________________

Don't PANIC!
S. P. A. M.

Last edited by EricS-Team180 : 06-01-2008 at 18:42.
  #10   Spotlight this post!  
Unread 06-01-2008, 21:02
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Re: Reading gyro before Autonomous mode

Quote:
Originally Posted by EricS-Team180 View Post
I agree with kaszeta, here. We've used AnalogDevices yaw rate sensors since 2004. While in competition (disabled) mode, we simply read the gyro and average it with the previous reading. When the mode changes, the final averaged value becomes our neutral point, which we use for the match. In the past many teams have taken several hundred samples during competition mode and created an average neutral point from them. Either way gives you a good 0 yaw rate point to use for the next 2:15

Eric
Thanks that was exactly what I hoped for and was thinking must be possible.
__________________
Doug Leppard
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
Gyro Autonomous Problems cprogrammer Programming 5 23-03-2007 14:28
How to end an auto mode after gyro gets out of deadband kiettyyyy Programming 17 20-04-2006 07:59
Reading switches during Autonomous TimeOut Programming 3 19-02-2006 16:23
Gyro not working in Autonomous? kaszeta Programming 7 11-02-2006 01:28
how can you use a gyro in autonomous mode magical hands Programming 3 02-01-2004 13:31


All times are GMT -5. The time now is 18:44.

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