Closed lxc5720 closed 4 months ago
Thanks for your interest in VQF! Without further information, it's hard to come up with potential causes for the disagreement. Can you tell me a bit more about what you are testing and what your plot shows? For example:
I am very grateful to get your reply. Here is my answer to your question:
Thanks! That already helps. Some thoughts:
VQF.quatMultiply(VQF.quatConj(out.quat6D(1,:)), out.quat6D(i,:))
.quat2angle
function works and I cannot know what your IMU module is doing, but I would try to see if changing the rotation order makes sense. At least try the reverse, 'ZYX', but maybe even systematically try all 12 possible rotation orders.When you compare the Euler angles, you have to keep two things in mind:
Is there any update on this?
Sorry, I just saw your message. I tried another data and replaced quatern2euler(out.quat6D) with quatern2euler(quaternConj(out.quat6D)). quaternConj solves for the conjugate of the quaternion, and in this kind of, achieves a similar output to the imu module.
Also, I used Mahony and Madgwick algorithms, and you can see that the output of Madgwick is closer to the output of the imu module.
For the original data, I tried as per your suggestion but still could not obtain similar output as imu module.
Good to hear that the results for the second dataset look plausible and that my suggestion to invert the orientation seemed to have helped.
I don't know what kind of module you are using, but it's not unlikely that Madgwick's algorithm or something similar is used to estimate the orientation. If this is the case, it's not surprising that the obtained angles agree better. In order to really see which algorithm is more accurate, you would need a proper ground truth like marker-based optical motion capture.
For the first dataset, I would recommend to try to understand where the initial divergence of around 2° comes from and why the output of your IMU module does not have it. I'm quite sure you will be able to see this angle if you average the first few accelerometer measurements and calculate the angle between this vector and [0 0 1].
If you think that the raw data does not show this angle of around 2°, feel free to upload the raw accelerometer and gyroscope data and I will take a look.
hi @dlaidig Thanks for your great works and released code! When I tried to use my own imu to collect data for testing, I found a gap between the algorithm using VQF and the real value, I assure you that my inputs meet the needs of your algorithm (e.g. m/s^2, rad/s, etc.), but I don't understand what causes this gap. I hope to get your reply.![vqf](https://github.com/dlaidig/vqf/assets/68238668/c20ba000-41ed-45ea-844b-bf0585920671)