Go to Post first post and the FRC "well what is a stick" comes in. Toothpick, does it need to be round, does a carbon fiber chain of Buckie balls count as a stick. CD posters are sooooo predictable. - Foster [more]
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 47 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #13   Spotlight this post!  
Unread 22-03-2015, 19:49
Richard100 Richard100 is offline
Registered User
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Southern Maryland
Posts: 79
Richard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to behold
Re: Got Gyro drift? Try Sensor Fusion !

Phil -

You might like this ... I developed a new vi to constantly re-calibrate the gyro while the robot is in Disabled Mode. It is integrated into this updated IMU Demo Project, see the True case within the IMU Read Loop for the new vi "IMU ZeroBias". Alternatively, you could use this vi within the Disabled.vi if you like, I just implemented it all within Periodic tasks. Here, you would simply use the existing "Robot Mode" variable to drive the case structure within the IMU Read Loop.

IMU ZeroBias will read a sample set of measurements from each axis for Gyro calibration. Samples are placed into a circular buffer to maintain the most recent period of samples, used to compute the most current zero rate bias. The intent is to constantly update the Gyro rate bias (during Disabled Mode, which is assumed to satisfy the condition that the sensor is not moving). This ensures we have the best possible calibration available immediately prior to the termination of Disabled Mode (DM), effectively dealing with the Gyro's thermal stabilization and the uncertainty in the variation of how long DM may persist from one match to the next - this way you always start with a 'fresh' cal even if it takes 10 minutes for a field start.

If excessive variation in the circular buffer's dataset is detected, the gyro calibration is not updated, and automatically retains the last good calibration until the situation improves. In this way the code will logically adapt to both the delay before match start and any errant movement while Disabled that would otherwise spoil the cal - and your 32 point Autonomous. You can watch the IMU ZeroBias Front Panel to observe this behavior ... watch the constant calibration updates during DM, then bump it to see it freeze on the last good cal until both the physical disturbance is over and the bad data is removed from the circular buffer.

So ... this is the best way I can think of, for the moment. A repeating IMU Open is probably no-go since the I2C bus needs to be closed first.

Only caveat is I haven't been able to test this as much as I normally would like ... see it if works for you and let me know if you see any issues. See you at Chesapeake?
Attached Files
File Type: zip AdaIMU roboRIO v2.zip (1.78 MB, 39 views)

Last edited by Richard100 : 22-03-2015 at 20:01.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi