orb-slam2_with_semantic_label配置

要求:        * Ubuntu 14.04/Ubuntu 16.04/Ubuntu 18.04

                   * ORB-SLAM2 
                   * CUDA 8 or CUDA 9, may not work with CUDA 10
                    * C++11(must)
                    * GCC >= 5.0
                    * cmake
                    * OpenCV2 or OpenCV3, may not work with OpenCV4
                     * PCL1.7 or PCL1.8, may not work with PCL1.9

本机环境:ubuntu16.04+CUDA8.0+Opencv3.3.0+PCL1.8

源码:https://github.com/qixuxiang/orb-slam2_with_semantic_label

1 安装ORBSLAM2

https://github.com/raulmur/ORB_SLAM2

2 安装darknet

https://pjreddie.com/darknet/yolo/

安装步骤:

  • 下载源码

git clone https://github.com/pjreddie/darknet
cd darknet
make
  • 在darknet目录下下载 yolov3.weights

wget https://pjreddie.com/media/files/yolov3.weights
  • 测试

./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg

orb-slam2_with_semantic_label配置_第1张图片

orb-slam2_with_semantic_label配置_第2张图片

3 编译与运行

 编译: 

mkdir build && cd build

cmake ..

make  -j4

sudo make install

运行:

  • 从darknet下载 `yolov3.weights`, `yolov3.cfg` and `coco.names` 放在/home/xxx/orb-slam2_with_semantic_label-master/bin目录下,并在bin目录下创建一个文件夹img

cd orb-slam2_with_semantic_label-master/bin

sudo mkdir img
  • 下载序列http://vision.in.tum.de/data/datasets/rgbd-dataset/download,解压后放在‘data’下

  • 下载 python script 即associate.py,并进行数据关联

http://vision.in.tum.de/data/datasets/rgbd-dataset/tools
 python associate.py PATH_TO_SEQUENCE/rgb.txt PATH_TO_SEQUENCE/depth.txt > associations.txt
  • 从darknet中找到yolov3.weights和yolov3.cfg替换安装包里的yolov3.weights和yolov3.cfg

 

cd orb-slam2_with_semantic_label-master/bin

./rgbd_tum ../Vocabulary/ORBvoc.txt ../Examples/RGB-D/TUM2.yaml ../data/rgbd_dataset_freiburg2_rpy/ ../data/rgbd_dataset_freiburg2_rpy/associations.txt

 

查看点云:

cd orb-slam2_with_semantic_label-master/bin 

pcl_viewer segmentation.pcd 

 

orb-slam2_with_semantic_label配置_第3张图片

大多数的运行不出来都是环境的问题,慢慢调试就好了,上传一个我运行成功的代码。

链接:https://pan.baidu.com/s/1ye8OvwbJXMKa4rvSfgf56g 
提取码:3ggf 

 

你可能感兴趣的:(orb-slam2_with_semantic_label配置)