View Single Post
  #4   Spotlight this post!  
Unread 05-04-2013, 10:02
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Delay after resetting Gyro

If the maneuvers are rapid-fire (meaning your robot is not sitting still for any significant period of time), then resetting the gyro between moves does not buy any protection against drift. However, if you're sitting still for a long period of time, then resetting the gyro immediately before the next move will cancel any drift that occurred while sitting still.

We haven't experienced any more than about 0.5 degree of drift throughout the 15 seconds of autonomous, so we don't even bother doing any resets after auton starts.

I personally don't like the gyro zeroing routine being a black box - your original post seems to show that you've experienced why I don't like it. We actually just read the raw analog voltage and we do our own zeroing routine and integration. My day job involves doing a lot of work with gyros and accelerometers so I feel pretty comfortable doing that, and I was able to guarantee that the zeroing and reset works how I want it to (and it gave me a great reason to show the students a little about calculus and sensors).

If you don't feel like writing your own gyro code, then a good workaround might be to create a separate "maneuver" that is just a gyro reset while sitting still. Do all of the rapid-fire maneuvers without the reset. Then immediately after your sit-still-and-shoot maneuver, call the gyro reset maneuver (which incorporates the 100 ms delay), followed by your next maneuver.

(Note: apalard actually re-wrote a lot of the WPI LabVIEW library for his team. I didn't have the patience for that - I could do my own gyro code in about 5 minutes which is a lot less time than it would take me to figure out what's going on in the WPI lib.)
__________________
-
An ounce of perception is worth a pound of obscure.
Reply With Quote