--- id: gtsam version: "4.2.2" license: Simplified BSD license license_treatment: permissive maintenance: active --- # gtsam — Georgia Tech Smoothing And Mapping library License: permissive · Maintenance: active · Downloads: 81.5K/mo ## What it is and what it does GTSAM is a robotics and computer vision library centered on factor graphs—a graphical model representation that encodes optimization problems arising in simultaneous localization and mapping (SLAM), visual odometry, and sensor fusion. Rather than working directly with sparse matrices, GTSAM uses factor graphs and Bayes networks to express relationships between poses, landmarks, and measurements, then solves them via nonlinear optimization. The Python wrapper provides access to this C++ core, letting you build and solve factor graphs for problems like visual-inertial odometry (combining camera and IMU data), pose-graph optimization, and multi-robot localization. The library includes specialized factors for IMU preintegration—a state-of-the-art scheme for fusing inertial measurements with visual or other pose constraints—and supports both batch and incremental solving. It is widely used in academic robotics research and production systems. Runtime dependencies are minimal (numpy and pyparsing), and prebuilt wheels are available for common platforms, though the compiled nature of the bindings means installation may require a C++ toolchain on some systems. Use it for: - Build and solve pose graphs for visual SLAM systems that fuse camera and IMU measurements - Implement visual-inertial odometry (VIO) by preintegrating IMU data between keyframes - Optimize multi-robot localization by adding relative pose constraints to a shared factor graph - Refine camera calibration and landmark positions in structure-from-motion pipelines - Prototype robotics perception algorithms that require nonlinear least-squares optimization over manifolds ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. GTSAM is a Python wrapper around a C++ library for smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks to solve optimization problems in localization, mapping, and visual-inertial estimation. Yes, if you are working on robotics or computer vision research involving SLAM, visual odometry, or sensor fusion. The library is production-stable, actively maintained, and has no known vulnerabilities. Install friction is moderate due to compiled bindings, but prebuilt wheels for modern Python versions on common platforms mitigate this. The permissive BSD license poses no restrictions. Not necessary for general-purpose optimization or machine learning; consider it only if your problem naturally fits the factor-graph abstraction. ## Install pip install gtsam uv add gtsam poetry add gtsam ## Installing gtsam Before you install: Medium install friction due to compiled C++ bindings, but prebuilt wheels are available for modern Python versions (3.11–3.14) on macOS (x86_64 and arm64) and Linux (x86_64 and aarch64). Maintenance is active with a recent release. License in practice: Permissive Simplified BSD license allows commercial and private use with minimal restrictions, making it suitable for proprietary robotics and vision projects. Quickstart: pip install gtsam import gtsam import numpy as np # Create a factor graph and add factors for optimization graph = gtsam.NonlinearFactorGraph() initial_estimate = gtsam.Values() Requires a C++ compiler and build tools during wheel compilation if installing from source; prebuilt wheels avoid this for supported platforms. Verify before relying: - Whether the Python wrapper exposes all C++ library features or a subset thereof - Performance characteristics and scaling limits for large-scale SLAM problems - Compatibility with specific robotics frameworks (ROS, etc.) beyond the core library ## Package facts - License: Simplified BSD license (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 81.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags factor graph optimization, slam robotics library, visual inertial odometry, pose graph optimization, robot localization mapping, imu preintegration, bayes network inference, slam, robotics, optimization [View on SkillFed](https://skillfed.io/packages/gtsam) · [View on PyPI](https://pypi.org/project/gtsam/)