RepositoryC++USUnited States
MarineRoboticsGroup

MarineRoboticsGroup/dcsam

Factored inference for discrete-continuous smoothing and mapping.

158stars
21forks
2issues
5views

dcsam

Build Status docs

This library, built using GTSAM, provides factor type definitions and a new solver to perform approximate inference on discrete-continuous (hybrid) factor graph models typically encountered in robotics applications.

NOTE: As of 3/01/2026 the latest version of DC-SAM on main depends on GTSAM develop

Thanks to Varun Agrawal for bringing DC-SAM up to date with GTSAM.

If you are using GTSAM 4.1.1, check out our pre-4.2 release tag. This is the version of DC-SAM you would have used if you cloned the repository prior to 1/30/2023. Many thanks to Parker Lusk for bringing us into the future.

References

A technical report describing this library and our solver can be found here. If you found this code useful, please cite it as:

@article{doherty2022discrete,
  author={Doherty, Kevin J. and Lu, Ziqi and Singh, Kurran and Leonard, John J.},
  journal={IEEE Robotics and Automation Letters},
  title={Discrete-{C}ontinuous {S}moothing and {M}apping},
  year={2022},
  volume={7},
  number={4},
  pages={12395-12402},
  doi={10.1109/LRA.2022.3216938}
}

Prerequisites

To retrieve the appropriate version of GTSAM:

~ $ git clone https://github.com/borglab/gtsam
~ $ cd gtsam
~/gtsam $ git checkout 4.2a8

Follow instructions in the GTSAM repository to build and install with your desired configuration.

Optional

  • gtest for building tests.

Building

Building the project

To build using cmake:

~/dcsam $ mkdir build
~/dcsam $ cd build
~/dcsam/build $ cmake ..
~/dcsam/build $ make -j

Run tests

To run unit tests, first build with testing enabled:

~/dcsam $ mkdir build
~/dcsam $ cd build
~/dcsam/build $ cmake .. -DDCSAM_ENABLE_TESTS=ON
~/dcsam/build $ make -j

Now you can run the tests as follows:

~/dcsam/build $ make test

Examples

For example usage, check out the DC-SAM examples repo or take a look through testDCSAM.cpp.

Developing

We're using pre-commit for automatic linting. To install pre-commit run:

pip3 install pre-commit

You can verify your installation went through by running pre-commit --version and you should see something like pre-commit 2.7.1.

To get started using pre-commit with this codebase, from the project repo run:

pre-commit install

Now, each time you git add new files and try to git commit your code will automatically be run through a variety of linters. You won't be able to commit anything until the linters are happy with your code.

Similar Projects

Discover other similar projects and AI models.

RepositoryC++
cartographer-project/cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.

8.0k
Jan 5, 2024
RepositoryC++
introlab/rtabmap

RTAB-Map library and standalone application

4.1k
Dec 1, 2026
RepositoryC++
koide3/glim

GLIM: versatile and extensible point cloud-based 3D localization and mapping framework

2.0k
Oct 8, 2026
RepositoryC++
MIT-SPARK/Kimera-VIO

Visual Inertial Odometry with SLAM capabilities and 3D Mesh generation.

1.9k
Aug 6, 2026
RepositoryC++
laboshinl/loam_velodyne

Laser Odometry and Mapping (Loam) is a realtime method for state estimation and mapping using a 3D lidar.

1.8k
Jun 18, 2019
RepositoryC++
NVIDIA-ISAAC-ROS/isaac_ros_visual_slam

Visual SLAM/odometry package based on NVIDIA-accelerated cuVSLAM

1.5k
Nov 18, 2026
RepositoryC++
HKUST-Aerial-Robotics/GVINS

Tightly coupled GNSS-Visual-Inertial system for locally smooth and globally consistent state estimation in complex environment.

1.2k
Sep 11, 2021
RepositoryC++
wh200720041/floam

Fast LOAM: Fast and Optimized Lidar Odometry And Mapping for indoor/outdoor localization IROS 2021

1.1k
Jul 30, 2024
RepositoryC++
cuitaixiang/LOAM_NOTED

loam code noted in Chinese(loam中文注解版)

1.1k
Oct 9, 2019