Giter Site home page Giter Site logo

Yaw Pitch Roll Estimation about mpu9250 HOT 10 OPEN

kriswiner avatar kriswiner commented on July 28, 2024
Yaw Pitch Roll Estimation

from mpu9250.

Comments (10)

kriswiner avatar kriswiner commented on July 28, 2024

Sounds like your mag is not properly calibrated. If you plot Mx vs Mz gathered while moving the magnetometer in a figure eight, do you get a spherical cloud of points?

from mpu9250.

akhilmohan4487 avatar akhilmohan4487 commented on July 28, 2024

Magneto XZY data.txt
Hello,
I have attached the magnetometer data in XZY sequence after one time calibration. Can you take a look and tell me what is wrong, I am not able to plot the data in a convenient way.

Thanks and Regards,
Akhil

from mpu9250.

kriswiner avatar kriswiner commented on July 28, 2024

Try excel.

-----Original Message-----
From: Akhil Mohan [mailto:[email protected]]
Sent: February 11, 2016 2:01 AM
To: kriswiner/MPU-9250
Cc: Kris Winer
Subject: Re: [MPU-9250] Yaw Pitch Roll Estimation (#41)

Magneto XZY data.txt
https://github.com/kriswiner/MPU-9250/files/126151/Magneto.XZY.data.txt
Hello,
I have attached the magnetometer data in XZY sequence after one time
calibration. Can you take a look and tell me what is wrong, I am not able to
plot the data in a convenient way.

Thanks and Regards,
Akhil

Reply to this email directly or view it on GitHub
#41 (comment) .
<https://github.com/notifications/beacon/AGY1qlIl4PTIrB5GkXysJltddkx1Ydyoks5
pjFNUgaJpZM4HXnV3.gif>

from mpu9250.

akhilmohan4487 avatar akhilmohan4487 commented on July 28, 2024

calibrated mag result

calibrated mag result2

calibrated mag result3

I am not able to interpret the meaning fully, its not centered wrt origin. What is your opinion on the result ?

from mpu9250.

kriswiner avatar kriswiner commented on July 28, 2024

Was this data taken while you were moving the sensor in a figure eight
motion to sample the entire response surface?

If so it shows a very biased magnetometer response. You need to calculate
the offsets and apply them to the subsequent data in order to recenter the
response surface on the origin.

There is no way you are going to get sensible results with this kind of poor
calibration.

See:
https://github.com/kriswiner/MPU-6050/wiki/Simple-and-Effective-Magnetometer
-Calibration

-----Original Message-----
From: Akhil Mohan [mailto:[email protected]]
Sent: February 12, 2016 1:45 AM
To: kriswiner/MPU-9250
Cc: Kris Winer
Subject: Re: [MPU-9250] Yaw Pitch Roll Estimation (#41)

calibrated mag result
<https://cloud.githubusercontent.com/assets/5743851/13003359/33892b3c-d19b-1
1e5-9161-f6a3a35f2523.png>
I am not able to interpret the meaning fully, its not centered wrt origin.
What is your opinion on the result ?

Reply to this email directly or view it on GitHub
#41 (comment) .
<https://github.com/notifications/beacon/AGY1qvPoTtOjOo26xwjs9T4yPtkGqWcOks5
pjaEigaJpZM4HXnV3.gif>

from mpu9250.

akhilmohan4487 avatar akhilmohan4487 commented on July 28, 2024

Yes, the data is taken while movement as you suggested. I followed the wiki article you suggested and have already implemented. Instead of each time calibrating. I have taken data once and cakculated the hard iron and soft iron biases. The hard irn is then converted to mG and is being constantly subtracted. Thisbis then multiplied by the soft irin scale factor. The plot obtained is after akl this work. So what do you think the mistake that i have done?

from mpu9250.

akhilmohan4487 avatar akhilmohan4487 commented on July 28, 2024

Sorry lots of typo error,am using phone.

from mpu9250.

kriswiner avatar kriswiner commented on July 28, 2024

I don't know what the problem is. Once you have the biases, you should be
able to subtract them from the subsequent data and get cloud of points
centered at the origin. Sounds like either the scaling or subtraction is
wrong.

-----Original Message-----
From: Akhil Mohan [mailto:[email protected]]
Sent: February 12, 2016 9:16 AM
To: kriswiner/MPU-9250
Cc: Kris Winer
Subject: Re: [MPU-9250] Yaw Pitch Roll Estimation (#41)

Sorry lots of typo error,am using phone.

Reply to this email directly or view it on GitHub
#41 (comment) .
<https://github.com/notifications/beacon/AGY1qtpNzk30DIkbJ6Ox8q3aKXhA_G13ks5
pjgrBgaJpZM4HXnV3.gif>

from mpu9250.

akhilmohan4487 avatar akhilmohan4487 commented on July 28, 2024

I have recorded the data once moving in some possible combinations covering the 3D space and then obtained the biases. Each time when a magneto read a data, the biases are removed (one time calibration). But still my estimation of YPR is not correct. The sequence right now to the filter is,
Filter (ax,ay,az,gx,gy,gx,my,mx,mz) where gyro are in rad/s. I feel it should be my,-mx and mz but that also is not giving me a good result. The quat is converted to rotation matrix and then used to determine Y, P and R. I am not sure what mistake I am making now.
magneto_calib_1
magneto_calib_2
magneto_calib_3

from mpu9250.

kriswiner avatar kriswiner commented on July 28, 2024

Hi Akhil,

It looks like you have the mag more or less properly calibrated.

You can read about the use of the North-East-Down convention here:

https://github.com/kriswiner/EM7180_SENtral_sensor_hub/wiki/C.-Managing-the-
Configuration-File

which could help you choose the proper order to pass the sensor data to the
Madgwick algorithm.

Additionally, this is how I go from quaternions to YPR:

Heading = atan2[(Qx2 - Qy2 - Qz2 + Qw2), 2(QxQy + QzQw)]
Pitch = asin[-2(QxQz - QyQw)]
Roll = atan2[(-Qx2 - Qy2 + Qz2 + Qw2), 2*(QxQw + QyQz)]

Even with everything correct you shouldn't expect heading accuracy much
better than four or five degrees with this simple algorithm.

Kris

-----Original Message-----
From: Akhil Mohan [mailto:[email protected]]
Sent: February 17, 2016 12:38 AM
To: kriswiner/MPU-9250
Cc: Kris Winer
Subject: Re: [MPU-9250] Yaw Pitch Roll Estimation (#41)

I have recorded the data once moving in some possible combinations covering
the 3D space and then obtained the biases. Each time when a magneto read a
data, the biases are removed (one time calibration). But still my estimation
of YPR is not correct. The sequence right now to the filter is,
Filter (ax,ay,az,gx,gy,gx,my,mx,mz) where gyro are in rad/s. I feel it
should be my,-mx and mz but that also is not giving me a good result. The
quat is converted to rotation matrix and then used to determine Y, P and R.
I am not sure what mistake I am making now.
magneto_calib_1
<https://cloud.githubusercontent.com/assets/5743851/13103917/e2423f32-d57f-1
1e5-8823-01a281460834.png>
magneto_calib_2
<https://cloud.githubusercontent.com/assets/5743851/13103918/e24615d0-d57f-1
1e5-8648-1a759ae56195.png>
magneto_calib_3
<https://cloud.githubusercontent.com/assets/5743851/13103919/e26e8380-d57f-1
1e5-8f84-4067e7201c50.png>

Reply to this email directly or view it on GitHub
#41 (comment) .
<https://github.com/notifications/beacon/AGY1qoQgRT-zdlJ5cwyLNIDqLuV2p5ndks5
plCkCgaJpZM4HXnV3.gif>

from mpu9250.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.