slam需要的第三方库的安装

xiaoxiao2021-02-28  10

 

安装kdevelop

sudo apt-get install kdevelop 安装eigen库 sudo apt-get install libeigen3-dev 安装sophus 下载sophus安装包解压进入,执行 mkdir build && cd build cmake .. make 安装opencv 依赖库  sudo apt-get install build-essential libgtk2.0-dev libvtk5-dev libjpeg-dev libjasper-dev libopenexr-dev libtbb-dev libtiff5-dev 下载opencv3安装包解压进入文件夹: mkdir build && cd build cmake .. make j4 sudo make install

 

ubuntu14.04

安装pcl sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl sudo apt-get update

sudo apt-get install libpcl-all

 

ubuntu16.04

sudo apt-getinstall libpcl-dev pcl-tools

Ubuntu16.04安装pcl,方法是直接执行 sudo apt-get install libpcl-dev pcl-tools 运行测试程序时出现以下错误 make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libproj.so', needed by 'joinMap'.  Stop. CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/joinMap.dir/all' failed make[1]: *** [CMakeFiles/joinMap.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 *** Failure: Exit code 2 *** 解决方法,执行 sudo apt-get install libproj-dev 再次编译出现以下错误 -- Build files have been written to: /home/wd/code/slambook-master/ch5/joinMap/build [ 50%] Linking CXX executable joinMap /usr/bin/ld: cannot find -lvtkproj4 collect2: error: ld returned 1 exit status CMakeFiles/joinMap.dir/build.make:349: recipe for target 'joinMap' failed make[2]: *** [joinMap] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/joinMap.dir/all' failed make[1]: *** [CMakeFiles/joinMap.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 *** Failure: Exit code 2 *** 解决方法,需要在cmakelist中加一条指令修复,即在add_executable语句前面加上list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")

安装ceres 依赖库  sudo apt-get install liblapack-dev libsuitesparse-dev libcxsparse3.1.4 libgflags-dev libgoogle-glog-dev libgtest-dev ceres安装包解压进入文件夹执行 mkdir build && cd build cmake .. make j4 sudo make install 安装g2o

ubuntu16.04下的依赖库 依赖库 sudo apt-get install libqt4-dev qt4-qmake libqglviewer-dev libsuitesparse-dev libcxsparse3.1.4 libcholmod-dev

qtdeclarative5-dev qt5-qmake

 g2o安装包解压进入文件夹执行 mkdir build && cd build cmake .. make j4 sudo make install

高博教程是ubuntu14,在运行g2o_viewer会出错,原因是在 Ubuntu 14.04 下使用的是 Qt4,而当前的 g2o 版本使用的是 Qt5

针对这个问题解决方法 https://yq.aliyun.com/wenji/275781

注意:libqglviewer-dev-qt4和libqglviewer-dev只能存在一个,在Ubuntu16.04下,Octomap的编译安装需要libqglviewer-dev-qt4,libqglviewer-dev-qt4并不能支持g2o,所以安装g2o时先装libqglviewer-dev依赖库,完成编译安装后,如需要安装Octomap,就执行sudo apt-get install libqglviewer-dev-qt4安装的时候,如果装过libqglviewer-dev,系统会将其自动卸载。安装完成后在编译安装OctoMap,如果之前编译安装过,则务必重新编译安装,使OctoMap更新一下。后再次用octovis打开八叉树地图可见已经正常。安装回libqglviewer-dev是不会影响octovis的使用的,因为它影响的只是OctoMap的编译安装。  

安装meshlab sudo add-apt-repository ppa:zarquon42/meshlab sudo apt-get update sudo apt-get install meshlab 補充 opencv3.1.0依賴庫 sudo apt-get install build-essential sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev libv4l-dev cd ~/<my_working_directory> git clone https://github.com/Itseez/opencv.git cd opencv git checkout 3.2.0 cd .. git clone https://github.com/Itseez/opencv_contrib.git cd opencv_contrib git checkout 3.2.0 进入opencv文件夹,创建build进入build执行 cmake -D CMAKE_BUILD_TYPE=Release/Debug -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=<path to opencv_contrib/modules/> .. 执行make -j2 sudo make install

 

安装sublime text3

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

 

sudo apt-get update sudo apt-get install sublime-text

Uninstall:

sudo apt-get remove sublime-text && sudo apt-get autoremove

安装octomap 依赖库sudo apt-get install doxygen 安装pangolin 将源码目录Pangolin\src\display\device下的display_x11.cpp文件做如下修改,注释下面的两行代码即可: //注释这一行GLX_SAMPLE_BUFFERS , glx_sample_buffers,  //注释这一行 GLX_SAMPLES , glx_sample_buffers > 0 ? glx_samples : 0 mkdir build && cd build cmake .. make j4 sudo make install

 

https://www.cnblogs.com/ChrisCoder/p/7222430.html

转载请注明原文地址: https://www.6miu.com/read-200110.html

最新回复(0)