It can take a rosbag of IMU data and in a few minutes compute the white noise sigma and bias random walk sigma, producing a yaml file compatible with Kalibr.
Unlike existing tools I use rosbag::View in C++ to efficiently open and iterate through a rosbag. Let me know your thoughts here or on the Github repo.
Thank you for this tool, it’s amazing! I’ve been digging into the IMU calibration rabbit hole for the past week, and your package is a godsend.
Many people seem to use gaowenliang/imu_utils to estimate the IMU parameters, so that was my starting point as well. There are a couple of problems with that package though. Coupled with the fact that there are half a dozen synonyms for the IMU parameters used in datasheets and the literature, it took me way too long to figure all of that out:
It only prints out White Noise (N) and Bias Instability (B), but doesn’t print out Random Walk (K), even though it estimates it.
For white noise, it doesn’t actually give you N, but instead N \cdot \sqrt{f}, where f is the IMU sampling frequency (in other words, it already converts the continuous-time noise density into a discrete-time standard deviation).
The units in the README are incorrect. The units seem to indicate that the estimated parameters are in fact continuous-time white noise (N) and random walk (K), but they are instead discrete-time white noise and bias instability (B). Nevertheless, there are plenty of tutorials online that recommend using those values from imu_utils to estimate N and K (even in the MYNTEYE SDK documentation).
The code littered with magic constants (57.3, 0.6642824703) without providing any explanation of what they are or how they are derived, and it constantly switches units internally between degrees, rad, seconds and hours, and any combination of them.
The whole package is basically undocumented. It also sometimes uses the variable names Q, N, B, K and R for something slightly different than what they mean in the literature, so you need a conversion to get the real value of those parameters.
Your package has none of those problems. If you had published your package a week earlier, it would have saved me a lot of headaches.
Here are some more resources on IMU calibration that I dug up last week. Perhaps you find them useful in case you want to extend your package.
aewallin/allantools is a python library that implements lots of Allan variance related statistical models. It doesn’t have any of the IMU specific analysis functionalities though.
nmayorov/allan-variance estimates the IMU parameters using a different approach to your repo (by fitting a linear least squares function of the parameters to the Allan variance plot; this is the same approach that imu_utils uses).
@Martin_Guenther Thanks for the feedback! And for the great resources! Understanding IMU noise parameters has definitely given me a headache at times with all the different units, variables and conventions.