ubuntu16.04运行PL-SVO
作者:互联网
####仅作为笔记
安装的是不需要ROS的版本
环境:
SVO
MRPT
Line descriptor(在第三方库里已包含,不需要单独安装)
照例贴出build.sh下内容:
#其实就是对第三方库编译,以及编译pl-svo
echo "Building 3rdparty/line_descriptor ... "
cd 3rdparty/line_descriptor
mkdir build
cd build
cmake ..
make -j4
cd ../../../
echo "Building PL-SVO ... "
mkdir build
cd build
cmake ..
make -j4
- SVO
#参照 https://github.com/uzh-rpg/rpg_svo/wiki/Installation:-Plain-CMake-(No-ROS)
(1)依赖
sudo apt-get install libboost-all-dev
sudo apt-get install libeigen3-dev
(2)opencv
sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg.dev libtiff4.dev libswscale-dev libjasper-dev
#在http://opencv.org/releases.html下载指定版本的opencv,这里以opencv3.4.5举例
unzip opencv-3.4.5.zip
cd opencv-3.4.5
mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make -j4 && sudo make install
sudo gedit /etc/ld.so.conf.d/opencv.conf 文件内加入/usr/local/lib
sudo gedit ~/.bashrc 加入:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
source ~/.bashrc
(3)Sophus
cd workspace #由于安装的是不使用ros的版本,所以可以自建一个普通文件夹存放这些依赖包
git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout a621ff
mkdir build
cd build
cmake ..
make
(4)Fast
cd workspace
git clone https://github.com/uzh-rpg/fast.git
cd fast
mkdir build
cd build
cmake ..
make
(5)g2o
cd workspace
git clone https://github.com/RainerKuemmerle/g2o.git
cd g2o
mkdir build
cd build
cmake ..
make
sudo make install
(6)vikit_common
cd workspace
git clone https://github.com/uzh-rpg/rpg_vikit.git
#在rpg_vikit/vikit_common/CMakeLists.txt修改USE_ROS为FALSE
cd rpg_vikit/vikit_common
mkdir build
cd build
cmake ..
make
(7)SVO
cd workspace
git clone https://github.com/uzh-rpg/rpg_svo.git
cd rpg_svo/svo
#在svo/CMakeLists.txt中将USE_ROS修改为FALSE
mkdir build
cd build
cmake ..
make
- MRPT
sudo apt-get install libmrpt-dev
- 安装pl-svo
cd pl-svo
chmod +x build.sh
./build.sh
#如果遇到编译的问题,参考:
https://zhuanlan.zhihu.com/p/76927743?from_voters_page=true
https://blog.csdn.net/zhiwei121/article/details/101553669?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromBaidu-1.channel_param&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromBaidu-1.channel_param
https://github.com/rubengooj/pl-svo/issues
- 测试
# 预设数据集路径
sudo gedit ~/.bashrc
#修改为你自己的数据集路径加入到.bashrc中
export DATASETS_DIR=/home/xxx/Datastes/MH_01easy/
./run_pipeline <dataset_path>
#<dataset_path>指的是相对于必须预先设置的环境变量${DATASETS_DIR}的序列文件夹。遵循pl-svo / config中的示例,该序列文件夹必须包含名为dataset_params.yaml的数据集配置文件,其 images_subfolder指的是图像子文件夹。
#这里具体的文件夹设置格式参照https://github.com/rubengooj/pl-svo/issues/2,按照人家设置的分级目录修改即可
- 测试结果
标签:ubuntu16.04,git,..,SVO,cd,build,rpg,svo,PL 来源: https://blog.csdn.net/wyy13273181006/article/details/108807384