manif
Header-only C++ Lie theory library for robotics state estimation
License
MIT
Overview
manif is a header-only C++11 library implementing Lie theory for state estimation in robotics. It provides concrete implementations of Lie groups commonly used in robotics — SO(2), SE(2), SO(3), SE(3), SE_2(3), and their tangent spaces — with a unified API for exponential/logarithmic maps, group operations, and Jacobian computation. Essential for anyone implementing EKF-based SLAM, visual-inertial odometry, or pose graph optimization. Includes Python bindings and a companion paper explaining the mathematical foundations.
manif is a header-only C++11 library that brings Lie theory into practical reach for robotics state estimation. It implements the most commonly needed Lie groups — SO(2), SE(2), SO(3), SE(3), and the extended pose group SE_2(3) — with a consistent API for composition, inversion, exponential/logarithmic maps, adjoint representations, and the plus/minus operations central to optimization on manifolds.
What sets manif apart is its focus on analytic Jacobian computation for every supported operation. This makes it directly usable in Extended Kalman Filters, factor graph optimizers, and other estimation frameworks where correct derivatives are essential. The library also supports the Bundle<> template for composing multiple Lie groups into a single state representation.
manif is accompanied by the paper 'A micro Lie theory for state estimation in robotics' by Joan Sola et al., which has become one of the most-cited introductory resources on Lie theory for roboticists. The library requires only Eigen as a dependency and provides Python 3 bindings for prototyping.
Why it matters
Lie groups are the mathematically rigorous way to handle rotations and rigid body transformations in robotics, but their implementation is error-prone and often scattered across ad-hoc code. manif provides a clean, well-documented, and peer-reviewed implementation that makes Lie theory accessible to robotics practitioners, backed by a companion paper that serves as a widely-cited educational resource.
Problem it solves
State estimation algorithms in robotics require operations on rotation and transformation groups (SO(3), SE(3), etc.) with correct Jacobian computation. Implementing these from scratch is tedious and error-prone. manif provides a unified, templated interface for multiple Lie groups with analytic Jacobians, so developers can write mathematically correct estimation code without re-deriving group operations.
Key takeaways
- Implements SO(2), SE(2), SO(3), SE(3), SE_2(3), SGal(3), and composable Bundle groups
- Provides analytic Jacobians for all operations — critical for EKF and optimization-based estimation
- Header-only C++11 with Python 3 bindings, zero runtime dependencies beyond Eigen
- Companion paper 'A micro Lie theory for state estimation in robotics' is a widely-cited educational reference
- Supports composing multiple groups via Bundle<> for complex state representations
Who it is for
- Robotics engineers implementing EKF, UKF, or optimization-based state estimation
- SLAM researchers needing correct Lie group operations with Jacobians
- Graduate students learning Lie theory for robotics applications
- Computer vision developers working with 3D pose estimation
Limitations
- Focused on Lie group operations — not a complete state estimation framework
- Requires familiarity with Lie theory concepts to use effectively (the companion paper helps)
- Template-heavy C++ code can produce verbose compiler errors
- Limited to the implemented groups — adding custom groups requires understanding the internal template structure