Open raomin opened 6 years ago
I'm actually running into the same exact issue (same mcu, too). Still debugging, but my hunch is that it's the function that converts the quaternion values from integer math to floats. The raw values seem legit, but go to INF after the call to qToFloat()
Yeah, confirmed. I'll try to get a PR open when I have a minute, but edit MPU9250_DMP::qToFloat
and change the integer literals from 1
and 2
to 1L
and 2L
, respectively. That got it working for me.
Good spot! It does return some values now... but the values are weird: 0.5847,2.2581,2.6837,2.9126
Values should stay within [-1,1] and it's not just off by +2... Do you observe the same in your setup? seems related to https://github.com/sparkfun/SparkFun_MPU-9250-DMP_Arduino_Library/issues/15
I don't see that on mine.. not sure how it's different from yours
Hello everyone. I am also facing the same issue. DId anyone get the solution
Yeah, confirmed. I'll try to get a PR open when I have a minute, but edit
MPU9250_DMP::qToFloat
and change the integer literals from1
and2
to1L
and2L
, respectively. That got it working for me.
Hey kolosy Just wanted to say thank you. I've been looking for a way to read this IMU for about 1 month now. With your solution everything works. Thank you so much and have a great day ^^
I'll close this issue as @kolosy found a solution for the NAN.
@raomin I'd recommend keeping it open until it's actually fixed in the codebase...
good point.
I ran MPU9250_DMP_Quaternion.ino without any problem on an ESP8266. Now I want to use it on a Arduino Mega 2560 and it returns the following:
MPU9250_DMP_Gyro_Cal.ino works correctly on the same Arduino Mega 2560.
I tried DMP_FEATURE_6X_LP_QUAT and DMP_FEATURE_LP_QUAT both gives the same.
Also, dmpBegin returns INV_SUCCESS.
I also tried with Wire.setClock(400000), no success...
Any idea what could cause this issue?