For systems for which we do not offerprecompiled binaries, you need to compile Point Cloud Library (PCL) fromsource. Here are the steps that you need to take: Go to Github and download the version number of your choice.Uncompress the tar-bzip archive, e.g. (replace 1.7.2 with the correct versionnumber):
tar xvfj pcl-pcl-1.7.2.tar.gz
Change the directory to the pcl-pcl-1.7.2 (replace 1.7.2with the correct version number) directory, and create a build directory inthere:
cd pcl-pcl-1.7.2 && mkdir build && cd build
Run the CMake build system using the default options:
cmake ..
Or change them (uses cmake-curses-gui):
ccmake ..
Please note that cmake might default to a debug build. Ifyou want to compile a release build of PCL with enhanced compileroptimizations, you can change the build target to “Release” with“-DCMAKE_BUILD_TYPE=Release”:
cmake -DCMAKE_BUILD_TYPE=Release ..
Finally compile everything (see compiler_optimizations):
make -j2
And install the result:
make -j2 install
Or alternatively, if you did not change the variable whichdeclares where PCL should be installed, do:
sudo make -j2 install
Here’s everything again, in case you want to copy &paste it:
cd pcl-pcl-1.7.2 && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j2
sudo make -j2 install
Again, for a detailed tutorial on how tocompile and install PCL and its dependencies in Microsoft Windows, pleasevisit ourtutorials page. Additional information fordevelopers is available at the Github PCL Wiki.
If you are eager to try out a certain featureof PCL that is currently under development (or you plan on developing andcontributing to PCL), we recommend you try checking out our source repository,as shown below. If you’re just interested in browsing our source code, you cando so by visiting https://github.com/PointCloudLibrary/pcl.
Clone the repository:
git clone https://github.com/PointCloudLibrary/pcl pcl-trunk
Please note that above steps (3-5) are almost identical forcompiling the experimental PCL trunk code:
cd pcl-trunk && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make -j2
sudo make -j2 install
官网安装教程http://www.pointclouds.org/documentation/tutorials/compiling_pcl_posix.php
安装各种依赖,一定要安装,包括可选的,否则会有问题
下载pcl源码https://github.com/PointCloudLibrary/pcl
cd pcl-pcl-1.7.2 && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j2
sudo make -j2 install