[Learning Record] IMU internal parameter calibration: Allan variance and code

This article is only used to record some summary of my own learning process of IMU internal parameter calibration.

reference

About IMU parameters:
Gyroscope Part 1: Meaning of gyroscope parameters and engineering conversion

About Allan variance:
Theoretical basis of multi-sensor fusion positioning (3): Inertial device error analysis
IMU noise parameter identification-Allan variance

Code: imu_utils

https://github.com/gaowenliang/imu_utils

Instructions:

1. Record rosbag data.
The node that starts imu publishes imu data and records it with rosbag. Keep the IMU still during the recording process.
The recording time is recommended to be >2h, otherwise the recognition will be inaccurate. The data volume is not bad, my 100hz IMU recorded for 2 hours and only had less than 300M.

2. Download the code and compile it.
According to the documentation of imu_utils, download imu_utils and the code codes_utils that the author depends on , and put them together in the same workspace for compilation.
When compiling by myself, I encountered the following two errors:

“backward.hpp” No such file…
Solution: Modify the header file “backward.hpp” -> “code_utils/backward”. See issue11 for details

/usr/lib/x86_64-linux-gnu/libapr-1.so.0: undefined reference to `uuid_generate@UUID_1.0'
Solution: Modify bashrc, disable anaconda, delete the build path, and recompile. See for details: Resolving libapr-1.so.0: undefined reference to 'uuid_generate@UUID_1.0'

3. Modify the configuration file
to modify any launch file. The main modifications are: 1. The name of the imu topic; 2. The duration (you can see what this variable in the code does, specifically after the timestamp reaches this value (in minutes), Analyze the received data. Therefore, if the set time is longer than the actual recording, you cannot enter the subsequent analysis part) 4. Insert image description here
Run
First open the calibration launch, and then play the recorded rosbag data. You can use -rparameters to speed up;

rosbag play -r 200 xxx.bag
roslaunch imu_utils A3.launch

5. Output results
The final calibration results are generated in the command line and data/path to a yaml file.

If you want to draw an Allan curve, you can run scripts/draw_allan.mthis matlab script and replace the file names of all paths with the "imu_name" parameter of the launch configuration file during runtime. The output is as follows:
Insert image description here

summary

The whole process went smoothly and was completed in one day. It doesn't feel difficult and all the tools work well.

Guess you like

Origin blog.csdn.net/tfb760/article/details/129142242