-
Notifications
You must be signed in to change notification settings - Fork 470
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
Yaw values are not precise #489
Comments
The first question to ask is, how well are your sensors calibrated and how
do you know?
…On Thu, Jun 29, 2023 at 12:56 AM Taieb Zbaiba ***@***.***> wrote:
Hi kris , I can't get precise yaw values on my mpu-9250 , I'm using
Madgwick filter for sensor fusion , I tried changing sample rates
parameters yet yaw values seem to drift for low sample rates values and for
high sample rate I lose so much precision .
—
Reply to this email directly, view it on GitHub
<#489>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKTEAJY3X332M73LDLDXNUYLTANCNFSM6AAAAAAZYEON2Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I tend to calibrate my sensors by measuring biases everytime I connect the device and as for how I test it is I put my sensor on a certain position for a while , measure offsets so it becomes my zero , do random movements and rotations and then put the sensor back into that zero position . |
And how do you calibrate the mag?
…On Thu, Jun 29, 2023 at 9:20 AM Taieb Zbaiba ***@***.***> wrote:
I tend to calibrate my sensors by measuring biases everytime I connect the
device and as for how I test it is I put my sensor on a certain position
for a while , measure offsets so it becomes my zero , do random movements
and rotations and then put the sensor back into that zero position .
—
Reply to this email directly, view it on GitHub
<#489 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKV66QFTT6C4Y4OVQ2TXNWTL3ANCNFSM6AAAAAAZYEON2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The next thing to check is what orientation convention are you using? NED
or ENU? Are you passing the scaled sensor data to the Madgwick algorithm in
the proper order for one of these?
On Thu, Jun 29, 2023 at 9:49 AM Tlera Corporation ***@***.***>
wrote:
… And how do you calibrate the mag?
On Thu, Jun 29, 2023 at 9:20 AM Taieb Zbaiba ***@***.***>
wrote:
> I tend to calibrate my sensors by measuring biases everytime I connect
> the device and as for how I test it is I put my sensor on a certain
> position for a while , measure offsets so it becomes my zero , do random
> movements and rotations and then put the sensor back into that zero
> position .
>
> —
> Reply to this email directly, view it on GitHub
> <#489 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABTDLKV66QFTT6C4Y4OVQ2TXNWTL3ANCNFSM6AAAAAAZYEON2Q>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
I collect mag data for about 15 seconds , I rotate my sensor in every axis , I measure average mag biases and scale values in each axe based on collected data then store them for the main program |
I guess you're referring to this issue #368 , I am passing these as parameters for my madgwick algorithm , I tried removing the (-) from mz out of curiosity and it gives way worse values. madgwick(ax, ay, az, gx, gy, gz, mx, my, -mz, q); |
Yes, the issue is that the Madgwick algorithm expects the sensor values
that conform to the NED convention, so after you select which gyro axis you
want to be North, then pass the sensor data into the Madgwick function as
aN, aE, aD, gN, gE, gD, mN, mE, mD...the gyro and accel have the same axis
orientation but these are different from the mag. Once you get this sorted
out you should have much better results.
The last item is the speed of the sensor fusion relative to the sensor data
sample rate. For good results, the sample rate should be 200 - 500 Hz, the
low pass filter should be 0.1-0.2 x the sample rate, and the fusion rate
should be ~>10x the sample rate. So running on a CM4F or better, like a
Teensy 3.X or STM32L4/F4, etc
On Fri, Jun 30, 2023 at 6:10 AM Taieb Zbaiba ***@***.***>
wrote:
… The next thing to check is what orientation convention are you using? NED
or ENU? Are you passing the scaled sensor data to the Madgwick algorithm in
the proper order for one of these? On Thu, Jun 29, 2023 at 9:49 AM Tlera
Corporation *@*.
*> wrote: … <#m_5520497047890332383_> And how do you calibrate the mag? On
Thu, Jun 29, 2023 at 9:20 AM Taieb Zbaiba @.*> wrote: > I tend to
calibrate my sensors by measuring biases everytime I connect > the device
and as for how I test it is I put my sensor on a certain > position for a
while , measure offsets so it becomes my zero , do random > movements and
rotations and then put the sensor back into that zero > position . > > — >
Reply to this email directly, view it on GitHub > <#489 (comment)
<#489 (comment)>>,
> or unsubscribe >
https://github.com/notifications/unsubscribe-auth/ABTDLKV66QFTT6C4Y4OVQ2TXNWTL3ANCNFSM6AAAAAAZYEON2Q
> . > You are receiving this because you commented.Message ID: > *@*.***>
>
I guess you're referring to this issue #368
<#368> , I am passing these as
parameters for my madgwick algorithm , I tried removing the (-) from mz out
of curiosity and it gives way worse values. madgwick(ax, ay, az, gx, gy,
gz, mx, my, -mz, q);
—
Reply to this email directly, view it on GitHub
<#489 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKROYNMF7QCOF3A5AMDXN3F4ZANCNFSM6AAAAAAZYEON2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I tried ENU and NED , ENU seems to be more working for me , NED more drifty and I lose the origine (the zero value orientation) |
Not sure then what the problem might be. I would expect better than ~10
degree rms heading accuracy with proper calibration. Perhaps there are
environmental sources affecting the orientation estimation? Some sources of
emf like iron hardware or laptop, etc?
…On Tue, Jul 11, 2023 at 5:06 AM Taieb Zbaiba ***@***.***> wrote:
I tried ENU and NED , ENU seems to be more working for me , NED more
drifty and I lose the origine (the zero value orientation)
the problem for me is that for small angles it works decently , for big
angles like 90 i get 130 , (always for yaw values)
Although I modified all sample rates , low pass filters according to your
suggestion . As far the processor I'm working with ESP32-C3 32-bit RISC-V
@160MHz.
—
Reply to this email directly, view it on GitHub
<#489 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKTCYWBJMAOWHTL4SWTXPUQTPANCNFSM6AAAAAAZYEON2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi kris , I can't get precise yaw values on my mpu-9250 , I'm using Madgwick filter for sensor fusion , I tried changing sample rates parameters yet yaw values seem to drift for low sample rates values and for high sample rate I lose so much precision .
The text was updated successfully, but these errors were encountered: