当前位置:   article > 正文

Linux安装PCL库_dpkg -l '*pcl*

dpkg -l '*pcl*
  1. 记录安装PCL库(point cloud library),参考PCL官网3DSmoothNet项目这里
  2. 先挑选了官网列的几项必装项安装,也能编译安装上PCL,但是基于Pybind11的3DSmoothNet(依赖于PCL)编译后的.so文件无法导入python,最后检查,猜测还是PCL安装依赖的问题,遂卸载PCL重装。以防万一,将上述链接中提到的依赖取并集,尽量都装上。
# Notes for PCL installation, 
# 1. subset dependencies
# sudo apt-get update
# sudo apt-get install g++                  # skip if already has
# sudo apt-get install cmake                # skip is already has
# sudo apt-get install libboost-all-dev     # Boost is strictly REQUIRED
# sudo apt-get install libeigen3-dev        # Eigen is strictly REQUIRED
# sudo apt-get install libflann-dev         # FLANN is strictly REQUIRED
# sudo apt-get install libvtk6-dev          # VTK is for pcl_visualization
# sudo apt-get install 'libqhull*'          # Qhull is for cl_surface
# sudo apt-get install libopenni2-dev       # OpenNI is for pcl_io

# 2. all dependencies
sudo apt-get update  
sudo apt-get install build-essential linux-libc-dev libxmu-dev libxi-dev
sudo apt-get install cmake cmake-gui
sudo apt-get install doxygen
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.9 libflann-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libvtk7.1-qt
sudo apt-get install libvtk7.1 
sudo apt-get install libvtk7-jni libvtk7-java libvtk7-dev libvtk7-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 graphviz
sudo apt-get install openjdk-8-jdk openjdk-8-jre	# 无法安装qt-sdk openjdk-9-jdk openjdk-9-jre
sudo apt-get install libopenni-dev libopenni2-dev
sudo apt-get install phonon-backend-gstreamer
sudo apt-get install phonon-backend-vlc


# 2. install PCL
#git clone --branch pcl-1.8.1 https://github.com/PointCloudLibrary/pcl pcl-trunk
# ln -s pcl-trunk pcl
git clone https://github.com/PointCloudLibrary/pcl.git
cd pcl
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=None -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON ..
make -j 8
sudo make install

# 3. uninstall PCL
sudo rm -r /usr/local/include/pcl-1.8 /usr/local/share/pcl-1.8 /usr/local/bin/pcl* /usr/local/lib/libpcl*

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  1. 编译时报了若干错误:

    1. Could NOT find ClangFormat…
    2. Could NOT find Ensenso…
    3. Could NOT find davidSDK…
    4. Could NOT find DSSDK…
    5. Could NOT find RSSDK…
    6. Could NOT find RSSDK2…
    7. No package ‘metslib’ found…
    8. Could NOT find Pcap…
  2. 部分问题的解决方案:

    1. 安装ensenso [ref]
    sudo dpkg -i ensenso-sdk-2.2.147-x64.deb   		# https://www.ensenso.com/support/sdk-download/
    sudo dpkg -i codemeter_6.80.3312.500_amd64.deb  # https://www.wibu.com/support/user/downloads-user-software.html
    
    • 1
    • 2
    1. 安装metslib
    sudo sh ./configure
    sudo make
    sudo make install
    
    • 1
    • 2
    • 3
  3. 验证安装

    cd /your_path_to_downloaded_pcl_repo/pcl/test
    pcl_viewer car6.pcd
    
    • 1
    • 2
  4. 编译用到PCL的文件

    1. 碰到形如下面的错误,检查是否有头文件没有被include
      error: ‘PointXYZ’ is not a member of ‘pcl’...
      
      • 1
    2. 关于PCL的错误
      The imported target "vtkRenderingPythonTkWidgets" references the file
         "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so" but this file does not exist....
      
      The imported target "vtk" references the file "/usr/bin/vtk" but this file does not exist.
      
      • 1
      • 2
      • 3
      • 4
      手动建立软链接(创建后可以检查一下,防止出现“标红”的快捷方式)
      sudo ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so /usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so
      sudo ln -s /usr/bin/vtk7 /usr/bin/vtk
      
      • 1
      • 2
    3. 还有下面的WARNING,暂不予处理 — ref
      ** WARNING ** io features related to pcap will be disabled
      ** WARNING ** io features related to png will be disabled
      
      • 1
      • 2
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/334014
推荐阅读
相关标签
  

闽ICP备14008679号