|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Gyro Oddities
My team finally got out Gyro hooked up and working, but we have a problem with the outputs we are getting. After turning the gyro through 90 degrees, it reads just over 45 degrees.
Is there a better way to solve this problem other than multiplying it by a constant? Does anyone know why this is happening? |
|
#2
|
||||||
|
||||||
|
Re: Gyro Oddities
Quote:
Last edited by Joe Ross : 21-01-2010 at 20:03. |
|
#3
|
|||||
|
|||||
|
Re: Gyro Oddities
If you are using the KOP gyro the gain is 7mV/deg/sec.
If you were using the default Labview gain a rotation of 90 degrees should have come out to ~50.4 degrees. |
|
#4
|
|||
|
|||
|
Re: Gyro Oddities
(I'm on Rafael's Team)
so, we are in fact using the default gain on the gyro, however I do not know how to change it. |
|
#5
|
|||
|
|||
|
Re: Gyro Oddities
If you are using Labview, there is a setGain vi available in the WPI library.
|
|
#6
|
||||
|
||||
|
Re: Gyro Oddities
What programming language are you using?
I remember my team--we used C++--had the same problem last year, we just changed part of the Gyro class so it worked for the KoP gyro. |
|
#7
|
||||
|
||||
|
Re: Gyro Oddities
We came up with a very simple solution, Rotate the robot 360 while taking a reading from the gyro, lets say the gyro read 200 degrees.
In your code, whenever you use GetAngle(); just multiply by 360 and divide by your reading, in our case, 200. so your code would look like float fAngle = gyro.GetAngle()*360/200; - Bochek |
|
#8
|
|||||
|
|||||
|
Re: Gyro Oddities
Quote:
But it's a lot easier and cleaner to use the Set Gain vi in the gyro palette. Last edited by Alan Anderson : 30-01-2010 at 23:11. |
|
#9
|
||||
|
||||
|
Re: Gyro Oddities
C++ way:
gyro.SetSensitivity(0.007); |
|
#10
|
||||
|
||||
|
Re: Gyro Oddities
On this same topic ... we have the Gyro wired properly and sensitivty set properly via the C++ method and are getting readouts via the GetAngle method. The problem is that the readouts are all over the map.
1. One time while the Gyro is at rest, it's returning a steadily increasing value well into the thousands if we let it keep going. 2. Another time while at rest, the reading is as expected, a few degrees positive and negative when twisting slowly about the z-axis. 3. Sometimes when reading the voltage return on the PWM, we get the standard 2.5v at rest, but then for no reason, the voltage jumps to 4.6+ and seems to get stuck there until we "jostle" the gyro. Not sure if this is a bad Gyro and we don't have a 2nd one to test if this is the case. Any ideas? |
|
#11
|
||||
|
||||
|
Re: Gyro Oddities
Quote:
also, check the wiring |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| gyro problem | Guarana | Programming | 9 | 03-03-2008 15:48 |
| gyro | captainking | General Forum | 4 | 03-02-2008 22:25 |
| Gyro | magical hands | Programming | 2 | 14-01-2005 20:57 |
| gyro | odin892 | Programming | 0 | 08-04-2003 09:59 |
| Gyro | archiver | 2001 | 2 | 23-06-2002 23:11 |