sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg.dev libtiff5.dev libswscale-dev libjasper-dev
漫长的等待…
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
配置失败
网速问题,将ippicv_linux_20151201.tgz下载后复制到相应文件夹下,重新打开一个终端进行编译配置(必须重新打开一个终端)
配置成功:
sudo make -j4
sudo make install
https://eigen.tuxfamily.org/index.php?title=Main_Page
mkdir build
cd build
cmake ..
sudo install make
sudo cp -r /usr/local/include/eigen3/Eigen /usr/local/include
git clone https://github.com/stevenlovegrove/Pangolin.git
sudo apt-get install libglew-dev libboost-dev libboost-thread-dev libboost-filesystem-dev libpython2.7-dev
cd Pangolin
mkdir build && cd build
cmake ..
cmake --build .
make -j4
sudo make install
cd Pangolin/build/examples/HelloPangolin
./HelloPangolin
git clone https://github.com/dorian3d/DBoW2.git
cd DBoW2
mkdir build
cd build
cmake ..
make -j4
sudo make install
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8
sudo vim ~/.bashrc
#using C++ 11
alias g++='g++-4.8 -std=c++11'
source ~/.bashrc
wget http://ftp.gnu.org/gnu/gdb/gdb-7.6.1.tar.gz
tar -xzvf gdb-7.6.1.tar.gz
cd gdb-7.6.1
./configure
make
make install
sudo apt install libgt4-dev qt4-qmake libqglviewer-dev libsuitesparse-dev libcxsparse3.1.4 lincholmod3.0.6
sudo apt install libqglviewer-dev-qt4 //少了这一个一直报错
sudo apt-get update
sudo apt-get upgrade
git clone https://github.com/RainerKuemmerle/g2o.git
mkdir build
cd build
cmake ..
make -j4
sudo make install
参考博客:https://blog.csdn.net/hfuttobuaa/article/details/124276205
# 下载cmake源码包
wget https://github.com/Kitware/CMake/releases/download/v3.23.0/cmake-3.23.0-linux-x86_64.tar.gz
tar -xzvf cmake-3.23.0-Linux-x86_64.tar.gz
sudo mv cmake-3.23.0-Linux-x86_64 /opt/cmake-3.23.0
sudo ln -sf /opt/cmake-3.23.0/bin/* /usr/bin/
查看cmake版本
cmake --version
添加至系统:
sudo gedit ~/.bashrc
export PATH=$PATH:/opt/cmake-3.23.0/bin
刷新配置:
source ~/.bashrc
cd ORB_SLAM2
chmod +x build.sh
./build.sh
内存不足出错
解决方法:增加swap space 交换空间
解决办法参考:
https://www.jianshu.com/p/901399e0e44b
sudo dd if=/dev/zero of=/media/swapfile.img bs=1024 count=1M
sudo mkswap /media/swapfile.img
# Add this line to /etc/fstab
sudo gedit /etc/fstab
//加入
/media/swapfile.img swap swap sw 0 0
// 激活
sudo swapon /media/swapfile.img
cd /home/airfree/Desktop/ORB_SLAM2-master
./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml /home/airfree/Desktop/rgbd_dataset_freiburg1_xyz/rgbd_dataset_freiburg1_xyz/