ubuntu下slam十四講環境安裝
第0章,安裝c++與cmake,建立環境
#安裝c++支援
sudo apt install build-essential
#安裝cmake
sudo apt install cmake
第3章,包括eigen3,opengl,opencv以及pangolin
#安裝eigen3
sudo apt install libeigen3-dev
#安裝opengl
安裝必要的依賴以及opengl本體
sudo apt-get install libgl1-mesa-dev
sudo apt-get install freeglut3-dev
sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev
#安裝pangolin
安裝pangolin需要cpp, eighen3, opengl,安裝完成之後,正式安裝pangolin
git clone https://github.com/stevenlovegrove/Pangolin
直接連結github較慢,請自行尋找github的映象站。
安裝其他依賴
sudo apt-get install wayland-protocols
然後進行原始碼的編譯。
編譯結束後,sudo vim /etc/ld.so.conf
並在檔案中加入/usr/local/lib
儲存退出後,執行sudo ldconfig
第四章,包括fmt,sophus
安裝fmt
git clone https://github.com/fmtlib/fmt
安裝sophus
sophus需要安裝依賴:fmt
git clonehttps://github.com/strasdat/Sophus
第四章案例執行成功,如fmt報錯,則需要在CMakeLists.txt中加入target_link_libraries(trajectoryError ${Sophus_LIBRARIES} fmt)
提供fmt支援。第四章完結。
第五章,包括opencv
安裝opencv的依賴(注意,此處必須先裝)
sudo apt install libgtk2.0-dev
sudo apt install pkg-config
安裝opencv
提示缺少元件,安裝
sudo apt-get install libcanberra-gtk-module
sudo apt-get install libboost-all-dev
第六章,ceres-solver, gflags, glog and so on
安裝ceres-solver
需要依賴
sudo apt-get install liblapack-dev libsuitesparse-dev libcxsparse3 libgflags-dev libgoogle-glog-dev libgtest-dev
安裝g2o
需要依賴
sudo apt-get install qt5-qmake qt5-default libqglviewer-dev-qt5 libsuitesparse-dev libcxsparse3 libcholmod3