An open-source C++ framework for optimizing graph-based nonlinear error functions, widely used in robotics and computer vision.
g2o is an open-source C++ framework for optimizing graph-based nonlinear error functions, commonly used in robotics and computer vision. It solves nonlinear least squares problems by representing them as graphs and finding parameter configurations that best explain noisy measurements. The framework is extensible and provides efficient solutions for tasks like simultaneous localization and mapping (SLAM) and bundle adjustment (BA).
Researchers and engineers in robotics and computer vision who need to solve graph-based optimization problems, such as SLAM or bundle adjustment, with a flexible and high-performance C++ library.
Developers choose g2o for its extensibility, allowing new problems to be defined in just a few lines of code, and its performance, which matches specialized state-of-the-art implementations. Its general framework design supports a wide range of applications beyond specific use cases.
g2o: A General Framework for Graph Optimization
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
New graph optimization problems can be defined in just a few lines of code, as emphasized in the README, enabling rapid prototyping for research and development.
Delivers performance on par with state-of-the-art specialized methods for SLAM and bundle adjustment, making it efficient for real-world applications.
Compatible with Linux, macOS, Windows, and Android via cross-compilation, with detailed build instructions and CI/CD badges showing active maintenance.
Supported by a peer-reviewed paper from ICRA 2011 and widely adopted in robotics and computer vision, ensuring reliability and community trust.
Python bindings are in an experimental branch (pymem) and maintained separately via g2o-python, lacking stability and full feature parity with the C++ core.
Requires C++17, Eigen3, and optional libraries like suitesparse and Qt5; Windows compilation is particularly cumbersome without vcpkg, as noted in the README.
Parts of the framework are under LGPL and GPL licenses, and dependencies like CHOLMOD may include GPL features, posing risks for proprietary or commercial use.