Clear Filters
Clear Filters

BeagleBone Blue MPU9250 IMU does not return Euler Angles/Quaternions in DMP Mode

20 views (last 30 days)
Hello,
For: Simulink Coder Support Package for BeagleBone Blue Hardware
In: IMU MPU9250 Block, when operated in DMP mode, the block outputs 0 for both Euler and Quaternions.
Furthermore the 3rd value of the magnetometer array is 0 as well in DMP mode.
When operated in random mode the magnetometer outputs all data.
It is hence suspected that the block is configured to read wrong registers in DMP mode.
Any help is appreciated, Thanks!
  1 Comment
Roderick Schildkamp
Roderick Schildkamp on 25 Mar 2022
Edited: Roderick Schildkamp on 25 Mar 2022
Hi Sebastian,
I do not have a solution (yet), but I wanted to let you know I am experiencing the same issue on multiple BeagleBone Blues. I have submitted a bug report and in touch with MathWorks support.
Have you had any luck?
Best,
Roderick
EDIT: I got this question from support, but just to double check, you did calibrate the IMU using the calibrateAccel, calibrateGyro and calibrateMag functions, right?

Sign in to comment.

Answers (1)

Sebastian Storz
Sebastian Storz on 28 Mar 2022
So the sultion that worked for me:
It is important to NOT follow the calibrateMag documentation which states to move the IMU in a figure-eight pattern. Instead rotate the IMU about ALL AXES in so each axis can read its maximum deflection and the calibration algorithm can fit its ellipsoid.
For a better insight on the calibration and the magnetometer readings you can SSH into the beaglebone and do some investigation there:
in the terminal execute:
sudo sh /tmp/magCalib.sh
It gave the following error:
> ERROR: center of fitted ellipsoid out of bounds
Indicating that the calibration algorithm failed.
Then run
rc_test_mpu -m
Which will print the IMU data, after the unsuccesful calibration one axis gave "NaN" as seen in teh picture below:
When the calibration was repeated while spinning the IMU in all axes the calibration was succesful and the magnetometer reads all values correctly. And hence all IMU functions worked as expected.
Cheers

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!