解决ubuntu16.04+cuda9.0编译PCL1.9.1出错的问题,出错问题是
pcl/gpu/utils/src/repacks.cu(84): error: identifier "copy_fields_t" is undefinedpcl/gpu/utils/src/repacks.cu(84): error: expected a ";"pcl/gpu/utils/src/repacks.cu(96): error: namespace "pcl::device" has no member "copy_fields_t"
直接换成编译PCL1.9.0即可解决问题。
一.安装依赖库
-
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
二.下载PCL1.9.0
去github上搜索PCL下载pcl1.9.0的源码
三.编译
解压pcl1.9.0的源码在home目录下
cd pcl-pcl-1.9.0
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON \
-DCMAKE_INSTALL_PREFIX=/usr ..
make
sudo make install
四.安装openni
-
sudo apt-get install libopenni-dev
-
sudo apt-get install libopenni2-dev