|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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? |
|
#2
|
||||
|
||||
|
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:
|
|
#3
|
|||||
|
|||||
|
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.
|
|
#4
|
||||
|
||||
|
Re: Reading gyro before Autonomous mode
Quote:
|
|
#5
|
|||||
|
|||||
|
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] |
|
#6
|
||||
|
||||
|
Re: Reading gyro before Autonomous mode
Quote:
|
|
#7
|
|||||
|
|||||
|
Re: Reading gyro before Autonomous mode
Quote:
Quote:
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. |
|
#8
|
||||
|
||||
|
Re: Reading gyro before Autonomous mode
Quote:
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
|
|||||
|
|||||
|
Re: Reading gyro before Autonomous mode
Quote:
Eric Last edited by EricS-Team180 : 06-01-2008 at 18:42. |
|
#10
|
||||
|
||||
|
Re: Reading gyro before Autonomous mode
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |