Structure-PLP-SLAM

PeterFWSGPL-3.0活跃维护

基于点、线、面特征的稀疏视觉 SLAM 系统,支持单目、RGB-D 和双目相机,在保持建图与定位精度的同时提升效率。

[ICRA'23] The official Implementation of "Structure PLP-SLAM: Efficient Sparse Mapping and Localization using Point, Line and Plane for Monocular, RGB-D and Stereo Cameras"

暂无版本477star68fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
mkdir build && cd build
cmake -DBUILD_WITH_MARCH_NATIVE=ON -DUSE_PANGOLIN_VIEWER=ON -DUSE_SOCKET_PUBLISHER=OFF -DUSE_STACK_TRACE_LOGGER=ON -DBOW_FRAMEWORK=DBoW2 -DBUILD_TESTS=OFF ..
make -j4
硬件要求按 README 说明

README未说明GPU显存要求;测试环境为Ubuntu 24.04,依赖OpenCV 3.4.16、Eigen3.4.1、g2o与DBoW2;不支持ROS和Docker。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于点线面特征的稀疏SLAM系统,支持单目、RGB-D和双目相机的建图与重定位

基于点、线、面特征的稀疏视觉 SLAM 系统,支持单目、RGB-D 和双目相机,在保持建图与定位精度的同时提升效率。

核心能力

  • 融合点、线、面三类特征进行稀疏建图与定位
  • 支持单目、RGB-D、双目三种相机模式
  • 提供基于预建地图的图像重定位模式
  • 可选分段平面重建与深度稠密点云演示
  • 内置ORB词袋,支持EVO轨迹精度评估

容易踩的坑

DBoW2需从OneDrive下载指定版本,GitHub最新版未测试;平面SLAM需预先用PlaneRecNet做实例分割并下载配套mask文件;代码基于2021年初的OpenVSLAM旧版,不支持ROS和Docker。

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

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

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

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

    README 原文

    未翻译

    Structure PLP-SLAM: Efficient Sparse Mapping and Localization using Point, Line and Plane for Monocular, RGB-D and Stereo Cameras

    Related Papers:

    [1] F. Shu, et al. "Structure PLP-SLAM: Efficient Sparse Mapping and Localization using Point, Line and Plane for Monocular, RGB-D and Stereo Cameras". IEEE International Conference on Robotics and Automation (ICRA), 2023. (https://arxiv.org/abs/2207.06058) updated arXiv v3 with supplementary materials.

    [2] F. Shu, et al. "Visual SLAM with Graph-Cut Optimized Multi-Plane Reconstruction." International Symposium on Mixed and Augmented Reality (ISMAR, poster). IEEE, 2021. (https://arxiv.org/abs/2108.04281)

    [3] Y. Xie, et al. "PlaneRecNet: Multi-Task Learning with Cross-Task Consistency for Piece-Wise Plane Detection and Reconstruction from a Single RGB Image." British Machine Vision Conference (BMVC), 2021. (https://arxiv.org/abs/2110.11219)

    Video

    The System Workflow:

    Qualitative Results

    Monocular

    TUM RGB-D • ICL-NUIM • EuRoC MAV • KITTI


    RGB-D

    TUM RGB-D • ICL-NUIM


    Stereo

    EuRoC MAV

    Build with PangolinViewer (Default)

    Documentation

    The structure-plp-slam code is based on a relatively old version of OpenVSLAM (early 2021).

    See the corresponding v0.3.9 documentation:

    https://stella-cv.readthedocs.io/en/0.3.9/example.html 
    

    Remarks

    • Point-Line SLAM is generalized. Suppose it can be conducted on all kind of data image sequences.
    • For running Planar SLAM, segmentation needs to be done beforehand (see details in below).
    • ORB vocabulary is already attached to this repository, see: ./orb_vocab/

    Dependencies:

    • Ubuntu 24.04 was tested.

    • OpenCV: version 3.4.16 was tested, for utilizing line segment (LSD + LBD).

    • g2o: can install the latest version, the recent commit (July 12, 2026) was tested.

    • Eigen3: version 3.4.1 was tested, must be version 3.

    • DBoW2: please download the version from ondrive (https://1drv.ms/u/s!Atj7rBR0X5zagZwcFs1oIqXeV5r4Cw?e=pbnNES), latest version from github is not tested.

    • Graph-Cut RANSAC: its C++ implementation was integrated into the SLAM system, under BSD license. See https://github.com/danini/graph-cut-ransac.

    • This project does not support using ROS and Docker, at least we haven't tested, for now.

    • An additional plane detector:

      This work take PlaneRecNet [3] as the instance planar segmentation CNN (only instance segmentation is used, predicted depth is not used by far). Example segmentation images for different datasets will be provided with a downloading link, see section below -> Run Point-Plane SLAM.

      You could also segment images yourself, code please see: https://github.com/EryiXie/PlaneRecNet

    Build using CMake:

    mkdir build && cd build
    
    cmake \
        -DBUILD_WITH_MARCH_NATIVE=ON \
        -DUSE_PANGOLIN_VIEWER=ON \
        -DUSE_SOCKET_PUBLISHER=OFF \
        -DUSE_STACK_TRACE_LOGGER=ON \
        -DBOW_FRAMEWORK=DBoW2 \
        -DBUILD_TESTS=OFF \
        ..
    
    make -j4
    

    (or, highlight and filter (gcc) compiler messages)

    make -j4 2>&1 | grep --color -iP "\^|warning:|error:|"
    make -j4 2>&1 | grep --color -iP "\^|error:|"
    

    Command options to run the example code on standard dataset, e.g. TUM-RGBD:

    $ ./build/run_tum_rgbd_slam
    Allowed options:
      -h, --help             produce help message
      -v, --vocab arg        vocabulary file path
      -d, --data-dir arg     directory path which contains dataset
      -c, --config arg       config file path
      --frame-skip arg (=1)  interval of frame skip
      --no-sleep             not wait for next frame in real time
      --auto-term            automatically terminate the viewer
      --debug                debug mode
      --eval-log             store trajectory and tracking times for evaluation
      -p, --map-db arg       store a map database at this path after SLAM
    

    Known Issues

    • System crash right after initializing SLAM (a segmentation error due to g2o CSparse solver) has been fixed.

    • Visualization issue (https://github.com/PeterFWS/Structure-PLP-SLAM/issues/8) that the camera is not following the right tracking path, appears to be resolved, recent tested on Ubuntu24.04.

    Run Standard SLAM with Standard Datasets

    (1) TUM-RGBD dataset (monocular/RGB-D):

    ./build/run_tum_rgbd_slam \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/TUM_RGBD/rgbd_dataset_freiburg3_long_office_household \
    -c ./example/tum_rgbd/TUM_RGBD_mono_3.yaml
    

    (2) KITTI dataset (monocular/stereo):

    ./build/run_kitti_slam \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/KITTI/odometry/data_odometry_gray/dataset/sequences/00/ \
    -c ./example/kitti/KITTI_mono_00-02.yaml
    

    (3) EuRoC MAV dataset (monocular/stereo)

    ./build/run_euroc_slam \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/EuRoC_MAV/MH_01_easy/mav0 \
    -c ./example/euroc/EuRoC_mono.yaml
    

    Run Point-Line SLAM

    (1) TUM RGB-D (monocular/RGB-D)

    ./build/run_tum_rgbd_slam_with_line \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/TUM_RGBD/rgbd_dataset_freiburg3_long_office_household \
    -c ./example/tum_rgbd/TUM_RGBD_mono_3.yaml
    

    (2) ICL-NUIM (monocular/RGB-D)

    ./build/run_tum_rgbd_slam_with_line \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/ICL_NUIM/traj3_frei_png \
    -c ./example/icl_nuim/mono.yaml
    

    (3) EuRoc MAV (monocular/stereo)

    ./build/run_euroc_slam_with_line \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/EuRoC_MAV/MH_04_difficult/mav0 \
    -c ./example/euroc/EuRoC_mono.yaml
    

    (4) KITTI (monocular/stereo)

    ./build/run_kitti_slam_with_line \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/KITTI/odometry/data_odometry_gray/dataset/sequences/00/ \
    -c ./example/kitti/KITTI_mono_00-02.yaml
    

    Run Re-localization (Map-based Image Localization) using Pre-built Map

    First, pre-build a map using (monocular or RGB-D) SLAM:

    ./build/run_tum_rgbd_slam_with_line \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/TUM_RGBD/rgbd_dataset_freiburg3_long_office_household \
    -c ./example/tum_rgbd/TUM_RGBD_rgbd_3.yaml \
    --map-db freiburg3_long_office_household.msg
    

    Second, run the (monocular) image localization mode, notice that give the path to the RGB image folder:

    ./build/run_image_localization_point_line \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -i /data/TUM_RGBD/rgbd_dataset_freiburg3_long_office_household/rgb \
    -c ./example/tum_rgbd/TUM_RGBD_mono_3.yaml \
    --map-db freiburg3_long_office_household.msg
    

    Run Point-Plane SLAM (+ Line if Activated, see: planar_mapping_parameters.yaml)

    • We provide instance planar segmentation masks and *.txt file, which can be download here (OneDrive shared):

      https://1drv.ms/u/s!Atj7rBR0X5zagZwcFs1oIqXeV5r4Cw?e=pbnNES

    • TUM RGB-D dataset, besides the folder which saves rgb image, you need to provide folder which saves the segmentation masks and a mask.txt file.

      ./data/TUM_RGBD/rgbd_dataset_freiburg3_long_office_household/
      |
      |____./rgb/
      |____./depth/
      .
      |____./rgb.txt
      .
      .
      |____./mask/              % given by our download link
      |____./mask.txt           % given by our download link
      
    • ICL-NUIM dataset, we customize it the same way as TUM RGB-D dataset.

      ./data/ICL_NUIM/living_room_traj0_frei_png/
      |
      |____./rgb/
      |____./depth/
      .
      .
      |____./mask/              % given by our download link
      .
      |____./rgb.txt            % given by our download link
      |____./depth.txt          % given by our download link
      |____./mask.txt           % given by our download link
      |____./associations.txt   % given by our download link
      |____./groundtruth.txt    % given by our download link
      
    • EuRoC MAV dataset, we provide necessary segmentation masks in the downloading link, save the segmentation masks under folder cam0, e.g.:

      /data/EuRoC_MAV/V1_02_medium/mav0/cam0/seg/   % given by our download link
      

    Run SLAM with Piece-wise Planar Reconstruction

    • Mapping parameters can be adjusted, see planar_mapping_parameters.yaml.

    (1) TUM RGB-D (monocular/RGB-D)

    ./build/run_slam_planeSeg \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/TUM_RGBD/rgbd_dataset_freiburg3_structure_texture_far \
    -c ./example/tum_rgbd/TUM_RGBD_mono_3.yaml
    

    (2) ICL-NUIM (monocular/RGB-D)

    ./build/run_slam_planeSeg \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/ICL_NUIM/living_room_traj0_frei_png \
    -c ./example/icl_nuim/mono.yaml
    

    (3) EuRoc MAV (monocular/stereo):

    Only V1 and V2 image sequences, due to segmentation CNN failure on factory data sequences MH_01-05, as mentioned in the paper [1].

    ./build/run_euroc_slam_planeSeg \
    -v ./orb_vocab/orb_vocab.dbow2 \
    -d /data/EuRoC_MAV/V1_01_easy/mav0 \
    -c ./example/euroc/EuRoC_stereo.yaml
    

    Activate Depth-based Dense Reconstruction

    It can be easily activated in planar_mapping_parameters.yaml -> Threshold.draw_dense_pointcloud: true.

    This is a toy demo (RGB-D only).

    Evaluation with EVO tool (https://github.com/MichaelGrupp/evo)

    evo_ape tum /data/TUM_RGBD/rgbd_dataset_freiburg3_structure_texture_far/groundtruth.txt ./keyframe_trajectory.txt -p --plot_mode=xy -a --verbose -s
    

    Important flags:

    --align or -a = SE(3) Umeyama alignment (rotation, translation)
    --align --correct_scale or -as = Sim(3) Umeyama alignment (rotation, translation, scale)
    --correct_scale or -s = scale alignment
    

    Debug with GDB

    gdb ./build/run_slam_planeSeg
    
    run -v ./orb_vocab/orb_vocab.dbow2 -d /data/TUM_RGBD/rgbd_dataset_freiburg3_structure_texture_far -c ./example/tum_rgbd/TUM_RGBD_rgbd_3.yaml
    

    License

    • Notice that this work is based on the original OpenVSLAM (renamed now as stella-vslam), which is a derivative work of ORB-SLAM2 without any modification to core algorithms. It was declared in conflict with ORB-SLAM2 (see: https://github.com/stella-cv/stella_vslam/issues/249).

    • For the courtesy of ORB-SLAM2, the granted license of this project is GNU General Public License v3.0. For commercial purposes of this project, please contact department Augmented Vision (https://www.dfki.de/en/web/research/research-departments/augmented-vision), DFKI (German Research Center for Artificial Intelligence), Germany.

    • If you have any technical questions regarding to the implementation, please kindly leave an issue.