|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Reducing Drift in KOP Gyroscope
I have done some digging into why our autonomous code didn't work last year and discovered the drift that I found was referenced in some other parts around this forum, and i think it is in all KOP Gyroscopes.
Does anyone know the best way to reduce this drift besides make its mount completely level? because I cannot find any other way, and I don't know how to go into it to see if there is any settings to change. Thanks for any help or ideas |
|
#2
|
||||||
|
||||||
|
Re: Reducing Drift in KOP Gyroscope
What is the magnitude of the drift you are seeing?
|
|
#3
|
|||
|
|||
|
Re: Reducing Drift in KOP Gyroscope
The quick and almost useless answer is sensor fusion/Kalman filters (It's useless because it's not a simple answer).
Are you just using the gyroscopes? Gyroscopes are inherently susceptible to drift (There's no perfect sensor for any application, only the most optimal). You theoretically can use a set of accelerometers to zero out the gyroscopes continuously, and as another set of data to measure robot orientation. Could also use your wheel encoders to tell you when you're stopped. See http://stackoverflow.com/questions/1...lerometer-data for more information, or search Kalman Filters, Sensor Fusion. |
|
#4
|
|||
|
|||
|
Re: Reducing Drift in KOP Gyroscope
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: Reducing Drift in KOP Gyroscope
What about averaging the heading from multiple gyros?
I heard from a member of 1717 that doing this helped them a lot. Last edited by z_beeblebrox : 29-07-2013 at 18:55. |
|
#6
|
|||
|
|||
|
Re: Reducing Drift in KOP Gyroscope
Quote:
|
|
#7
|
||||
|
||||
|
Re: Reducing Drift in KOP Gyroscope
Quote:
|
|
#8
|
|||
|
|||
|
Re: Reducing Drift in KOP Gyroscope
Quote:
But to answer OP's question more directly, I don't think you should be seeing much drift during a single match. The gyro should be mounted as level and close to the center of the robot as possible, since it measures rotation around the axis perpendicular to its board: Quote:
|
|
#9
|
|||
|
|||
|
Re: Reducing Drift in KOP Gyroscope
Quote:
I have thought about putting in a software cancel, would something like that be a if encoders are not moving, keep angle the same, and count the accumulation in the code instead of letting the gyro do it itself, and reset the gyro every iteration? That is the only way i could think of doing it. |
|
#10
|
||||
|
||||
|
Re: Reducing Drift in KOP Gyroscope
Quote:
Quote:
Some teams have added a manual reset function that the driver can activate by simply pressing a button when the bot is at the zero position any time during a match. |
|
#11
|
|||
|
|||
|
Re: Reducing Drift in KOP Gyroscope
Our team is looking at using a gyro on the bot next year. The gyro we are looking at using walks down .01 degrees every 2 to 3 seconds. How does this compare to other gyro's teams have used? At begin autonomous just zero the gyro accumulator.
|
|
#12
|
||||
|
||||
|
Re: Reducing Drift in KOP Gyroscope
Quote:
If you consider the duration of the autonomous period (15 sec.) and assume a drift of 0.01 degrees every 2 sec. (the worst case of what you reported) you're going to accumulate a total drift of 0.075 degrees. If you can't handle that kind of error, you're doing something wrong. A good rule of thumb to follow with the gyros, reset/zero them any time you know you are stopped (beginning of autonomous). This will reduce the effect the drift has on your reported heading. Also, make sure that your sits still after you turn it on (make sure your drive team understands this). The gyro is calibrated during this time and movement will affect the magnitude of drift you see. Try shaking it around when power is applied to the cRIO and see what happens. Last edited by otherguy : 01-08-2013 at 12:21. Reason: Fixed typo 0.01 deg/sec and associated math. Thanks Ether. |
|
#13
|
||||
|
||||
|
Re: Reducing Drift in KOP Gyroscope
Quote:
Typo. He reported .01 degrees every 2 (or 3) sec. |
|
#14
|
|||
|
|||
|
Re: Reducing Drift in KOP Gyroscope
The gyro we will be using is a Invensense MPU-6050 on a break out board from Sparkfun. The MPU6050 has an on chip motion processing engine and output in quaternions. It takes allot of code to bring up the chip. We are using an Arduino Uno to handle this. We mounted the break out board on a Arduino Proto typing board. We then use the Arduino Ethernet shield to transfer the the data to the c-rio using UDP. The Arduino takes the quaternions and calculates the gravity corrected Yaw, pitch and roll. We also have put single channel encoders on the 2 rear wheels. Hopefully this will give the students enough input to actually do some autonomous navigation. Our swerve drive does not like to go straight and has given us lots of problems in the past. The gyro will also be used to develop field centric swerve control. The students will have a full plate this fall. Work begins next week. As a back up to acquire a high resolution X and Y motion, we have looked at a lazer gaming mouse with a ADNS9500 chip in it. Tracks good on carpet.
|
|
#15
|
|||||
|
|||||
|
Re: Reducing Drift in KOP Gyroscope
When the robot starts up the gyro runs a bias measurement and calculation. During this time the robot must be absolutely still. This process is measuring the offset in the device, which when integrated translates to drift.
We tell our drive team to start up the robot at the last possible moment and make certain that the robot is not bumped or disturbed during this initialization time. The compressor cannot be running during this time if you want the best result. Kevin Watson has some really good code and information about this on his website kevin.org. Look in the FRC code section. It is code from the old IFI controller, but it is very educational. http://kevin.org/frc/ Look in the frc_gyro.zip file. Another helpful trick is to mount the gyro on a mass and mount that in foam. We use a one pound piece of aluminum and some foam that hard disk drives are often packaged in. This acts as a low pass filter and helps smooth out the data. See the attached photo for our arrangement. Keep working with the gyro and accelerometer. You can do some really cool stuff once you understand these devices. Have fun! -Hugh |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|