05 · 2024
Visual-Inertial SLAM
Tightly-coupled visual-inertial odometry with a factor-graph back end for GPS-denied flight.
- C++
- OpenCV
- GTSAM
- Ceres
- Eigen
The problem
Indoors and under canopy there is no GPS, and wheel odometry does not exist on a flying platform. Drift over a few minutes was large enough to make return-to-home unreliable.
What I built
A tightly-coupled VIO front end feeding a factor-graph back end, with an online camera–IMU extrinsic calibration routine so the rig does not need re-calibrating by hand after every knock.
How it works
- C++ with Eigen; feature tracking and stereo matching in OpenCV.
- IMU pre-integration between keyframes, with visual and inertial residuals optimised jointly in GTSAM.
- Ceres for the extrinsic calibration solve.
- Deterministic replay from recorded datasets so a trajectory can be reproduced exactly while debugging.
How it was tested
Evaluated on public benchmark sequences with ground truth as well as our own recordings, reporting absolute trajectory error rather than eyeballing the map.
Results
- Drift reduced by XX% over N-minute trajectories after adding online extrinsic calibration.
- Absolute trajectory error of X m on benchmark sequences.
- Ran in real time on the onboard compute.
What I learned
- Time synchronisation between camera and IMU mattered more than any estimator tuning. Milliseconds of unmodelled offset dominated the error budget until it was measured properly.
- I spent too long tuning the optimiser before checking the calibration. Fixing the inputs was worth more than improving the solver.