g2o is a C++ framework for optimizing graph-based nonlinear error functions.
The tool addresses the problem of minimizing nonlinear error functions that can be represented as graphs, which is common in robotics and computer vision. Problems like simultaneous localization and mapping (SLAM) and bundle adjustment (BA) involve finding parameter configurations that best explain noisy measurements. g2o solves these nonlinear least squares problems by allowing users to specify new problem instances in just a few lines of code, making it easily extensible across a wide range of applications.
The framework is suitable for researchers and practitioners working on SLAM, bundle adjustment, and related robotics or computer vision problems who need a flexible, general-purpose optimization backend. The tool provides implementations for several variants of SLAM and BA out of the box. An experimental Python wrapper is available on a separate branch, with a PyPI release also maintained separately for those preferring Python bindings over direct C++ usage.
The project maintains active continuous integration across Linux, Mac, and Windows platforms. Code quality is monitored through automated analysis. The codebase uses pre-commit hooks to enforce standards. An experimental branch exploring updated memory management with smart pointers and expanded Python support is actively welcoming contributions.