Skip to content

ToberoCat/wombat-imu-calibration

Repository files navigation

Supplementary Material: IMU Calibration and Orientation Estimation on the Wombat Educational Robot

Supplementary material for the ECER 2026 paper:

"IMU Calibration and Orientation Estimation on the Wombat Educational Robot" by Tobias Madlberger and Matthias Greil, HTBLuVA St. Polten, Austria.

This repository contains all data, scripts, and figures used in the paper. This includes the final datasets that produced the published results, as well as every intermediate and failed data collection from the development process. We include the failed runs on purpose: they document firmware bugs we found and fixed (wrong magnetometer axis mapping, missing MPL init calls, etc.) and show the real, messy path to working results.

Platform

  • Robot: KIPR Wombat (Raspberry Pi 3 + STM32 coprocessor)
  • IMU: InvenSense MPU-9250 (gyroscope, accelerometer, magnetometer)
  • Firmware: Custom STM32 firmware using the InvenSense eMD 5.1.3 driver library
  • Transport: LCM (Lightweight Communications and Marshalling) via SPI

Note: The capture scripts require the custom firmware to access the IMU data channels. The default KIPR firmware does not expose raw sensor data or DMP quaternions over LCM. The analysis scripts work with the provided CSV files and do not need the firmware.

Repository Structure

.
├── calibration/
│   ├── data/                 Raw sensor recordings for calibration
│   ├── parameters/           Computed calibration parameters (.ini files)
│   └── scripts/              Calibration and data collection scripts
├── comparison/
│   ├── data/
│   │   ├── static_10min_v2.csv           Final 10-min static test (Table I, Fig. 4)
│   │   ├── heading_validation.csv        Final 2-min dynamic test (Table II, Fig. 5)
│   │   ├── phone_reference/              Smartphone reference data (Physics Toolbox)
│   │   └── failed_and_intermediate/      All earlier/failed data collections
│   ├── scripts/              Analysis, capture, and figure generation scripts
│   └── results/              Computed results from all analysis runs
├── figures/                  All figures (paper figures + extras)
├── LICENSE
└── README.md

See the README files in each subdirectory for details.

Sensor Fusion Methods Compared (4 methods in final paper)

Method Axes Implementation Description
DMP (6ax) Gyro + Accel On-chip (MPU-9250) Hardware quaternion fusion at 100 Hz
Mahony (6ax) Gyro + Accel Offline (Python) Complementary filter, kP=2.0, kI=0.005
Mahony (9ax) Gyro + Accel + Mag Offline (Python) Mahony with calibrated magnetometer
Raw Gyro Gyro only Offline (Python) Direct quaternion integration (baseline)

The Mahony filter and raw gyroscope integration run on sensor data that has already been preprocessed by the DMP (bias-corrected, temperature-compensated).

MPL (9-axis) was excluded from the final paper. The InvenSense Motion Processing Library is a precompiled binary blob. Despite fixing several firmware bugs (wrong compass flags, missing 9x init), its output remained unreliable. The failed_and_intermediate/ directory contains the MPL data and analysis scripts (heading_v5, analyze_heading_v5.py) for reference.

Reproducing the Results

Requirements

pip install numpy matplotlib scipy

Paper Figures

cd comparison/scripts
python3 make_paper_figures.py

This regenerates all four paper figures from the CSV data.

Static Drift (Table I, Figure 4)

cd comparison/scripts
python3 analyze.py ../data/static_10min_v2.csv --plot

Dynamic Heading (Table II, Figure 5)

cd comparison/scripts
python3 analyze_heading_validation.py ../data/heading_validation.csv ../data/phone_reference/ --plot

Calibration

cd calibration/scripts
python3 accel_calibration.py ../data/static_imu_data_dedup.csv
python3 ellipsoid_fitting.py ../data/rotated_imu_data_dedup.csv

Data Format

All robot CSV files share this column layout:

Column Unit Description
time_s s Elapsed time from first sample
gyro_x/y/z rad/s Angular rate (DMP-preprocessed, world frame)
accel_x/y/z m/s^2 Linear acceleration (DMP-preprocessed, world frame)
mag_x/y/z uT Magnetometer (raw)
dmp_w/x/y/z -- DMP 6-axis quaternion [w,x,y,z]

Smartphone reference was recorded with Physics Toolbox Sensor Suite on a Samsung Galaxy Z Flip3.

AI Disclosure

All scripts were generated with the assistance of AI (Claude, Anthropic). Each source file contains a corresponding disclaimer.

License

MIT License -- see LICENSE.

About

The supplementary files for the ecer 2026 paper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages