View Single Post
  #22   Spotlight this post!  
Unread 30-10-2014, 03:00
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Best gyro for frc.

Quote:
Originally Posted by seg9585 View Post
Austin -- my reply was directed towards the recommendation of using the EVAL-ADXRS642Z, which appears to be an analog output.
That's what I get for assuming that I knew what chip was on the eval board... Sorry...

Quote:
Originally Posted by seg9585 View Post
I asked my questions earlier related to the ADXRS453 for which you provided at least some of the information I need to help initialize the gyro in the SPIDevice class. So thank you -- but I do have another question: the FRC-provided Gyro class performed a calibration within its Constructor that, to my understanding, calculated the drift bias it needed to apply to its integrator. It performed the calibration by taking a seconds-long sample of "still" data and averaging the values to find an offset. Did you have to perform a similar activity in your Robot Init method?
We do perform a similar activity. We average 5 seconds worth of data to figure out the offset at startup. This happens currently on our co-processor.

Since the calibration will happen on the roboRIO next year for us, I'd like to improve this process by saving the last 5 seconds of gyro values, and doing the averaging the first time the robot is enabled. I learned this trick from Kiet from the Holy Cows. This lets you not worry about keeping the robot still while booting.

Last time I benchmarked the Gyro class in 2011, I found a horrible lag between angle changes as measured by the encoders, and and angle changes measured by the Gyro class. I was seeing ~0.1 seconds of lag. This was destroying my phase margin and making it very hard to tune the loops. I banged my head against this for about a month before figuring out what was wrong. I've since become very cautious about gyros and how we use them. This was with the KOP gyro and WPILib Gyro class. That lead to us to use ADXRS453, and we have been very pleased since with it's performance.