Point Cloud Library on Ubuntu 16.04 LTS

Standard

My previous blog post described how to build PCL on Ubunut 14.04 LTS.  Now Ubuntu has advanced to 16.04 LTS and PCL to version 1.8, so this post is dedicated to making this upgrade simple.

Update: a prebuilt DEB file for PCL 1.8 for Ubunut 16.04 is available here.
To install it, do

     sudo dpkg -i PCL-1.8.0-Linux.deb

Now, if you like to try build it yourself, continue.

Setup Prerequisites

To prepare the software development on Ubuntu we need setup some prerequisite tools:

     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

Build Point Cloud Library

Point Cloud Library is obtained by:

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

Now you should find pcl in your directory.  Go into it and create a release directory and follow the cmake build process:

     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

The make will take some time, so go get a cup of coffee or take that long overdue shower.  Once the build finishes, install it by:

     sudo make install

 

25 thoughts on “Point Cloud Library on Ubuntu 16.04 LTS

  1. Thanks for the nice guidance. However, I am having the same trouble as Matt (visualization/tools/CMakeFiles/pcl_hdl_viewer_simple.dir/build.make:255: recipe for target ‘bin/pcl_hdl_viewer_simple’ failed
    make[2]: *** [bin/pcl_hdl_viewer_simple] Error 1
    ).

    I then tried your prebuilt binary and seems it set up the pcl. However, when I try to import PCL python can’t still find the module. Could you please suggest >

    • Python access to PCL require python binding. This can be created using a auto-wrapper generator like SWIG3.0. This is however beyond the scope of my blog.

  2. Hi thanks heaps for the doco. Can I suggest moving the update to the top of the page? 😀

    Also, to make the manual install idiot-proof, you might add “cd pcl” and line-continuation, as in:

    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

  3. Shantnu Kakkar

    I am getting the following error at 16%:

    [ 16%] Linking CXX executable ../../bin/pcl_convert_pcd_ascii_binary
    //usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_get_peer_certificate@OPENSSL_1.0.0′
    /usr/lib/libvtkIO.so.5.10.1: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0′
    //usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `CRYPTO_num_locks@OPENSSL_1.0.0′
    //usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_get_current_compression@OPENSSL_1.0.0′
    //usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_CTX_free@OPENSSL_1.0.0′
    //usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0′
    //usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_get_version@OPENSSL_1.0.0′

  4. Leonard

    when installing the pcl from the DEB file i get some messages saying. This also happens when i try to compile
    ¨The imported target “vtkPythonCore” references the file “/usr/lib/libvtkPythonCore.so.5.10.1”
    but this file does not exist.
    This happens when the VTK libraries are installed. Is there a solution for this?

  5. Kristijan

    On executing command:
    sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
    i get ssl error:
    ssl.SSLError: unknown error (_ssl.c:3053)
    Can you please help me workaround it?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s