RTIMULib2 icon indicating copy to clipboard operation
RTIMULib2 copied to clipboard

Covariance Matrix not Generated.

Open adityasivaraj opened this issue 3 years ago • 6 comments

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?

adityasivaraj avatar Jan 22 '22 05:01 adityasivaraj

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

HongshiTan avatar Jan 23 '22 06:01 HongshiTan

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?

adityasivaraj avatar Jan 23 '22 11:01 adityasivaraj

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.

HongshiTan avatar Jan 28 '22 02:01 HongshiTan

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!

adityasivaraj avatar Jan 28 '22 04:01 adityasivaraj

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.

SivertHavso avatar Feb 27 '22 14:02 SivertHavso

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.

brightproject avatar Nov 20 '23 01:11 brightproject