DynOSAM

ACFR-RPGBSD-3-Clause活跃维护

面向动态环境的视觉 SLAM 框架,能同时估计相机里程计、静态地图以及场景中运动物体的位姿与结构,解决传统 SLAM 在动态场景下定位漂移的问题。

Offical code release for DynoSAM: Dynamic Object Smoothing And Mapping. Accepted Transactions on Robotics (Visual SLAM SI). A visual SLAM framework and pipeline for Dynamic environements, estimating for the motion/pose of objects and their structure, as well as the camera odometry and static map.

v1.1.0-ral-2025发布于 2025-09-23 23:04 UTC348star +1 / 7 天35fork同步于 2026-11-10 12:01 UTC

怎么上手

由 README 提炼,执行前请确认
ros2 launch dynosam_ros dyno_sam_launch.py params_path:=<path-to-params-folder> dataset_path:=<path-to-dataset> v:=<verbosity> --data_provider_type=<data_set_loader_type> --output_path=</path/to/output/folder>
硬件要求按 README 说明

README 提到支持 ARM64 设备并在 NVIDIA ORIN NX 上测试过,但该设备上无法实时运行(瓶颈在目标检测);CUDA/TensorRT 加速需要 NVIDIA GPU,具体显存要求 README 未说明。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

面向动态环境的双目/RGB-D 视觉 SLAM 框架,同时估计相机位姿、物体运动与静态地图

面向动态环境的视觉 SLAM 框架,能同时估计相机里程计、静态地图以及场景中运动物体的位姿与结构,解决传统 SLAM 在动态场景下定位漂移的问题。

核心能力

  • 支持 full-batch、滑窗与增量三种优化后端
  • 在线估计动态物体的运动/位姿并维护时序物体地图
  • 集成 ROS2,支持离线数据集与在线传感器输入
  • 前端 CUDA 加速,用 TensorRT 做目标检测与跟踪
  • 可选稀疏 KLT 跟踪替代稠密光流

容易踩的坑

需按 INSTALL.md 自行安装依赖,README 未给出 pip/apt 一键安装;数据集需从 ACFR-RPG 页面用 wget 单独下载,且输出目录必须事先存在;稠密光流预处理代码未公开,用 GT 评估时需设 prefer_provided_object_detection: false;GFlags 无法通过 ros2 launch 传入,需用 ros2 run 或改 flags 文件。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

3 个版本v1.1.0-ral-2025
  1. v1.1.0-ral-2025RAL-2025 working version最新正式版2025-09-23 · 2025-09-23 23:04 UTC
    • Semi-release version which tags the implementation used to generate all the results for the RAL-2025 (Online Dynamic SLAM with Incremental Smoothing and Mapping). This version is a mixture of release version and version prior to release
    • Should be backwards compatible/contain same code as for TRO-2025 plus fixes and code-restructure
    • Introduces Hybrid and Parallel-Hybrid formulations
    • DISCLAIMER: This is not tagged as pre-release but all code should be considered as only moderately stable ;)
  2. v1.0.0v1.0.0 full release2025-01-16 · 2025-01-16 03:22 UTC
    查看更新说明

    Full Changelog: https://github.com/ACFR-RPG/DynOSAM/compare/v1.0.0-tro2024...v1.0.0

    • Release version of v.1.0.0-tro2024
    • Includes updated documentation, dependencies, param management, cleaner code and cleaned up files.
    • Functionality should be the same as the earlier version but in a release form.
  3. v1.0.0-tro2024TRO-2024 (VSLAM special issue) working version2025-01-06 · 2025-01-06 06:20 UTC
    查看更新说明

    Non-release version of the code which tags the implementation used to generate all the results for the TRO2024 (visual slam special issue) . This is the version prior to refactoring.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    DynoSAM: Dynamic Object Smoothing and Mapping

    A Stereo/RGB-D Visual Odometry pipeline for Dynamic SLAM.

    DynoSAM estimates camera poses, object motions/poses, as well as static background and temporal dynamic object maps. It provides full-batch, sliding-window, and incremental optimization procedures and is fully integrated with ROS2.

    ROS2 License Paper

    📚 Publications

    The offical code used for our paper:

    ** Update December 2025 **

    Our work has been accepted to IEEE Robotics and Automation Letters (RA-L)

    ** Update November 2025 **

    Our work has been accepted to IEEE Transactions on Robotics (T-RO)

    ** Update September 2025 **

    This code now also contains the code for our new work

    We kindly ask to cite our papers if you find these works useful:

    
    @misc{morris2025dynosam,
      author={Morris, Jesse and Wang, Yiduo and Kliniewski, Mikolaj and Ila, Viorela},
      journal={IEEE Transactions on Robotics},
      title={DynoSAM: Open-Source Smoothing and Mapping Framework for Dynamic SLAM},
      year={2025},
      doi={10.1109/TRO.2025.3641813}
    }
    
    @inproceedings{morris2025online,
      author={Morris, Jesse and Wang, Yiduo and Ila, Viorela},
      journal={IEEE Robotics and Automation Letters},
      title={Online Dynamic SLAM with Incremental Smoothing and Mapping},
      year={2026},
      volume={},
      number={},
      pages={1-8},
      doi={10.1109/LRA.2026.3655286}}
    }
    

    Related Publications

    DynoSAM was build as a culmination of several works:

    📖 Overview

    Key Features (Nov 2025 Update)

    • 🚀 CUDA Integration: Front-end acceleration.
    • 🧠 TensorRT: Integrated object detection and tracking.
    • ⚡ Sparse Tracking: Options to move away from dense optical flow.
    • 📦 Modular: System broken into packages for faster compile times.
    • 🐳 Docker: Updated image with new dependencies.

    Documentation

    We auto generate Doxygen code docs for all classes in DynoSAM. The code docs are up-to-date with the main branch.

    1. ⚙️ Installation

    We provide a detailed installation guide including dependencies and Docker support. See detailed instructions here: Insallation instructions

    1.1 Edge Device Support

    We currently support building for AARM64 devices and DynoSAM has been tested on an NVIDIA ORIN NX. Docker file support and more details are provided in the install instructions.

    NOTE: DynoSAM does not currently run real-time on the ORIN NX (mostly bottlenecked by the object detection process). On a more powerful device better performance is expected.

    Also see the Docker README.md and the dynosam_nn README.md for more information on hardware and performance.

    2. 🚀 Running DynoSAM

    2.1 Paramters

    DynoSAM is configured using a combination of YAML files (pipeline, frontend, datasets) and GFLAGS (overridable command-line parameters). ROS parameters are used only for input file paths.

    All .yaml and .flags files must be placed in a single parameter folder which defines the params_path.

    params/
      FrontendParams.yaml
      PipelineParams.yaml
      [DatasetParams.yaml]
      [CameraParams.yaml]
      *.flags
    
    • YAML files are loaded using config_utilities.
    • GFlags provide run-time reconfiguration (important for automated experiments).
    • ROS parameters are used sparingly (mainly for file paths).

    NOTE: Note: Additional GFlags cannot be passed through ros2 launch. To override GFlags pass them directly with ros2 run, or modify the flag files inside the params folder.

    To print active parameters:

    ros2 run dynosam_utils eval_launch.py --show_dyno_args=true
    

    To see all gflag options run:

    ros2 run dynosam_ros dynosam_node --help
    

    2.2 Quick Start (Launch File)

    Launch the full pipeline with ROS2:

    ros2 launch dynosam_ros dyno_sam_launch.py \
        params_path:=<path-to-params-folder> \
        dataset_path:=<path-to-dataset> \
        v:=<verbosity> \
        --data_provider_type=<data_set_loader_type> \
        --output_path=</path/to/output/folder>
    

    The launch file:

    • Loads all .flags files in the parameter folder,
    • Applies dataset provider selection via --data_provider_type,
    • Logs outputs to --output_path (must exist beforehand).

    2.3 Experiment & Evaluation Launcher

    For fine‑grained control and automated experiments, use:

    ros2 run dynosam_utils eval_launch.py \
        --dataset_path <path> \
        --params_path <absolute path> \
        --output_path <path> \
        --name <experiment name> \
        --run_pipeline \
        --run_analysis \
        <extra GFLAG cli arguments>
    

    This script:

    • Automates running the pipeline and evaluations,
    • Forwards all extra CLI arguments to DynoSAM (allowing any GFLAG override),
    • Creates result folders output_path/name/ automatically.

    Example:

    ros2 run dynosam_utils eval_launch.py \
        --output_path=/tmp/results \
        --name=test \
        --run_pipeline \
        --data_provider_type=2
    

    2.4 Programmatic Execution (Python)

    All command‑line behaviour can be replicated in Python. See: run_experiments_tro.py for examples.

    3. 📂 Datasets

    3.1 Pre-processing Image data

    DynoSAM requires input image data in the form:

    • RGB
    • Depth/Stereo
    • Dense Optical Flow
    • Dense Semantic Instance mask

    Each image is expected in the following form:

    • rgb image is expected to be a valid 8bit image (1, 3 and 4 channel images are accepted).
    • depth must be a CV_64F image where the value of each pixel represents the metric depth.
    • mask must be a CV_32SC1 where the static background is of value $0$ and all other objects are lablled with a tracking label $j$. $j$ is assumed to be globally consistent and is used to map the tracked object $j$ to the ground truth.
    • flow must be a CV_32FC2 representing a standard optical-flow image representation.

    For dense optical flow (ie. pre Novemeber 2025) we use RAFT. Currently this pre-processing code is not available.

    For instance segmentation we use YOLOv8 for both image pre-processing and online processing. Both Python and C++ (using TensorRT acceleration) models can be found in the dynosam_nn package. See the REAMDE for more details.

    • If prefer_provided_optical_flow: true (YAML), the pipeline expects a dense flow image. Otherwise, it falls back to sparse KLT.
    • If prefer_provided_object_detection: true (YAML) , an instance mask must be provided. If false, masks are generated online via.

    3.2 Running with pre-processed data

    DynoSAM provides dataset loaders that parse pre-processed images (ie. depth, optical flow, masks), and ground truth into a unified format.

    All official datasets are hosted at the ACFR-RPG Datasets page. To download a dataset, create a directory for the relevant dataset and, within the directory, run the command

    wget -m -np -nH --cut-dirs=4 -R "index.html*" https://data.acfr.usyd.edu.au/rpg/dynosam/[Dataset]/[Subset]
    

    For example, for the kitti dataset with subset 0004, create and enter the directory kitti-0004 download all files:

    wget -m -np -nH --cut-dirs=4 -R "index.html*" https://data.acfr.usyd.edu.au/rpg/dynosam/kitti/0004
    

    NOTE: when developing using docker, download the sequences into the data folder mounted into the docker container so it may be accessed by the program.

    The following datasets are officially supported:

    DatasetDataset IDNotes
    KITTI Tracking0Uses modified version with GT motion, flow, masks.
    Virtual KITTI 21Raw dataset supported directly.
    Cluster-SLAM (CARLA)2Raw dataset available; we recommend our processed version.
    Oxford Multimotion (OMD)3Modified 2024 version available.
    TartanAir Shibuya5Preprocessed version supported.
    VIODE6IMU-enabled sequences supported.

    To run a specific dataset only two GFLAGS are required:

    --dataset_path
    --data_provider_type
    

    where --dataset_path points to the location of the dataset and --data_provider_type should be set to Dataset ID.

    NOTE: when using ground truth for evaluation it is important to ensure that prefer_provided_object_detection: false so that the pre-processing object masks are used. This ensures that tracking label $j$ used within the pipeline aligns with the ground truth label.

    3.3 Online Data

    DynoSAM can also run from data provided by ROS.

    To run with online data (e.g. from raw sensor data) set the ROS parameter:

    online:=True
    

    DynoSAM can run in two input modes which can be set using the ROS parameter input_image_mode:

    • ALL (input_image_mode=0)
    • RGBD (input_image_mode=1).

    When in ALL mode, all image-preprocessing is done upstream and five inputs are required: By default this node subscribes to five topics:

    • dataprovider/image/camera_info (sensor_msgs.msg.CameraInfo)
    • dataprovider/image/rgb (sensor_msgs.msg.Image)
    • dataprovider/image/depth (sensor_msgs.msg.Image)
    • dataprovider/image/mask (sensor_msgs.msg.Image)
    • dataprovider/image/flow (sensor_msgs.msg.Image)

    In RGBD mode, only camera intrinsics, rgb and depth images are required and all other image processing (including object detection) is done as part of the pipeline.

    3.2.1 Running using RBG-D camera

    To run from data provided by an RGB-D camera use

    ros2 launch dynosam_ros dyno_sam_online_rgbd_launch.py
    

    and remap the topics accordingly.

    4. 🕹️ System Configuration

    4.1 Backend Setup

    Running Different Backends

    DynoSAM supports multiple backend formulations. Set the backend_updater_enum flag to switch between them.

    EnumFormulationPaperDescription
    0WCMETRO 2025World-Centric Motion Estimator
    1WCPETRO 2025World-Centric Pose Estimator
    2HYBRIDRA-L 2025Hybrid formulation
    3PARALLEL_HYBRIDRA-L 2025Parallel Hybrid (Recommended for speed)

    Many factor-graph related paramters exist in the backend.flags file.

    4.2 Instance Segmentation

    DynoSAM uses YOLOv8 for object detection. The model is integrated into the front-end and accelerated using CUDA and TensorRT.

    To run the pipeline with online segmentation and object tracking set

    prefer_provided_object_detection: true
    

    See the dynosam_nn README.md for more detail on the models used and how to export the weights.

    NOTE: the provided datasets contain pre-computed object masks with tracking labels $j$ that align with the ground truth. Use prefer_provided_object_detection: false.

    4.3 IMU integration

    We additionally support IMU integration using the PreintegrationFactor from GTSAM in the backend. However, this has only been tested on VIODE.

    4.4 ROS Visualisation

    All 3D visualisation in DynoSAM is done using RVIZ. Camera pose and point clouds are vizualised using standard ROS messages. Visualising the objects is more complex and we provide two different ways to do this which can be controlled at compile time using the cmake flag -DENABLE_DYNAMIC_SLAM_INTERFACES=ON/OFF

    1. (ON, now default) Usage of the custom dynamic_slam_interfaces::msg::ObjectOdometry (in dynamic_slam_interfaces) to publish to current state of the each object per frame. Our custom RVIZ plugin rviz_dynamic_slam_plugins can be used to visualize this message type. The object id, current pose, velocity, path etc... will be shown for each object. See this README.md for more detail.
    2. (OFF) Instead of using the custom messages, standard ROS visualisation messages are used instead to display the state of each object (object id, current pose...). This setup is therefore more complex, and results in many more advertised topics to achieve a similar (and less flexible) display than using the custom plugin/interface combination. As a result, this method of display is not preferred. See this README.md for more detail.

    NOTE: the publishing of object states is meant primilarily for visualisation purposes and not for recording data used for evaluation. This is done using csv files in a different submodule: see Evaluation.

    4.5 Tests

    We use gtest for unit testing. This is installed automagically. When building with ROS, all tests will go into the install folder.

    We provide a useful script to make running tests easier:

    ros2 run dynosam_ros run_dynosam_gtest.py
    

    Running unit tests for a specific package (ie. dynosam and dynosam_ros) can be specified using the --package argumement.

    This script forwards all arguments to the test executable. This allows GFLAGS to be specified directly via the CLI.

    run dynosam_ros run_dynosam_gtest.py --package=dynosam_ros --gtest_filter=TestConcepts*
    

    5. 📊 Output & Metrics

    The eval script should be used when generating results

    ros2 run dynosam_utils eval_launch.py
      --output_path=/tmp/results \
      --name=test \
      --run_pipeline \
      --run_analysis
    

    5.1 Reproducing Paper Results

    Scripts for reproducing experiments:

    While we attempt to maintain compatibility, minor differences may arise due to ongoing development.

    5.2 Output Logs

    When eval_launch.py is run with --run_analysis, DynoSAM generates a "results folder" containing:

    • Logs: camera_pose_log.csv, object_motion_log.csv, etc.
    • Plots: *results.pdf (ATE, RPE, Trajectory plots).
    • Tables: result_tables.pdf (Summary statistics).

    at the path /tmp/results/test.

    The * specifies a module prefix (e.g. frontend, wcme) that is used to specify where the logged state-estimates have come from. An additional suffix can be added to the module name through the --updater_suffix flag.

    6. 🧠 System Architecture

    We follow a modular pipeline structure inspired by Kimera-VIO:

    where a Pipeline/Module architecture connected by thread-safe queues

    graph LR
        A[Input Data] --> B(Pipeline Wrapper)
        B --> C{ThreadSafe Queue}
        C --> D[Module Processing]
        D --> E{Output Queue}
        E --> F[Next Module]
    

    is employed to connect data-provider, frontend, backend and visualizer modules.

    Code-to-Theory Mapping

    To help researchers connect the theory from our papers to the implementation, here is a mapping of our mathematical notation to the corresponding variable names and classes in the DynoSAM framework.

    Mathematical NotationCode ImplementationDescription
    $k$ (Time-step)FrameIdInteger frame number (0...N). Used as the primary time index.
    $i$ (Feature ID)TrackletIdUnique feature tracking identifier.
    $j$ (Object ID)ObjectIdUnique tracked object label.
    $X$ (Pose), $H$ (Motion)gtsam::Pose3Transformations for poses and motions, represented using the GTSAM library.
    $\mathcal{O}_k$ (Observations)AccessorInterface class used by backend modules to extract and interact with internal factor graph data.

    7. Contribution Guidelines

    We strongly encourage you to submit issues, feedback and potential improvements. We follow the branch, open PR, review, and merge workflow.

    Support

    The developpers will be happy to assist you or to consider bug reports / feature requests. But questions that can be answered reading this document will be ignored. Please contact [email protected].

    As of Nov 2024 I am still actively developing this project as part of my PhD at the ACFR. Things may change but I will do my best to ensure versions are tagged etc... as a result I will also be happy to address all bugs and feature requests! Send 'em through!!

    To contribute to this repo, make sure you have pre-commit installed to enable checks.

    pip install pre-commit
    

    We provide a pre-commit configuration so just ensure you have the git hooks setup:

    pre-commit install
    

    We also provide a .clang-format file with the style rules that the repo uses, so that you can use clang-format to reformat your code.

    8. BSD License

    The DynoSAM framework is open-sourced under the BSD License, see LICENSE.