strawlab/python-pcl

Python PCL runtime error on Ubuntu 18.04 and Ubuntu 16.04

Opened this issue · 1 comments

When I attempt to import python-pcl (pcl) in the python console I get the following error:
>>> import pcl Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/qurrent/.local/lib/python2.7/site-packages/pcl/__init__.py", line 2, in <module> from ._pcl import * ImportError: libpcl_keypoints.so.1.7: cannot open shared object file: No such file or directory

It appears that python-pcl depends on an obsolete version of the pcl library. When I list the available versions of this library I get the following:
apt-cache madison libpcl-dev libpcl-dev | 1.8.1+dfsg1-2ubuntu2.18.04.1 | http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages libpcl-dev | 1.8.1+dfsg1-2ubuntu2 | http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

Your Environment

  • Operating System and version: Ubuntu 18.04 and Ubuntu 16.04 (tested with both) also tested with a Jetson tx2. ALL systems show the same behavior.
  • Compiler: Python
  • PCL Version: 1.8.1
  • Cython Version: 0.29.16

Context

I am trying to use the python-pcl library to process point cloud data from a Livox 100 lidar.

Expected Behavior

I expect to be able to import pcl with no errors in a python environment

Current Behavior

See above

Code to Reproduce

No code

I have attempted the following to try to resolve this issue

  1. Uninstalled existing pcl libraries

  2. Attempted to install pcl 1.7 but there is no 1.7 apt package

  3. Attempted to build pcl 1.7.2 from source however I ran into a compiler error:
    correspondence_estimation_normal_shooting.h:184:41: error: return-statement with a value, in function returning 'void' [-fpermissive] getKSearch () const { return (k_); }

  4. Attempted to build pcl 1.70 from source however I ran into a complete compile failure with the following errors:
    >}’ to ‘const Eigen::Map<const Eigen::Matrix<float, 4, 1>, 16>’ PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4]) ^

  5. Attempted to follow installation instructions from http://www.pointclouds.org/downloads/linux.html, however they appear to be obsolete.

  6. Attempted to follow the correction steps on #317. However these steps failed. I do not show 1.7 in my apt list.
    I attempted to install the following and go this result
    sudo apt-get install libpcl-dev=1.7.2-14build1 Reading package lists... Done Building dependency tree Reading state information... Done E: Version '1.7.2-14build1' for 'libpcl-dev' was not found

  7. Did a sudo apt update probably 25-50 times during this entire process.

  8. Re-ran pip install python-pcl But I got the same error in the python console.

  9. Ran a python script that contained the following
    import numpy import pcl
    Got the following error
    Traceback (most recent call last): File "test.py", line 2, in <module> import pcl File "/home/qurrent/.local/lib/python2.7/site-packages/pcl/__init__.py", line 2, in <module> from ._pcl import * ImportError: libpcl_keypoints.so.1.7: cannot open shared object file: No such file or directory qurrent@qurrent-

  10. Attempted to download the .tar.gz and install it according to these instructions:
    tar zxf python-pcl-0.3.0rc1.tar.gz cd python-pcl-0.3.0rc1 python setup.py install
    Found on issue 317
    Got the following error(s):
    `# pcl_base.h

template

class PCLBase

cdef extern from "pcl/pcl_base.h" namespace "pcl":
cdef cppclass PCLBase[PointT]:
PCLBase ()
cython compilation errors/_pcl_180.cpp -o build/temp.linux-x86_64-2.7/pcl/_pcl_180.o
pcl/_pcl_180.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
#error Do not use this file, it is the result of a failed Cython compilation.
^~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1`

Other Questions
What would it take to update python-pcl to work with modern versions of the PCL library and modern versions of Ubuntu, namely 18.04?

Any help on this would be great. I don't see any other leafs I can turn over to get this working. Is it still supported? Is it supposed to work on Ubuntu?

Thanks,

Jonathan L Clark

I faced the same question. And I've also tried some suggestions for other issues. But all failed.