January 13, 2016

Installation Guide of Kinfu and CUDA

  • 1. Preparation 
  • OS : Ubuntu 14.04 (LTS)
  • gcc version : 4.8
  • g++ version : 4.8
  • Nvidia GPU : Geforce GTX 970
  • Recorder : Howard
  • Because  kinfu library is not included in the normal pcl package, so you cannot  build the package from PPA or pcl-1.7.2 , you have to build from source  and the package is pcl-master that you could git from github . In this  tutorial, I will show you step by step to set up the packages. 

  • 2. Before Start
  1. Before  we start to build  pcl-trunk, I assume that you already build and  install pcl packages on your computer and could execute the program (ex.  pcl_write.cpp) successfully. 
  1. First,  you have to install CUDA and your GPU driver. Please visit  nvidia  official website for more detail information. After finishing  install  CUDA tool-Kit,  you shall able to run the sample code (ex. nbody)  successfully. 
  • For more information : 

  • 3. Main 
1. Download pcl-trunk
  •  Go  to pcl github and git the lastest version of pcl-trunk. Take me as an  example, my pcl-trunk is called pcl-master, so I git pcl-master to  /home. You could use git clone command or download the zip file using  browser are all okay.
  • Extract the file build a directory called "build"
  •  cd pcl-master
     mkdir build
     cd build
  • [NOTICE] Before start to cmake, you have to add your gcc and g++ to path. Otherwise, you will DEFINITELY build fail !!! 
whereis gcc & whereis g++
export CC=/usr/bin/gcc  //My gcc is located here, may not be the same as urs 
export CXX=/usr/bin/g++ //My g++ is located here, same above
  • cmake and ccmake
  • In your build directory, ccmake to enable gpu and cuda and add the DIR or LIB if ccmake cannot find the directory.
  • ccmake ..
    
  • sudo make
    sudo make install

  • 4. Test and Verification
  • After you make and install the package, all the execute file will be store in /bin
  • Try to run the program to see whether it works successfully.
  • Have fun.

  • 5. Reference
1. Some tutorial blogs
  1. Install Kinect Fusion on Ubuntu
  1. Configuring your PC to use your Nvidia GPU with PCL
  1. PCL/OpenNI tutorial 1: Installing and testing

2. Errors and solutions blogs
  1. Help! Error in building pcl-trunk #399
  1. PCL trunk compilation error
  1. Building error with latest pcl-trunk: emmintrin.h (SSE2) is included for armv7l platform. #1271

3. Change gcc and g++ version
  • a. How to switch GCC version using update-alternatives
  • b. How to change the default GCC compiler in Ubuntu?

No comments :

Post a Comment