code of 14 lectures on visual SLAM 2nd built on Windows 10 using WSL(Ubuntu 16.04)
若想安裝CMake
以外的第三方函示庫(含Python的)可執行build.sh
來安裝
sh build.sh
Ubuntu 16.0 預設Cmake版本是3.5,但版本過舊,所以使用Cmake編譯一些第三方函式庫時會有問題,因此建議使用以下指令來更新到3.16以上
sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.16/cmake-3.16.0.tar.gz
tar xf cmake-3.16.0.tar.gz
cd cmake-3.16.0
./configure
cmake .
make
sudo make install
接著,為了解決路徑問題,所以要加到環境變數
sudo gedit ~/.bashrc
在.bashrc中加入以下兩行
export PATH=/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
再來更新環境變數
source ~/.bashrc
最後使用以下指令即可看到新版的Cmake
cmake --version
輸入此指令安裝
wget https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.zip
unzip eigen-3.3.9.zip
cd eigen-3.3.9
mkdir build && cd build
cmake ..
make
sudo make install
先用此指令安裝Glew
sudo apt-get install libglew-dev
再照著以下步驟安裝
git clone https://github.com/zzx2GH/Pangolin.git
cd Pangolin
mkdir build && cd build
cmake ..
cmake --build .
由於新版的Pangolin有些問題,所以這裡安裝舊版
照以下步驟安裝
git clone https://github.com/fmtlib/fmt.git
cd fmt
mkdir build && cd build
cmake ..
make
sudo make install
照以下步驟安裝
git clone http://github.com/strasdat/Sophus.git
cd Sophus
mkdir build && cd build
cmake ..
sudo make install
如果用到模板類的Sophus需要進行以下更改
SE3
需要#include<sophus/se3.h>
SO3
需要#include<sophus/so3.h>
SE3d
與SO3d
改成用模板類別,因此改成SE3
與SO3
安裝3.4.3
,照以下步驟
sudo apt-get install build-essential cmake
wget https://github.com/opencv/opencv/archive/3.4.3.zip
unzip 3.4.3.zip
cd opencv-3.4.3
mkdir -p build && cd build
cmake ..
make
sudo make install
使用此指令安裝
sudo apt-get install libboost-all-dev
先安裝依賴庫
sudo apt-get install libsuitesparse-dev
使用
qmake -v
確認QT版本是否為5,這樣使用g2o_viewer
才不會有問題
再照以下步驟安裝
git clone https://github.com/RainerKuemmerle/g2o.git
cd g2o
mkdir build && cd build
cmake ..
make
sudo make install
照以下步驟安裝
git clone https://github.com/gflags/gflags
cd gflags
mkdir build && cd build
cmake ..
make
sudo make install
照以下步驟安裝
git clone https://github.com/google/glog
cd glog
mkdir build && cd build
cmake ..
make
sudo make install
照以下步驟安裝
git clone https://github.com/ceres-solver/ceres-solver.git
cd ceres-solver
mkdir build && cd build
cmake ..
make
sudo make install
照以下步驟安裝
git clone https://github.com/rmsalinas/DBow3.git
cd DBow3
mkdir build && cd build
cmake ..
make
sudo make install
照以下步驟安裝
wget https://www.vtk.org/files/release/8.2/VTK-8.2.0.zip
unzip VTK-8.2.0.zip
cd VTK-8.2.0
mkdir -p build && cd build
cmake ..
make
sudo make install
照以下步驟安裝
wget https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.9.1.zip
unzip pcl-1.9.1.zip
cd pcl-pcl-1.9.1
mkdir -p build && cd build
cmake ..
make
sudo make install
照以下步驟安裝
git clone https://github.com/OctoMap/octomap.git
cd octomap
mkdir build && cd build
cmake ..
make
sudo make install
Gauss Newton | ceres-solver | g2o |
---|---|---|
![]() |
![]() |
![]() |
Visual studio code
- Visual Studio Code Extensions
- github : https://github.com/gaoxiang12/slambook2
- SLAM視覺十四講:雙倍內容強化版 (
ISBN:9789865501044
)