|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
KOP Gyro steadily decreasing
We were fooling around with a gyro, but as we print gyro.getAngle, we've noticed the angle steadily increasing as the robot sits. We've had this problem before in previous years, but we can't remember what we did to mitigate the issue. Any suggestions?
|
|
#2
|
||||
|
||||
|
Re: KOP Gyro steadily decreasing
Reset the gyro as often as possible in the code. The gyro we use for targeting we reset right before we move the robot so there's less time for error to develop.
|
|
#3
|
||||
|
||||
|
Re: KOP Gyro steadily decreasing
The gyro naturally accumulates error due to drift. The getAngle() it sends back is an accumulation in rate of change of angle. Error accumulates every time the gyro finds this. I agree with resetting the gyro as much as possible. There is a good white paper on gyros as well that you should read if you haven't in the following link.
http://team358.org/files/programming...rFRCRobots.pdf |
|
#4
|
||||||
|
||||||
|
Re: KOP Gyro steadily decreasing
what rate does it drift? a few degrees in 15 seconds is a reasonable rate for an FRC gyro.
|
|
#5
|
|||
|
|||
|
Re: KOP Gyro steadily decreasing
As mentioned, gyros are not perfect or magic. They are a sensor circuit and are affected by a number of real-world issues such as electrical noise, temperature, and operating procedures.
Electrical noise: The heart of the sensor is an element that affects the voltage of the circuit proportional to rotational movement. Electrical noise and power dips on the input circuit look like rotation. Temperature: The sensor's gain changes with temperature. When you boot the robot, it calibrates. If the temperature changes substantially, the sensor's assumptions are off and it will increase drift. The data sheet should indicate the amount of the temperature effect. Procedures: It is important that the robot be steady when the program boots because it is measuring for a few seconds to identify what voltage correlates to a rotation of 0. If the robot is moving at this point, the assumptions are wrong and the gyro will spin at the opposite of that "zero" rate. Another procedural issue is that the gyro has an upper limit on rotation. If you exceed this limit, it under-reports the rotation and throws off your idea of where the robot is pointing. With all of these issues handled correction, it will drift, but for short periods of time, like during auto, or when aiming, you can use it for relative turning measurements. Greg McKaskle |
|
#6
|
|||
|
|||
|
Re: KOP Gyro steadily decreasing
Thanks for the responses, guys.
Quote:
By the way, MagiChau, thanks for the whitepaper. It is exceptionally informative. Quote:
|
|
#7
|
||||
|
||||
|
Re: KOP Gyro steadily decreasing
Quote:
|
|
#8
|
|||
|
|||
|
Re: KOP Gyro steadily decreasing
Hence my confusion. To reset every iteration of testPeriodic(), autoPeriodic(), or teleopPeriodic() would reset my current frame of reference every 20ms. When would you suggest resetting the gyro, so that the drift is minimized, but the reference is functionally unchanged?
Last edited by brennonbrimhall : 20-02-2013 at 09:39. Reason: Clarification |
|
#9
|
||||
|
||||
|
Re: KOP Gyro steadily decreasing
Quote:
Quote:
|
|
#10
|
|||
|
|||
|
Re: KOP Gyro steadily decreasing
Thanks for the suggestions. Ether, for the purposes of autonomous driving, would you just ignore the sensor drift because of the short time span?
|
|
#11
|
||||
|
||||
|
Re: KOP Gyro steadily decreasing
Quote:
|
|
#12
|
||||
|
||||
|
Re: KOP Gyro steadily decreasing
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|