Skip to content
/ EKF Public

Extended kalman filter implementation.(例子暂时有问题,寒假改)

Notifications You must be signed in to change notification settings

Harry-hhj/EKF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EKF (Extended Kalman Filter)

This project is a C++ implementation of EKF.For the related principles of EKF, please check this tutorial (TODO).

Project environment

  • Eigen
  • Ceres

If you have not installed them, please run the following commands in the terminal, otherwise, you can skip this step.

Eigen can be installed via apt:

sudo apt install libeigen3-dev

Ceres must be compiled and installed through source code.

If Ubuntu cannot find cxsparse or other libs during installation, you need to add the following source:

# First step: Open sources.list
sudo gedit /etc/apt/sources.list
# Second step: Paste the source below to the end of the file
deb http://cz.archive.ubuntu.com/ubuntu trusty main universe
# Third step: Update source
sudo apt update
# Fourth step, enter the dependency installation command to install the dependency
sudo apt-get install liblapack-dev libsuitesparse-dev libcxsparse3.1.2 libgflags-dev libgoogle-glog-dev libgtest-dev

Then download the source code from github and unzip it tar -xzvf <ceres-solves>.tar.gz.

Enter the project directory, follow the steps below to enter commands in Terminal to compile and install.

mkdir build
cd build
cmake ..
make
sudo make install

Usage

The code is header only, but it will rely on some third-party libraries as auxiliary functions.When applied to your project, you only need to include the hpp file in include/.

run-example command

Run the following code to see the output of the sample program:

mkdir build
cd build
cmake .. -DWITH_EXAMPLE=ON -DCMAKE_BUILD_TYPE=Release
make
./example/kf_predictor
./example/ekf_predictor

The example compares the two filters to calculate the derivative of f(x)=kx^2. You will get the output of the program. Draw them in matlab, as shown below:

lab

At the same time, we also draw and compare the output results of the Kalman filter, and we can see the huge advantage of ekf for nonlinear input.

TODO

  • ekf estimate()
  • ukf implementation

Acknowledgement


Author: Harry-hhj

Code Implementation: xinyang-go

Colaborator: E-T-E-R-N-A-L-B-L-U-E

If you think this project is helpful to you, please give me a thumbs up, it is very useful to me. 如果你觉得这个项目对你有所帮助,请给我一个点赞,这对我很有用。

About

Extended kalman filter implementation.(例子暂时有问题,寒假改)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages