ubuntu安装pcl

安装依赖库

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 libpcap-dev
sudo apt-get install libflann1.9 libflann-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
sudo apt-get install vtk6 libvtk6.3 libvtk6-dev libvtk6.3-qt libvtk6-qt-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 libopenni-dev libopenni2-dev

下载源码

git clone https://github.com/PointCloudLibrary/pcl.git 

如果需要安装git,输入以下命令,不需要安装就跳过

sudo apt-get install git

编译安装

cd pcl
# 切换到指定版本 v1.9.1 再编译
git checkout pcl-1.9.1
# 创建目录
mkdir release
# 进入目录
cd release
# 1 配置cmake
cmake -DCMAKE_BUILD_TYPE=None \
      -DCMAKE_INSTALL_PREFIX=/usr/local \
      -DBUILD_GPU=ON \
      -DBUILD_apps=ON \
      -DBUILD_examples=ON ..

# 2 进行编译  ,也可以`make -j11`11为内核数 按自己的cpu内核填写 不写数字默认使用全部核心编译
make 

安装

sudo make install

测试

ubuntu安装pcl测试方法_伴着音乐入梦的博客-CSDN博客icon-default.png?t=M276https://blog.csdn.net/weixin_44577224/article/details/124134134?spm=1001.2014.3001.5502参考:

Ubuntu18.04安装PCL1.9.1(20200929) · 语雀安装ros会自带pcl1.7,ros程序可以直接调用。...https://www.yuque.com/huangzhongqing/pcl/sgw7wt

你可能感兴趣的:(PCL,c++,ubuntu)