目录
0、安装git
sudo apt-get install git
(SLAM高翔资料)
git clone https://github.com/gaoxiang12/slambook
1、安装vim
sudo apt-get install vim
2、安装g++
sudo apt-get install g++
3、安装CMAKE
sudo apt-get install cmake
4、安装kdevelop
sudo apt-get install kdevelop
可能出现问题:
解决办法:sudo apt-get update
5、安装Egien库
sudo apt-get install libeigen3-dev
检验:kedevelop->ch3/useEigen
6、安装Panggolin(可视化)
先安装依赖: sudo apt-get install libglew-dev
-------------------sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev
安装panggolin: git clone https://github.com/stevenlovegrove/Pangolin
进入下载目录: cd ./Pangolin
mkdir bulid
cd ./bulid
cmake ..
make
sudo make install
检验:kedevelop->ch3/visualizeGeometry
7、安装Sophus库
它直接在eigen的基础上开发,无须额外的依赖库。只需编译即可,无须安装。
切换到压缩包所在的目录下,tar -zxvf Sophus.tar.gz -C /这里写指定想要放置该文件的位置
cd ./Sophus
mkdir build
cd build
cmake ..
make
可能遇到的问题:
解决办法:cd ./Sophus/sophus
vim so2.cpp
更改如下->
检验:kdevelop-> ch4/useSophus
8、安装opencv4.1.1
suod apt-get update
//更新一把
wget https://github.com/opencv/opencv/archive/4.1.1.zip
(从opencv官网)
unzip 4.1.1 //即文件名字 看情况或改成 unzip 4.1.1.zip
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
cd ./opencv
mkdir build
cd build
cmake ..
make
sudo make install
cmake …时可能出现的问题:-- Checking for module ‘gtk±3.0’ – No package ‘gtk±3.0’ found – Checking(也可以不管,用到的时候再安装也行)
解决:
在CMakeLists.txt文件里添加:
sudo apt-get install libgtk-3-dev
如果看到这 IPPICV: Download: ippicv_2017u2_lnx_intel64_20170418.tgz
是正常的,这一步会有点慢,耐心一点
make时可能出现的问题:12: fatal error: Eigen/Core: 没有那个文件或目录 # include <Eigen/Core> ^~~~~~~~~~~~ compilation terminated. modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_test_core_p
解决:到相应文件里改成如下->
include_directories("/usr/include/eigen3")
9、安装pcl
sudo apt-get install libpcl-dev
sudo apt-get install pcl-tools
后面要用的话:ch5例子
cd ./joinMap
mkdir build
cd ./build
cmake ..
make
对了bulid文件里面会有map.pcd
查看:
pcl_viewer map.pcd
10、ceres(谷歌做的)
git clone https://github.com/ceres-solver/ceres-solver.git
cd ./ceres-solver
mkdir build
cd ./build
cmake ..
make
sudo make install
11、g2o
github 里面
git clone https://github.com/RainerKuemmerle/g2o.git
cd ./g2o
mkdir build
cd ./build
cmake ..
make
sudo make install
安装依赖sudo apt-get install libsuitesparse-dev