HongshiTan / RTIMULib2

9-dof, 10-dof and 11-dof IMU fusion library for Linux systems (development version)
Other
72 stars 240 forks source link

Covariance Matrix not Generated. #7

Open adityasivaraj opened 2 years ago

adityasivaraj commented 2 years ago

After calibrating either using RTQF or Kalman, covariance matrix is not generated. I have tried calibration both through RTIMULibCal and RTIMUDemoGL, and the RTIMULib.ini generated does not contain the covariance matrix for linear acceleration, orientation and angular velocity. Does this library generate the covariance matrices or should it be filled in through some other method?

HongshiTan commented 2 years ago

Yes, the current calibration does not generate the covariance matrix. For Kalman fusion, it will be estimated online.

adityasivaraj commented 2 years ago

Hey @HongshiTan Thanks for your time! Could you explain what you mean by "estimated online"? Do you mean it will be generated while using the library in general using the calibration file?

HongshiTan commented 2 years ago

Hi, sorry for the delay, the calibration file does not contain the covariance matrix. Maybe you can send the detailed algorithm that you refer to so that I can identify the difference for you.

adityasivaraj commented 2 years ago

Hi @HongshiTan. I'm sorry, I think there has been a miscommunication. What I meant to say/ask was, in your first comment you mentioned that for Kalman Fusion, the calibration will be "estimated online". I wanted to know what exactly you meant by "estimated online", and can I use that covariance matrix? Because, in my usage the covariance matrix is always shown to be empty, and I cannot see online generated covariance matrix anywhere. I am not referring to any detailed algorithm.

Thanks in Advance!

SivertHavso commented 2 years ago

Hi @adityasivaraj. I believe you are looking for this matrix: https://github.com/HongshiTan/RTIMULib2/blob/e005545aca39e3a56c618e80eb0ccacb5c0ed137/RTIMULib/RTFusionKalman4.h#L66 Which gets updated in this function: https://github.com/HongshiTan/RTIMULib2/blob/e005545aca39e3a56c618e80eb0ccacb5c0ed137/RTIMULib/RTFusionKalman4.cpp#L132 However, I don't think there's any way of accessing this matrix without modifying the code.

brightproject commented 7 months ago

Hello @HongshiTan, @adityasivaraj and @SivertHavso. I'm using library code RTIMULib for Arduino. But there is no RTFusionKalman4.h file in the Arduino repository There is a simplified (according to the author) filter RTFusionRTQF.h I am also interested in the question about the covariance matrix. As I understand it, the library RTIMULib was written almost 8 years ago and then microcontrollers were not very powerful. Now it is possible to run code with double-precision floating point. Therefore, I would like to try a full-fledged Kalman filter on the Arduino platform.