ubuntu18.04 PCL1.8.0安装
参考:
官方教程 https://pcl.readthedocs.io/projects/tutorials/en/latest/compiling_pcl_posix.html
https://www.jianshu.com/p/459d4242b3d0
解压下载的压缩包
tar xvfj pcl-pcl-1.8.0.tar.gz
cd pcl-pcl-1.8.0 && mkdir build && cd build
cmake ..
make -j2
make -j2 install
cmake warning:
Cannot generate a safe runtime search path for target pcl_io because files
in some directories may conflict with libraries in implicit directories:
runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/filex/anaconda3/lib
runtime library [libfreetype.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/filex/anaconda3/lib
runtime library [libexpat.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/filex/anaconda3/lib
runtime library [libxml2.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/filex/anaconda3/lib
runtime library [libQt5Sql.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/filex/anaconda3/lib
runtime library [libQt5Network.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/filex/anaconda3/lib
Some of these libraries may not be found correctly.
Call Stack (most recent call first):cmake
io/CMakeLists.txt:331 (PCL_ADD_LIBRARY)
make报错:
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libSM.so: undefined reference to `uuid_generate@UUID_1.0'
/home/kouguozhao/Public/anaconda3/lib/libfontconfig.so.1: undefined reference to `FT_Done_MM_Var'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/pcl_tiff2pcd.dir/build.make:290: recipe for target 'bin/pcl_tiff2pcd' failed
make[2]: *** [bin/pcl_tiff2pcd] Error 1
CMakeFiles/Makefile2:5652: recipe for target 'tools/CMakeFiles/pcl_tiff2pcd.dir/all' failed
make[1]: *** [tools/CMakeFiles/pcl_tiff2pcd.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
解决方法:
①修改~/.bashrc里的环境变量,注释掉和anaconda有关的
②将anaconda文件夹先重命名成别的
③删除anaconda的lib下的libuuid库文件。搜索anaconda lib目录下libuuid,一般有5个
安装完了以后别忘了改回去
python pcl install
- python-pcl 0.3
- cython==0.25.2
- pcl 1.8.1
运行找不到pcl.pcl_visualization
Make some modifications to the setup.py
file in the python-pcl repository. Make sure you replicate the indentation of the surroundling lines of code.
- After line 550, add
ext_args['include_dirs'].append('/usr/local/include/vtk-7.1')
- Near line 613, uncomment the
Extension("pcl.pcl_visualization", ["pcl/pcl_visualization.pyx"], language="c++", **ext_args),
line under theelif pcl_version == '-1.8':
statement.