🤖 AI Summary
This work addresses the challenge of naturally incorporating equality constraints into factor graph optimization. We propose an extended framework natively supporting such constraints, implemented as a lightweight header-only C++ library built upon the g2o architecture. Our method seamlessly integrates constraints into the residual model via Lagrange multipliers, ensuring strict compatibility with both Gauss–Newton and Levenberg–Marquardt second-order solvers—without modifying underlying algorithms or compromising interface consistency. The key contribution is the first realization in a mainstream factor graph library of an efficient, second-order-accurate constraint embedding mechanism that incurs zero additional iteration overhead. Evaluated on an autonomous driving velocity-tracking optimal control task, our approach achieves significantly improved localization and control accuracy compared to conventional penalty or augmented Lagrangian methods. The source code and illustrative examples are publicly available.
📝 Abstract
Factor graph optimization serves as a fundamental framework for robotic perception, enabling applications such as pose estimation, simultaneous localization and mapping (SLAM), structure-from-motion (SfM), and situational awareness. Traditionally, these methods solve unconstrained least squares problems using algorithms such as Gauss-Newton and Levenberg-Marquardt. However, extending factor graphs with native support for equality constraints can improve solution accuracy and broaden their applicability, particularly in optimal control. In this paper, we propose a novel extension of factor graphs that seamlessly incorporates equality constraints without requiring additional optimization algorithms. Our approach maintains the efficiency and flexibility of existing second-order optimization techniques while ensuring constraint feasibility. To validate our method, we apply it to an optimal control problem for velocity tracking in autonomous vehicles and benchmark our results against state-of-the-art constraint handling techniques. Additionally, we introduce ecg2o, a header-only C++ library that extends the widely used g2o factor graph library by adding full support for equality-constrained optimization. This library, along with demonstrative examples and the optimal control problem, is available as open source at https://github.com/snt-arg/ecg2o