背包激光雷达技术文档(从入门到放弃)
安装ubuntu16.04版本,并更换镜像源(建议清华源或者阿里源)
更换镜像源办法
https://jingyan.baidu.com/article/851fbc37fe45773e1f15abe0.html
2.安装ros(kinetic版本)
https://blog.csdn.net/mulong11/article/details/105566990
安装opencv4.3.0
https://blog.csdn.net/c2250645962/article/details/107160521/
安装 GTSAM (Georgia Tech Smoothing and Mapping library, 4.0.0-alpha2)
https://github.com/borglab/gtsam/archive/4.0.0-alpha2.zip
下载链接中的文件,并提取到home中
cd gtsam-4.0.0-alpha2
mkdir build & cd build
cmake ..
sudo make install
5.安装VTK
1> 首先安装X11
sudo apt-get install libx11-dev libxext-dev libxtst-dev libxrender-dev libxmu-dev libxmuu-dev
2> 安装OpenGL
sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev
3> 安装 CMake-gui
sudo apt-get install cmake cmake-gui
4> 下载VTK7.1.1 https://www.vtk.org/download/
5> 安装VTK
终端输入下指令,启动cmake-gui
设置where is the source code:的路径为文件夹VTK-7.1.1所在路径,如这里是/home/js/VTK-7.1.1;
设置where to build the binaries:的路径为/home/js/VTK-7.1.1/build,即在/home/VTK-7.1.1的路径下新建文件夹build;如下图
点击“Configure”,在弹出对话框中选择“Current Generator”为“Unix MakeFiles”,完成之后会提示“Configuring done”;
然后在里面勾选“VTK_GROUP_Qt”选项,再次点击“Configure”按钮,若提示警告信息,需要设置Qt安装路径,则设置路径后,再次点击“Configure”按钮;
提示“Configure done”,点击“Generate”按钮,在vtk_build会生成工程文件,完成之后会提示“Generating done”,如下图
cd到vtk目录下的build文件夹,若没有则在使用$mkdir build来创建
编译安装
sudo make
sudo make install
安装PCL
1>安装依赖
sudo apt-get update
sudo apt-get install git build-essential linux-libc-dev
sudo apt-get install cmake cmake-gui
sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev
sudo apt-get install mpi-default-dev openmpi-bin openmpi-common
sudo apt-get install libflann1.8 libflann-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev
sudo apt-get install libqhull* libgtest-dev
sudo apt-get install freeglut3-dev pkg-config
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install mono-complete
sudo apt-get install qt-sdk openjdk-8-jdk openjdk-8-jre
2> 可视化相关函数库安装
sudo apt-get install libopenni-dev
sudo apt-get install libopenni2-dev
3> 下载PCL
https://github.com/PointCloudLibrary/pcl.git
4> 编译PCL
cd pcl
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr
-DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON
-DCMAKE_INSTALL_PREFIX=/usr ..
Make
编译lio-sam
Home目录下mkdir –p catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/TixiaoShan/LIO-SAM.git
cd ..
catkin_make
如果catkin_make编译失败(一般缺少两个包,提示缺少什么安装什么)
例如:
那么
sudo apt-get install ros-kinetic-cv-bridge