一. 安装PCL(版本1.7)
1)自动安装
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get upate
sudo apt-get install libpcl-dev
在安装过程中报错缺什么库就安装什么库就行了,如果自动安装不成功,就选择下面手动编译安装
2)手动编译安装PCL
2.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.2 从github下载PCL源码
git clone https://github.com/PointCloudLibrary/pcl.git
2.3 源码编译
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
2.4 安装
sudo make install
(PCL安装参考转载:https://blog.csdn.net/fsencen/article/details/79386570
连接2: https://blog.csdn.net/lilywri823/article/details/86583269 )
(因为开始自动安装很顺利直到安装成功,所以手动编译安装教程并未亲测试,后续有时间验证...)
二. 安装QT(5.9)
1)安装依赖库文件
sudo apt-get install g++
sudo apt-get install libx11-dev libxext-dev libxtst-dev
2)安装QT
将在windows下载的qt-opensource-linux-x64-5.9.1.run复制ubuntu中,然后
./qt-opensource-linux-x64-5.9.1.run
接下来安装根据提示不断点击next就行了
(官方网站未找到qt6.5版本,qt5.9下载链接:https://download.qt.io/official_releases/qt/5.9/5.9.1/)
如果是嵌入式设备(例如: TX2)可能上面" ./***.run" 就不能被运行。
sudo apt-get install qt5-default qtcreator -y # 安装Qt Creator
(TX2安装QT 参考 https://blog.csdn.net/qq_38880380/article/details/77164901)
3)配置环境
sudo apt-get install build-essential
sudo apt-get install libqt4-dev
( QT安装 参考转载:https://blog.csdn.net/kenjianqi1647/article/details/80151932 )
三. ce30_viz 编译
ce30_viz依赖PCL点云库, QT,所以前面两步已经安装PCL,QT,接下来进行ce30_viz源码编译
cd ce30_viz-master
使用cmake 工具生成Makefile
mkdir build
cd build
cmake ..
使用make 工具编译
make
Done
四. 问题锦籍
1. 在ce30_viz-master cmake ..执行过程中遇到没有找到“vtk”
问题解决:
ln -s /usr/bin/vtk6 /usr/bin/vtk
2. 在ce30_viz-master cmake ..执行过程中 "Could Not find OpenNI2 "
问题解决:
apt-cache search openni2
sudo apt-get install libopenni2-dev
3. 在ce30_viz-master cmake ..执行过程中找不到vtkRenderingPythonTkWidgets库文件
ls -l /usr/lib/python2.7/dist-packages/vtk/libvtkRendering*
sudo ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.aarch64-linux-gnu.so /usr/lib/aarch64-linux-gnu/libvtkRenderingPythonTkWidgets.so
4. 在ce30_viz-master make 执行过程中“cannot find -lvtkproj4”
问题解决:
sudo apt-get install libproj-dev
sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev
sudo ln -s /usr/lib/libvtkproj4.so.5.10 /usr/lib/libvtkproj4.so