VQF: A Versatile Quaternion-based Filter for IMU Orientation Estimation
Introduction
This is the documentation for the implementation of the IMU orientation estimation filter described in the following publication:
D. Laidig and T. Seel. “VQF: Highly Accurate IMU Orientation Estimation with Bias Estimation and Magnetic Disturbance Rejection.” Information Fusion 2023, 91, 187–204. doi:10.1016/j.inffus.2022.10.014. [Accepted manuscript available at arXiv:2203.17024.]
The filter can perform simultaneous 6D (magnetometer-free) and 9D (gyr+acc+mag) sensor fusion and can also be used without magnetometer data. Different sampling rates for gyroscopes, accelerometers, and magnetometers are supported as well. While in most cases, the defaults will be reasonable, the algorithm can be influenced via two main tuning parameters.
The source code can be found at https://github.com/dlaidig/vqf.
Algorithm Variants
There are three variants of the algorithm:
The full version includes online gyroscope bias estimation and magnetic disturbance rejection.
The basic version does not include those features and only has two tuning parameters. (Note that the full version is equivalent when the parameters
motionBiasEstEnabled
,restBiasEstEnabled
andmagDistRejectionEnabled
are set to false.)The offline version makes use of acausal signal processing in order to improve the accuracy when the full time series of measurement data is available at the time of processing.
A number of implementations in different programming languages is available:
The main implementation is written in C++.
Cython-based wrappers are provided that allow the fast C++ implementation to be used from Python.
Additionally, there is a (comparatively slow) implementation in pure Python.
A pure Matlab version is available as well.
See the following table for an overview of the implementations:
Full Version |
Basic Version |
Offline Version |
|
---|---|---|---|
C++ |
|||
Python/C++ (fast) |
|||
Pure Python (slow) |
– |
– |
|
Pure Matlab (slow) |
– |
– |
VQF is licensed under the terms of the MIT license.
Documentation
- Installation
- Getting Started
- FAQ / Troubleshooting
- The output of VQF does not make sense.
- The reference frame that I am using does not follow the ENU convention.
- The coordinate system of the IMU that I am using does not match what I want.
- I am getting a
ValueError: ndarray is not C-contiguous
message. - How to obtain quaternions compatible with Matlab’s
ahrsfilter
/imufilter
?