SLAM开发环境安装记录

Feb 20,2021   6544 words   24 min

Tags: SLAM

0.背景

在之前的这篇博客里已经介绍了SLAM开发环境的配置。这篇博客更加细致一些,将我前阵子自己电脑上记录的安装log以及.bashrc文件贴出来,方便使用。安装的软件包括:Nvidia Driver、CUDA、Eigen、g2o、OctoMap、Sophus、Pangolin、glog、gflags、Ceres、OpenCV、DBoW3、ROS Kinetic、Kalibr。

1.安装记录

0.Base packages [2021.1.16]
	dpkg -i dkms_2.2.0.3-2ubuntu11.8_all.deb
	dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb

1.Wifi Driver [2021.1.16]
	cp linux-firmware/iwlwifi-* /lib/firmware/
	dpkg -i backport-iwlwifi-dkms_8042-0ubuntu2_all.deb

2.Linux Kernel 5.9 [2021.1.16]
	dpkg -i *.deb

3.Nvidia Driver 450.80.02 [2020.1.16]
	Ctrl+Alt+F1进入命令行
	service lightdm stop
	./NVIDIA-Linux-x86_64-450.80.02.run -no-opengl-files

3.CUDA 10.2 [2021.1.16]
	sh cuda_10.2.89_440.33.01_linux.run
		===========
		= Summary =
		===========

		Driver:   Not Selected
		Toolkit:  Installed in /usr/local/cuda-10.2/
		Samples:  Installed in /root/, but missing recommended libraries

		Please make sure that
		 -   PATH includes /usr/local/cuda-10.2/bin
		 -   LD_LIBRARY_PATH includes /usr/local/cuda-10.2/lib64, or, add /usr/local/cuda-10.2/lib64 to /etc/ld.so.conf and run ldconfig as root

		To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-10.2/bin

		Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-10.2/doc/pdf for detailed information on setting up CUDA.
		***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 440.00 is required for CUDA 10.2 functionality to work.
		To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
		    sudo <CudaInstaller>.run --silent --driver

4.Eigen 3.3.9 [2021.1.16]
	wget https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.zip
	mkdir build
	cd build
	cmake ..
	make
	make install

5.g2o [2021.1.16]
	git clone https://github.com/RainerKuemmerle/g2o.git
	mkdir build
	cd build
	cmake ..
	make
	make install

6.OctoMap [2021.1.16]
	git clone https://github.com/OctoMap/octomap.git
	mkdir build
	cd build
	cmake ..
	make
	make install

7.Sophus [2021.1.16]
	git clone https://github.com/strasdat/Sophus.git
	mkdir build
	cd build
	cmake ..
	make
	make install

8.Pangolin [2021.1.16]
	sudo apt install libgl1-mesa-dev
	sudo apt install libglew-dev
	sudo apt install libpython2.7-dev
	sudo apt install libegl1-mesa-dev libwayland-dev libxkbcommon-dev wayland-protocols
	sudo apt install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavdevice-dev
	sudo apt install libdc1394-22-dev libraw1394-dev
	sudo apt install libjpeg-dev libpng12-dev libtiff5-dev libopenexr-dev
	git clone https://github.com/stevenlovegrove/Pangolin.git
	mkdir build
	cd build
	cmake ..
	make
	make install

9.glog [2021.1.16]
	git clone https://github.com/google/glog.git
	cmake -H. -Bbuild -G "Unix Makefiles"
	cmake --build build
	cmake --build build --target test
	cmake --build build --target install

10.gflags [2021.1.16]
	git clone https://github.com/gflags/gflags.git
	mkdir build
	cd build
	cmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON ..
	make
	make install

11.Ceres 1.14.0 [2021.1.16]
	apt-get install libatlas-base-dev liblapack-dev
	apt-get install libsuitesparse-dev libcxsparse3
	git clone https://ceres-solver.googlesource.com/ceres-solver
	mkdir build
	cd build
	cmake ..
	make
	make install

12.OpenCV 3.4.6  [2021.1.16]
	apt-get install libgtk2.0-dev libjpeg-dev libpng-dev libtiff-dev
	apt-get install ccache libgphoto2-dev libopenblas-base libopenblas-dev
	apt-get install doxygen openjdk-8-jdk libvtk6-dev
	apt-get install libgtk-3-dev liblapacke-dev
	apt-get install tesseract-ocr libtesseract-dev
	# cmake参数较多,建议使用cmake-gui进行配置
	mkdir build
	cd build
	cmake ..
	make
	make install

13.DBoW3 [2021.1.16]
	git clone https://github.com/rmsalinas/DBow3.git
	mkdir build
	cd build
	cmake ..
	make
	make install

14.ROS Kinetic [2021.1.16]
	sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
	sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
	apt-get update
	apt-get install ros-kinetic-desktop-full
	echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
	source ~/.bashrc
	apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
	apt install python-rosdep
	rosdep init
	rosdep update

15.Kalibr [2020.1.17]
	apt-get install python-software-properties python-scipy python-git python-catkin-tools libv4l-dev
	apt-get install python-setuptools python-rosinstall ipython libeigen3-dev libboost-all-dev doxygen libopencv-dev
	apt-get install python-software-properties software-properties-common libpoco-dev python-matplotlib python-scipy python-git python-pip ipython libtbb-dev libblas-dev liblapack-dev python-catkin-tools libv4l-dev 

2.bashrc文件

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi


#---------------------------------------------------------------------------------------------------------------
# NVCC & CUDA
export PATH=/usr/local/cuda-10.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH
#---------------------------------------------------------------------------------------------------------------

#---------------------------------------------------------------------------------------------------------------
# JAVA
export JAVA_HOME=/root/programs/jdk-15.0.1/
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:.
#---------------------------------------------------------------------------------------------------------------

#---------------------------------------------------------------------------------------------------------------
# ROS
source /opt/ros/kinetic/setup.bash
source /root/catkin_ws/devel/setup.bash
#---------------------------------------------------------------------------------------------------------------

#---------------------------------------------------------------------------------------------------------------
# ORB-SLAM2/3 ROS Node
# export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/root/Codes/ORB_SLAM2/Examples/ROS
# export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/root/Codes/ORB_SLAM3/Examples/ROS
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/root/Codes/ORB_SLAM2_GCN/Examples/ROS
# export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/media/root/T7/PCL_Internship/ORB_SLAM2_GCN/Examples/ROS
#---------------------------------------------------------------------------------------------------------------

#---------------------------------------------------------------------------------------------------------------
# Kalibr
# source /root/Codes/kalibr_workspace/devel/setup.bash
#---------------------------------------------------------------------------------------------------------------

本文作者原创,未经许可不得转载,谢谢配合

返回顶部