Install pcl point cloud library (pcl-1.8.1) under Ubuntu16.04

#pcl #linux #Virtual Machine

Install pcl point cloud library (pcl-1.8.1) under Ubuntu16.04

If you are just getting started, take a look: Video tutorial of station B: https://www.bilibili.com/video/BV14k4y1z7eV?from=search&seid=1269943738293830823
[He didn’t talk about installation dependencies, but let’s take a look first. It takes only 10 minutes. , You know how to install pcl in general. If you look at some webpage tutorials on the Internet, you will know the general process of the installation. Then you can solve any problems you encounter. You may also encounter the need to install Windows in the virtual machine. Copy the materials inside, Ubuntu16.04 directly copy and paste mine, but it didn’t happen. Later, I got the shared folder and checked it for a long time]

0, required version

Try not to use Ubuntu20. After installing for a few days, it is not stable. It is not stable and the memory is always overflowing
[Ubuntu 16.04]: Ali mirror source
[pcl 1.8.1]: https://github.com/PointCloudLibrary/pcl/ releases [download: point cloud library in tar. gz format]
[VTK-7.1.1]: https://vtk.org/download/ [download the latest version: .tar.gz format]

1. Installation dependencies

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 libpcap-dev
sudo apt-get install libopenni-dev libopenni2-dev
sudo apt-get install libqhull* libgtest-dev libqhull-dev

sudo apt-get install libflann1.8 libflann-dev 【这个Ubuntu20上是libflann1.9 libflann-dev】
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev

sudo apt-get install mono-complete //This installation takes a long time
sudo apt-get install openjdk-8-jdk openjdk-8-jre
sudo apt-get install qt-sdk [This qt-sdk installation package is not available on Ubuntu20 , Ubuntu18 has not tried]

//These three are the dependencies required to install VTK
sudo apt-get install libx11-dev libxext-dev libxtst-dev libxrender-dev libxmu-dev libxmuu-dev libxi-dev
sudo apt-get install freeglut3-dev pkg-config
sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev libglew-dev

2. Install VTK (the system that comes with it will lose things, anyway, I did not install pcl)

To install VTK, you must install X11, OpenGL, and libglew-dev dependencies (the last three above are already installed). [Note: I did not install QT, because I did not find the 32-bit installation package, but installed qt-sdk, I don’t know if it is the same]
a. VTK-7.1.1.tar.gz, unzip after the download is complete [Use command :Tar xzvf VTK-7.1.1.tar.gz] to your file installation directory. Open a terminal window in the file directory, enter cmake-gui to open the cmake graphical interface:
b. Configure the path of "where is the source code" to the directory where vtk-7.1.1 is located
c. Create a new build in the vtk-7.1.1 directory [ Use the command: mkdir build] folder, configure "where to build the binaries" as the build folder, click Configure, and prompt configure done after the configuration is complete
d. Select "VTK_GROUP_QT" and click configure again [other default checked options do not change]
e. After the configuration is completed, click the generate button, and the project file will be generated under the build folder
Insert picture description here
[This is the last completed screenshot. I forgot to take the screenshot at the time. When I click Configure for the first time, the bottom of Cmake is blank]

f. Change the file directory to the build folder under the vtk-7.1.1 folder and enter:
cd build
make
sudo make install

3. Install the metslib point cloud driver package

[Download address: https://www.coin-or.org/download/source/metslib/metslib-0.5.3.tgz]
1) tar xzvf metslib-0.5.3.tgz
2) cd metslib-0.5.3
3 )./Configure
4) make -j4
5) sudo make install

4. Install pcl

1) tar -zxvf pcl-pcl-1.8.1.tar.gz //decompression
2) After decompression is completed, enter this folder: cd pcl-pcl-1.8.1
3) Create a new folder and enter it [Mkdir build && cd build]
4) cmake… //Edit the upper-level directory to the current directory
[ Note: After cmake, you should take a good look at the process, if there is anything you can’t find, and you need to reinstall it, what’s the problem? Just solve the problem ]
Insert picture description here
These errors can be ignored.
Insert picture description here
Here I reinstalled VTK again, and I checked how to uninstall VTK.

5) make -j4 //Using 4 threads, if the machine performance is not good, just execute make, I just
make //make some warning messages when I do n’t understand, so I just ignored it
6) sudo make -j4 install //Install the pcl library, which is the file made before

5. Point cloud visualization tool

sudo apt-get install pcl-tools

6. Uninstall pcl:

sudo make uninstall under the build/ directory, do not uninstall easily, or you have to reinstall the system

7. Test code and process: find it on the Internet

Refer to this website: https://blog.csdn.net/lilywri823/article/details/86583269

The website is also very detailed, I also consulted several webpages, and finally installed it
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_39717248/article/details/109901682