16.322 3D Pose Estimation Project - A 3D attitude estimator based on the Unscented Kalman Filter (UKF) using a MEMS IMU and magnetometer.
This repo contains a implementation of Edgar Kraft's quaternion-based UKF and a program for running the UKF on simulated data or saved experimental data. It also contains sensor drivers for the MPU-9150 on the BeagleBone Black, quaternion utilities, and tools for sensor characterization.
Clone the repo, and its submodules (you need to include the --recursive
flag to get the submodules):
git clone --recursive git@github.mit.edu:mvernacc/16322-3d-pose.git
Install pip (if you don't already have it):
sudo apt-get install python-pip
Install 16322-3d-pose using pip. This will automatically install the dependencies.
cd 16322-3d-pose
pip install -e .
If you wish to use the sensor drivers, you will need to install them too:
cd 16322-3d-pose/sensor_drivers/beaglebone-mpu9x50
ipython setup.py install develop
The estimator program is in the top-level directory:
cd 16322-3d-pose
To run the estimator on saved experimental sensor data:
ipython run_estimator.py -- --meas_source pickle --pkl_file data/exemplars/xyz90.p --use_mag --mag_cal data/exemplars/mag_cal.p
To run the estimator on simulated data:
ipython run_estimator.py -- --meas_source sim --sim_type xyz90 --use_mag
To see all options for running the estimator:
ipython run_estimator.py -- -h
The sensor characterization programs are in the estimators/sensor_models
directory:
cd 16322-3d-pose/estimators/sensor_models
To run Allan variance analysis on the rate gyroscope:
ipython allan.py -- ../../data/exemplars/data_for_allan.p gyro_data
To run magnetometer calibration:
ipython mag_cal.py -- --meas_source pickle --pkl_file ../../data/exemplars/data_for_mag_cal.p --solver leastsq
-
python 2.7
-
numpy
-
scipy
-
matplotlib
-
beaglebone-mpu9x50 for sensor drivers.
-
beaglebone-px4flow for sensor drivers.
-
estimators for Kalman Filter ans sensor models.
-
transforms3d for quaternion math.