ESKF-GPS-IMU Fusion Project Overview
Introduction
The ESKF-GPS-IMU fusion project focuses on integrating data from Inertial Measurement Units (IMU) and Global Positioning System (GPS) using the Error State Kalman Filter (ESKF). This approach enhances the accuracy of position and orientation estimates compared to using solely IMU data. The images demonstrate the improved accuracy when fusing IMU and GPS data with the ESKF compared to using just IMU data through integration.
Dependencies
To build and run this project, several dependencies need to be installed:
-
Eigen: A C++ template library for linear algebra.
Installation command:sudo apt-get install libeigen3-dev
-
Yaml: A YAML parser and emitter in C++.
Installation command:sudo apt-get install libyaml-cpp-dev
-
Glog: A library that implements application-level logging in C++.
Installation command:sudo apt-get install libgoogle-glog-dev
Compilation
To compile the project, the following steps should be followed:
- Navigate to the project directory:
cd eskf-gps-imu-fusion
- Create a
build
directory:mkdir build cd build
- Run CMake and Make to build the project:
cmake .. make
Execution
To run the project, execute the following command in the terminal:
cd eskf-gps-imu-fusion
./build/gps_imu_fusion ./config/config.yaml ./data
Trajectory Display
After running ./gps_imu_fusion
, a trajectory file will be generated. To visualize it:
cd eskf-gps-imu-fusion/data
python display_path.py
Error Analysis
For error analysis of the trajectory, it is recommended to use the evo toolkit. Here’s how you can use it to compare the generated and ground truth trajectories:
cd eskf-gps-imu-fusion/data
evo_traj tum fused.txt gt.txt gps_measurement.txt -p
Using Alternative Data
If you need to integrate different datasets, you must format your data to match the requirements of this algorithm. Use the examples in the data/raw_data
folder as a guide, ensuring you populate the following files with your IMU and GPS data: accel-0.csv
, gps-0.csv
, gps_time.csv
, gyro-0.csv
, and time.csv
.
Data formatting tips:
- For the IMU, use the front-right-down coordinate system for acceleration and angular velocity.
- For GPS, enter latitude, longitude, and altitude in degrees and meters respectively.
- Collect or generate data starting from a still and near-horizontal plane as much as possible.
Future Improvements (TODO)
- Implement gravity alignment during initialization.
- Add bias estimation during initialization.
- Other enhancements.