Skip to main content
QUICK REVIEW

[Paper Review] miniSAM: A Flexible Factor Graph Non-linear Least Squares Optimization Framework

Jing Dong, Zhaoyang Lv|arXiv (Cornell University)|Sep 3, 2019
Robotics and Sensor-Based LocalizationEngineering10 references9 citations
TL;DR

miniSAM is a lightweight, open-source C++/Python framework for non-linear least squares optimization using factor graphs, designed for flexible prototyping in robotics and computer vision. It supports full Python/NumPy integration, multiple sparse linear solvers (including CUDA-accelerated cuSOLVER), and custom manifolds, achieving performance comparable to Ceres, g2o, and GTSAM on SLAM benchmarks despite minor overhead from dynamic memory and Python compatibility design choices.

ABSTRACT

Many problems in computer vision and robotics can be phrased as non-linear least squares optimization problems represented by factor graphs, for example, simultaneous localization and mapping (SLAM), structure from motion (SfM), motion planning, and control. We have developed an open-source C++/Python framework miniSAM, for solving such factor graph based least squares problems. Compared to most existing frameworks for least squares solvers, miniSAM has (1) full Python/NumPy API, which enables more agile development and easy binding with existing Python projects, and (2) a wide list of sparse linear solvers, including CUDA enabled sparse linear solvers. Our benchmarking results shows miniSAM offers comparable performances on various types of problems, with more flexible and smoother development experience.

Motivation & Objective

  • To develop a lightweight, extensible framework for non-linear least squares optimization in robotics and computer vision.
  • To enable rapid prototyping through a full Python/NumPy API while maintaining C++ performance.
  • To support a wide range of sparse linear solvers, including GPU-accelerated options like cuSOLVER.
  • To provide extensibility for custom cost functions and manifolds without modifying underlying types.
  • To offer cross-platform compatibility with minimal external dependencies.

Proposed method

  • Uses factor graphs to model non-linear least squares problems, with error functions defined via robust kernels and information matrices.
  • Employs Levenberg-Marquardt optimization with iterative linearization using Jacobians around a local point.
  • Applies Cholesky, LDLT, or PCG factorizations to solve the normal equations JTJΔx = JTb.
  • Supports general manifolds via local coordinate charts and retract operations, using traits-based C++ template specialization for extensibility.
  • Exposes a full Python/NumPy API through PyBind11, enabling seamless integration with Python projects.
  • Integrates multiple sparse linear solvers, including Eigen, CHOLMOD, and CUDA cuSOLVER, for flexible performance tuning.

Experimental results

Research questions

  • RQ1Can a lightweight, Python-accessible framework achieve performance competitive with established C++ libraries like Ceres and g2o in non-linear least squares optimization?
  • RQ2How does the design trade-off of dynamic memory and Python compatibility affect runtime performance in optimization tasks?
  • RQ3To what extent can GPU-accelerated sparse solvers like cuSOLVER improve performance on large-scale problems in miniSAM?
  • RQ4How does miniSAM’s support for custom manifolds and loss functions compare to GTSAM in terms of usability and extensibility?
  • RQ5What is the performance impact of using Python bindings on a C++-based optimization framework with minimal runtime overhead?

Key findings

  • miniSAM achieves comparable optimization times to Ceres and g2o when using the same sparse linear solvers (e.g., CHOLMOD), with only minor performance overhead.
  • On the 2D pose graph (M3500), miniSAM with CHOLMOD took 0.090s, slightly slower than g2o (0.059s) but faster than GTSAM (0.207s) with sequential Cholesky.
  • For the 3D pose graph (Torus), miniSAM with CHOLMOD took 1.107s, outperforming GTSAM’s 2.836s with sequential Cholesky and matching g2o’s 0.821s with CHOLMOD.
  • The CUDA cuSOLVER solver showed high latency (350ms launch delay) and was slower than CPU-based CHOLMOD on small problems, making it suitable only for large-scale problems.
  • Despite design choices favoring Python compatibility (dynamic allocation, no raw pointers), miniSAM maintains strong performance across diverse SLAM problems, demonstrating practical viability for prototyping.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.