zoukankan      html  css  js  c++  java
  • ubuntu16.04下安装运行PL-SLAM

    PL-SLAM是Ruben Gomez-Ojeda大神融合点和线特征SLAM的最新成果,并开放了源代码,本博文记录安装运行PL-SLAM遇到的一些问题。

    1源代码地址

    https://github.com/rubengooj/pl-slam

    2编译配置PL-SLAM

    安装依赖

    OpenCV 3.x.x

    It can be easily found at http://opencv.org.
    建议安装OpenCV 3.1.0,否则编译过程中会出现一些.so文件的错误,推测作者可能用的这个版本。

    参考教程

    https://www.cnblogs.com/feifanrensheng/p/9042813.html

    Eigen3 (tested with 3.2.92)

    sudo apt-get install libeigen3-dev

    Boost

    sudo apt-get install libboost-dev

    g2o - General Graph Optimization

    It can be found at:
    https://github.com/RainerKuemmerle/g2o.git
    这里在编译时可能会出现错误,将安装好的g2o文件夹中的cmake_modules文件夹复制到~/pl-slam文件夹中即可。

    YAML (tested with 0.5.2)

    Installation on Ubuntu:

    sudo apt-get install libyaml-cpp-dev

    stvo-pl

    It can be found at:

    https://github.com/rubengooj/stvo-pl
    这个项目同样是作者的工作,必须安装这个项目,因为会用到这个项目的东西。

    MRPT

    https://github.com/MRPT/mrpt/tree/0c3d605c3cbf5f2ffb8137089e43ebdae5a55de3

    必须使用这个指定版本的MRPT,否则会编译报错

    Line Descriptor

    We have modified the line_descriptor module from the OpenCV/contrib library (both BSD) which is included in the 3rdparty folder.
    这里不用操作,后面的脚本build.sh会一并安装。
    但是这里值得特别注意,一般情况下我们安装OpenCV就够用了,但是为了使用line_descriptor,必须安装opencv_contrib,而且最好同时安装,否则会可能出现一些错误。

    Configuration and generation

    cd ~/pl-slam
    sh build.sh

    编译过程会出现找不到g2o库文件的错误,通过以下方式解决

    cd /usr/local/lib
    sudo ln -sv libg2o_csparse_extension.so libg2o_ext_csparse.so

    Usage
    Datasets configuration

    We employ an environment variable, ${DATASETS_DIR}, pointing the directory that contains our datasets. Each sequence from each dataset must contain in its root folder a file named dataset_params.yaml, that indicates at least the camera model and the subfolders with the left and right images. We provide dataset parameters files for several datasets and cameras with the format xxxx_params.yaml.
    关键是设置数据集路径的环境变量,阅读~/pl-slam/app/plslam-dataset.cpp可以加深理解。

    gedit ~/.bashrc
    export DATASETS_DIR=/home/zn(改为你的工作目录)
    source ~/.bashrc

    在KITTI下载kitti/00数据,并将其放到~/KITTI目录下。
    将~/pl-slam/config/dataset_params/kitti00-02.yaml复制到~/KITTI/kitti/00,然后将kitti00-02.yaml改为dataset_params.yaml.
    将~/pl-slam/config/config/config_kitti.yaml中vocabulary_p和vocabulary_l的路径改为自己的。


    SLAM Application

    ./build/plslam_dataset kitti/00 -c config/config/config_kitti.yaml -o 100 -s 2 -n 1000


     至此,整个编译测试过程完成。


     

  • 相关阅读:
    Ajax配合Node搭建服务器,运用实例
    mapMutations m
    seaJS使用教程
    节流函数
    【Gin-API系列】Gin中间件之日志模块(四)
    【Gin-API系列】配置文件和数据库操作(三)
    【Gin-API系列】请求和响应参数的检查绑定(二)
    【Gin-API系列】需求设计和功能规划(一)
    【ansible】api 调用出现ssh交互式输入
    【ansible】api 调试
  • 原文地址:https://www.cnblogs.com/feifanrensheng/p/11593973.html
Copyright © 2011-2022 走看看