当前位置:网站首页>Post processing of multisensor data fusion using Px4 ECL

Post processing of multisensor data fusion using Px4 ECL

2022-06-23 05:11:00 Running Orange

Write in the front

  • ecl It is an open source UAV project PX4 Algorithm library used , Use ekf( Extended Kalman filter ) Conduct imu Data fusion of multiple sensors
  • However ecl No data post-processing function is provided
  • Be able to use ecl It is necessary to carry out post-processing of multi-sensor data fusion , This is convenient for parameter debugging , And debugging of secondary development , So as to shorten the development cycle , Reduce development costs
  • In view of the above, the author fork 了 ecl Project , And added post-processing function
  • The basic principle when adding post-processing functions is , Try not to change ecl Any code for , In fact, no code files have been changed
  • In fact, the whole change is just CMakeLists.txt The following line has been added to the
add_subdirectory(airdata)
add_subdirectory(EKF) # 
add_subdirectory(geo)
add_subdirectory(geo_lookup)
add_subdirectory(main) #  This line is newly added 
  • You can see that one is called main The folder of is added to and ekf as well as test Etc , This folder contains all the required for the post - generation handler CMakeLists.txt And all code files , and ekf Then use add_subdirectory(EKF) # The dynamic library generated by this line
  • Click here to go to... Of this project github Warehouse

introduction

Follow these steps to complete the cloning of the entire project , Generate , Compile and run .

  1. clone Project to local warehouse
git clone https://github.com/akstuki/PX4-ECL.git
  1. ( This step is not necessary ) It is recommended to create a new directory build, It'll be cleaner
mkdir build/
cd build/
  1. Generating project ( Generate makefile file )
$ cmake ..
-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- build type is RelWithDebInfo
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-496-g5ca644e
-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/f/1-own/0-code/0alforithmCode/px4/ecl/PX4-ECL/build
  1. Compile to generate runnable files
$ make
Scanning dependencies of target matrix
[  2%] Completed 'matrix'
[ 21%] Built target matrix
Scanning dependencies of target prebuild_targets
[ 21%] Built target prebuild_targets
[ 26%] Built target ecl_airdata
[ 31%] Built target ecl_geo_lookup
[ 36%] Built target ecl_geo
[ 89%] Built target ecl_EKF
Scanning dependencies of target postEcl
[ 92%] Building CXX object main/CMakeFiles/postEcl.dir/main.cpp.o
[ 94%] Building CXX object main/CMakeFiles/postEcl.dir/csvparser.cpp.o
[ 97%] Building CXX object main/CMakeFiles/postEcl.dir/PostEkf.cpp.o
[100%] Linking CXX executable postEcl.exe
[100%] Built target postEcl
  1. Run the program ( The program only needs one parameter , Namely px4 Log file )
$ ./postEcl.exe 09_26_14_sensor_combined_0.csv
start ecl main...
47634158: reset position to last known position
47634158: reset velocity to zero
51113397: mag yaw fusion numerical error - covariance reset
51534173: EKF aligned, (baro hgt, IMU buf: 12, OBS buf: 9)
57718962: mag yaw fusion numerical error - covariance reset
baro hgt timeout - reset to baro
67032581: mag yaw fusion numerical error - covariance reset
68114987: reset position to last known position
68114987: reset velocity to zero
68114987: stopping navigation
baro hgt timeout - reset to baro
baro hgt timeout - reset to baro
84041372: reset position to last known position
84041372: reset velocity to zero
84041372: stopping navigation
finished.
  1. You can see that an output file is generated after the program runs ecloutput.csv, contain ekf All states
$ ls -l
 Total usage  6848
-rwxrwxr-x+ 1 xiaoqiang xiaoqiang 1492459 9 month   29 2018 09_26_14_sensor_combined_0.csv
-rwxrw-r--+ 1 xiaoqiang xiaoqiang    1025 1 month    4 22:37 cmake_install.cmake
drwxrwxr-x+ 1 xiaoqiang xiaoqiang       0 1 month    5 21:51 CMakeFiles
-rwxrw-r--+ 1 xiaoqiang xiaoqiang 2612997 1 month    5 22:08 ecloutput.csv
-rwxrw-r--+ 1 xiaoqiang xiaoqiang    7687 1 month    5 21:50 Makefile
-rwxrwxr-x+ 1 xiaoqiang xiaoqiang 2889190 1 month    5 21:52 postEcl.exe

Next work

  • Add support framework for more data formats
  • Add parameter configuration interface ( Perhaps in the form of a configuration file )
  • in addition , Can be CMakeList.txt Put it on the outer layer , hold ecl With external How to import ( This method will not be considered for the time being )
原网站

版权声明
本文为[Running Orange ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206230127228990.html