RANSAC 随机采样一致性算法的实现
1、Ziv Yaniv
https://www.yanivresearch.info/
2、 TotoroJason
https://github.com/TotoroJason/RANSAC
3、MRPT
1、Ziv Yaniv
https://www.yanivresearch.info/
2、 TotoroJason
https://github.com/TotoroJason/RANSAC
3、MRPT
OriginLab
Performing FFT to a signal with a large DC offset would often result in a big impulse around frequency 0 Hz, thus masking out the signals of interests with relatively small amplitude.
Origin provides two methods to remove DC offset from the original signal before performing FFT:
Note that these two methods can get the same result. You can also not filter the input, but set zero to the zero frequency point for FFT result.
Any DC bias on the signal will show up in the frequency domain as amplitude at zero Hz, by setting the cutoff frequency to be zero DC offset can be filtered. Steps are as following:
Highlight the source signal column Amplitude, and select menu Analysis: Signal Processing: FFT Filters.
In the pop-up dialog, choose High Pass for Filter Type, uncheck Auto checkbox to set Cutoff Frequency to zero and clear the Keep DC offset check-box.
Highlight column C, and select Set Column Values from the context menu to bring up the Set Values dialog.
In Before Formula Scripts panel of the Set Values dialog, put the script:
stats col(b);
Then in the column formula text box, fill column C using the formula:
col(b)-stats.mean
Tips:
If you need to get the DC offset, open the dialog mentioned in method one, then use the low-pass filter, and set Cutoff Frequency to zero, or use the Mean function to calculate the mean of the signal:
DCOffset = Mean(col(B));
一、采集IMU数据
将IMU静止放置,然后采集至少3小时以上的数据用于分析IMU的随机误差,当然记录的数据越多,标定的精度越高。
二、编译bagconvert(kalibr_allan)
根据自己matlab安装的路径,修改文件: cmake/FindMatlab.cmake
例如:
修改前: find_program(MATLAB_EXE_PATH matlab PATHS /usr/local/bin)
修改后: find_program(MATLAB_EXE_PATH matlab PATHS /home/flmxi/INSTALL_Matlab/bin)
修改cmake后按照常规的cmake编译流程即可。
三、数据格式转换(rosbag -> mat)
利用第二步编译的结果:bagconvert,将rosbag格式文件转换为matlab的***.mat矩阵文件。
bagconvert <rosbag文件> <IMU topic>
例如:
devel/lib/bagconvert/bagconvert ~/Downloads/imu_xsens.bag /imu/data
命令执行完成后,生成matlab的mat矩阵文件,例如: ~/Downloads/imu_xsens.mat。
四、执行allan方差分析
根据第三步的生成结果所在的路径,修改matlab脚本文件:SCRIPT_allan_matparallel.m,
mat_path = '~/Downloads/imu_xsens.mat';
用命令行或图像界面运行脚本: SCRIPT_allan_matparallel.m,完成allan方差分析
allan方差分析完成后生成matlab矩阵文件:results_20240812T163428.mat
五、绘制allan方差图
根据第四步的结果文件: results_20240812T163428.mat,修改matlab显示脚本: SCRIPT_process_results.m
mat_path = '../data/results_20240812T163428.mat';
然后用命令行或图形界面执行脚本:SCRIPT_process_results.m
结果如下:
double min_cost = std::numeric_limits< double >::max();
double min_cost = std::numeric_limits< double >::min();
template< class T > class numeric_limits;