Ubuntu 16.04 Installing the PCL library and testing

Source: Internet
Author: User
Tags git clone

Reference Link: 78446600
Refer to the blog, the official website has been installed unsuccessful, later reference to a blog post finally installed successfully, recorded as follows.
1. Pre-installed dependent libraries are required. The website has been installed using PPA, it is relatively simple, but after the installation of errors. (ubuntu16.04 when pre-installed with PPA, the last sentence apt-get install libpcl-all should be changed to Apt-get install Libpcl-dev (as if the former is for ubuntu14.04, the latter for Ubuntu 16.04), although it can run successfully, still not recommended, because I use this method behind or there is a mistake! )
Install the dependent libraries in turn:

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. Download the source code and compile

  git clone https://github.com/PointCloudLibrary/pcl.git 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-j4 (number of threads selected according to the situation) sudo make install  
    1. Test
      Follow the steps above to generate a. cpp file run will find the header file not found because of the need to use CMake compilation (including connecting to the PCL library, etc.)
      Specific operation directly refer to the official website (http://pointclouds.org/documentation/tutorials/using_pcl_pcl_config.php#using-pcl-pcl-config)
      The steps include:
      (1). Generate Pcd_write.cpp under the project folder (see the links provided on the official website)
      (2). Generate CMakeLists.txt, copy the content directly (no modification is required):

      cmake_minimum_required(VERSION 2.6 FATAL_ERROR)project(MY_GRAND_PROJECT)find_package(PCL 1.3 REQUIRED COMPONENTS common io)include_directories(${PCL_INCLUDE_DIRS})link_directories(${PCL_LIBRARY_DIRS})add_definitions(${PCL_DEFINITIONS})add_executable(pcd_write_test pcd_write.cpp)target_link_libraries(pcd_write_test ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES})           

      (3). Compile and run

      cd /PATH/TO/MY/GRAND/PROJECT (project 所在的文件夹)mkdir buildcd buildcmake ..make./pcd_write_test

Ubuntu 16.04 Installing the PCL library and testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.