-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of Drift,YPR #6
Comments
Adding to the above, can you confirm that l need to #define scale factor, line 77 - 79 and the correct method of doing this, as l put a figure which seems incorrect Xaxis max 16209- -59(offset) =16150 |
Did you ever figure it out? I have perfect drift-free outputs on the official Pololu code, but it's very slow, noisy, and laggy to respond to movements. This guy's (mikeshub) code is extremely fast, but I'm getting constant drift on all 3 axes. I have figured out how to use his calibration for both the magnetometer, and the accelerometer, and I confirmed that I have them completely perfectly calibrated because I took the calibrated magneto and accel outputs (but not the AHRS outputs) while rotating the device around a bunch, and put them on a scatter plot - once I had the correct calibration values, the scatter plot would look like a perfect centered circle. So I know I have the calibration down perfect. But it didn't make any difference at all to the constant drift! All three AHRS outputs - roll pitch and yaw - are just constantly either increasing or decreasing, even though the device itself is perfectly steady, sometimes at a rate of 0.1 to 0.5 degrees per second. That's not useable in any situation. And how the heck is the yaw value drifting at all? It's supposed to be tied to the magnetometer! I even went out and bought a second v3 just to be sure I didn't have a broken device, but nope, same issue. I've tried this on both an Arduino Micro and Arduino Uno, using multiple USB cables, computers, and rooms of the house, with no luck. I think this might actually be an issue with timing. I have read that the Mahoney filter (which is what mikeshub's code uses) is extremely sensitive to timing issues, and if it thinks it is getting data faster or slower than your device can output or process data, it will lead to these weird drift effects. Please let me know either here or at moeburn@gmail.com if you ever figure out how to get this guy's code (or anyone else's other than Pololu's official code) working! |
Hi Mike, have been playing with your open and a V3. I have very large drift in Yaw and the pitch and roll are increasing (this is with the IMU sitting stationary)
I did find that my Z axias was -15726 +17611 = +1885/2 = +942, X = -59, Y = -277 .
I have tried with and without Merlins cal defines. I have also played with the accel scale factors, which enabled the roll or the pitch to stop increamenting but not both.
I have also tried changing the Mag gaus (is there a LSB offset to put in?) as well as the Accel g
Were did you get the Accel scale factor from? as it seems different from the data sheet, but this all could be due to me as l have limited programming skills.
What l did like was that compared to The Pololu AHRS which my V3 had up to +-15 yaw difference on some headings when tilted, with your code this was down to +-2, but the Yaw would start stable for a second or 2 then start drifting along with the Roll and Pitch.
Any guidance would be appreciated.
Regards Kevin
The text was updated successfully, but these errors were encountered: