Install Point Cloud Library(Bugs Resolved)

Hello friends,

In our last post we had a brief description of of what the Point Cloud Library is,so now lets install it and get started with PCL.

Here I will only be telling the installation procedure for Ubuntu(Linux),

SO here it goes: –

Open the terminal and type

a) sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl

b) sudo apt-get update

c) sudo apt-get install libpcl-all

And its done πŸ™‚

Now open a new terminal and type :
sudo gedit /usr/lib/pkgconfig/flann.pc

and in that file remove “-lflann_cpp-gd”. Save and close the file.

Now lets test it.

Method 1:-

a) Make a folder,and in the folder download the code and place it in a file named pcl_write.cpp

b) Download code from here :- http://pointclouds.org/documentation/tutorials/writing_pcd.php#writing-pcd

c) Make a new folder named build inside the current folder.

d) Make a new file named CMakeLists.txt and copy the following contents in it :

Contents:-

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})

e) Enter the folder build by typing “cd build” in the terminal.

f) now in the terminal type these two commands:
cmake ..
sudo make

And a executable file will be generated.

Method 2 ( One of my seniors Jay Rambhia helped me get this,buts its slightly modified):-

Make a file named pcl.sh in the folder where ur code file is there and copy these contents in it : https://github.com/abhi-kumar/OPENCV_MISC/blob/master/pcl.sh

Open a terminal and navigate to the folder where the code and pcl.sh is present and type:
a) chmod +X pcl.sh
b) ./pcl.sh YOUR_CODE_NAME.CPP

Second method is simple isn’t it??

So its done πŸ™‚

Thank you πŸ™‚

Advertisements

One thought on “Install Point Cloud Library(Bugs Resolved)”

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