视觉SLAM所需库
sudo apt remove --purge libreoffice*
sudo gedit /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
sudo gedit /etc/hosts
140.82.113.3 github.com
199.232.69.194 github.global.ssl.fastly.net
151.101.84.133 raw.githubusercontent.com
sudo /etc/init.d/networking restart
sudo apt update
sudo apt-get install git vim gcc cmake
sudo apt-get install autotools-dev ccache doxygen dh-autoreconf git liblapack-dev libblas-dev libgtest-dev libreadline-dev libssh2-1-dev pylint
cd ~
mkdir SLAM
cd SLAM
git clone https://github.com/gaoxiang12/slambook2
cd slambook2/3rdparty/
rm -rf *
git clone https://github.com/rmsalinas/DBow3.git
git clone https://github.com/stevenlovegrove/Pangolin.git
git clone https://github.com/strasdat/Sophus.git
git clone https://github.com/ceres-solver/ceres-solver.git
git clone https://github.com/RainerKuemmerle/g2o.git
git clone https://github.com/google/googletest.git
sudo apt-get install libeigen3-dev libgl1-mesa-dev libglew-dev libpython2.7-dev pkg-config ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavdevice-dev libdc1394-22-dev libraw1394-dev
cd Pangolin/
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
cd Sophus/
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
git clone https://gitee.com/zhi-kai/opencv.git
sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff5-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev liblapacke-dev libxvidcore-dev libx264-dev libatlas-base-dev gfortran ffmpeg
cd opencv
mkdir build
cd build
cmake ..
make -j2
sudo make install
cd ../..
sudo apt-get install liblapack-dev libsuitesparse-dev libcxsparse3 libgflags-dev libgoogle-glog-dev libgtest-dev
cd ceres-solver/
mkdir build
cd build
cmake ..
make -j2
sudo make install
cd ../..
cd g2o/
sudo apt-get install qt5-qmake qt5-default libqglviewer-dev-qt5 libsuitesparse-dev libcxsparse3 libcholmod3
mkdir build
cd build
cmake ..
make -j2
sudo make install
cd ../..
cd DBow3/
mkdir build
cd build
cmake ..
make -j2
sudo make install
sudo apt-get install libpcl-dev pcl-tools
sudo apt-get install liboctomap-dev octovis
cd ../..
cd googletest/
mkdir build
cd build
cmake ..
make -j2
sudo make install
cd ~
安装ROS
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install ros-melodic-desktop-full
sudo apt install python-rosdep
sudo rosdep init
rosdep update
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential