UBUNTU20.04配置pcl开发环境
时间: 2023-12-19 17:06:29 浏览: 91
好的,针对您的问题,我可以给您提供以下步骤:
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 libvtk6-dev libvtk6.3-qt
sudo apt-get install libvtk7-dev libvtk7-qt-dev
```
2. 下载PCL源码
```
git clone https://github.com/PointCloudLibrary/pcl.git
```
3. 编译安装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 -j8
sudo make install
```
4. 配置环境变量
```
echo "export PCL_ROOT=/usr/share/pcl-1.8" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
source ~/.bashrc
```
5. 测试PCL是否安装成功
```
pcl_viewer
```
如果能够打开PCL Viewer,则说明PCL已经成功安装。
阅读全文