Giter VIP home page Giter VIP logo

python-pcl's Introduction

⚠⚠ This repository has been archived as is it is no longer maintained. Please see #395 for details. ⚠⚠

Fork me on GitHub

Introduction

This is a small python binding to the pointcloud library. Currently, the following parts of the API are wrapped (all methods operate on PointXYZ) point types

  • I/O and integration; saving and loading PCD files
  • segmentation
  • SAC
  • smoothing
  • filtering
  • registration (ICP, GICP, ICP_NL)

The code tries to follow the Point Cloud API, and also provides helper function for interacting with NumPy. For example (from tests/test.py)

import pcl
import numpy as np
p = pcl.PointCloud(np.array([[1, 2, 3], [3, 4, 5]], dtype=np.float32))
seg = p.make_segmenter()
seg.set_model_type(pcl.SACMODEL_PLANE)
seg.set_method_type(pcl.SAC_RANSAC)
indices, model = seg.segment()

or, for smoothing

import pcl
p = pcl.load("C/table_scene_lms400.pcd")
fil = p.make_statistical_outlier_filter()
fil.set_mean_k (50)
fil.set_std_dev_mul_thresh (1.0)
fil.filter().to_file("inliers.pcd")

Point clouds can be viewed as NumPy arrays, so modifying them is possible using all the familiar NumPy functionality:

import numpy as np
import pcl
p = pcl.PointCloud(10)  # "empty" point cloud
a = np.asarray(p)       # NumPy view on the cloud
a[:] = 0                # fill with zeros
print(p[3])             # prints (0.0, 0.0, 0.0)
a[:, 0] = 1             # set x coordinates to 1
print(p[3])             # prints (1.0, 0.0, 0.0)

More samples can be found in the examples directory, and in the unit tests.

This work was supported by Strawlab.

Requirements

This release has been tested on Linux Ubuntu 16.04 with

  • Python 2.7.6, 3.5.x
  • pcl 1.7.2(apt install)
  • Cython <= 0.25.2

This release has been tested on Linux Ubuntu 18.04 with

  • Python 2.7.6, 3.5.x
  • pcl 1.8.1(apt install)
  • Cython <= 0.25.2

and MacOS with

  • Python 2.7.6, 3.5.x
  • pcl 1.9.1(use homebrew)
  • Cython <= 0.25.2

and Windows with

  • (Miniconda/Anaconda) - Python 3.4
  • pcl 1.6.0(VS2010)
  • Cython <= 0.25.2
  • Gtk+

and Windows with

  • (Miniconda/Anaconda) - Python 3.5
  • pcl 1.8.1(VS2015)
  • Cython <= 0.25.2
  • Gtk+

and Windows with

  • (Miniconda/Anaconda) - Python 3.6
  • pcl 1.8.1(VS2017[Priority High]/VS2015[not VS2017 Install])
  • Cython == 0.25.2
  • Gtk+

Installation

Linux(Ubuntu)

before Install module

Ubuntu16.04/18.04 (use official package)

  1. Install PCL Module.
$ sudo apt-get update -y

$ sudo apt-get install libpcl-dev -y

Reference `here <https://packages.ubuntu.com/search?keywords=libpcl-dev>`_.

PCL 1.8.x/1.9.x and Ubuntu16.04/18.04(build module)([CI Test Timeout])

  1. Build Module

    Reference here.

MacOSX

before Install module

Case1. use homebrew(PCL 1.9.1 - 2018/12/25 current)

  1. Install PCL Module.

    $ brew tap homebrew/science

    $ brew install pcl

Case1. use old homebrew(PCL 1.8.1 - 2017/11/13 current)

  1. Check git log.

    $ cd /usr/local/Library/Formula

    $ git log ...

  2. git checkout (target hash) pcl.rb

    write after.

Warning:

Current Installer (2017/10/02) Not generated pcl-2d-1.8.pc file.(Issue #119)

Reference PointCloudLibrary Issue.

Pull request 1679.

Issue 1978.

circumvent:

copy travis/pcl-2d-1.8.pc file to /usr/local/lib/pkgconfig folder.

Windows

Using pip with a precompiled wheel

This is the simpliest method on windows. The wheel contains the PCL binaries _ and thus you do not need to install the original PCL library.

  1. Go in the history on the appveyor page
  2. Click on the last successful revision (green) and click on the job corresponding to your python version
  3. Go in the artfacts section for that job and download the wheel (the file with extension whl)
  4. In the command line, move to your download folder and run the following command (replacing XXX by the right string)
pip install python_pcl-XXX.whl

Compiling the binding from source

If the method using the procompiled wheel does not work you can compile the binding from the source.
before Install module

Case1. use PCL 1.6.0

Windows SDK 7.1

            PCL All-In-One Installer

            32 bit

64 bit

OpenNI2[(PCL Install FolderPath)\3rdParty\OpenNI\OpenNI-(win32/x64)-1.3.2-Dev.msi]

Case2. use 1.8.1/1.9.1

            Visual Studio 2015 C++ Compiler Tools(use Python 2.7/3.5/3.6/3.7)

            Visual Studio 2017 C++ Compiler Tools(use Python 3.6.x/3.7.x)

            PCL All-In-One Installer

1.8.1

            Visual Studio 2015 - 32 bit

            Visual Studio 2017 - 32 bit

            Visual Studio 2015 - 64 bit

            Visual Studio 2017 - 64 bit

1.9.1

            Visual Studio 2017 - 32 bit

            Visual Studio 2017 - 64 bit

OpenNI2[(PCL Install FolderPath)\3rdParty\OpenNI2\OpenNI-Windows-(win32/x64)-2.2.msi]

        Common setting

Windows Gtk+ Download             Download file unzip. Copy bin Folder to pkg-config Folder

Download file unzip. Copy bin Folder to pkg-config Folder

or execute powershell file [Install-GTKPlus.ps1].

Python Version use VisualStudio Compiler

set before Environment variable
  1. PCL_ROOT
    set PCL_ROOT=(PCL Install/Build_Binary FolderPath)

2. PATH
(pcl 1.6.0)
set PATH=%PCL_ROOT%/bin/;%OPEN_NI_ROOT%/Tools;%VTK_ROOT%/bin;%PATH%

(pcl 1.8.1/1.9.1)
set PATH=%PCL_ROOT%/bin/;%OPEN_NI2_ROOT%/Tools;%VTK_ROOT%/bin;%PATH%

Common setting

  1. pip module install.
pip install --upgrade pip

pip install cython

pip install numpy
  1. install python module
python setup.py build_ext -i

python setup.py install
  1. install python-pcl with conda (solved)
conda create -n ipk # create a new conda env.
conda activate ipk  # activate env.

conda update -n base -c defaults conda # update conda

conda config --add channels conda-forge # add conda-forge channels
conda install -c sirokujira python-pcl # pcl installation
conda install -c jithinpr2 gtk3 # Gtk+ Gui dependency
conda install -y ipython #  install ipython
conda install -y jupyter # install jupyter

After that, run jupyter notebook or ipython shell to test pcl installation.

Build & Test Status

windows(1.6.0/1.8.1/1.9.1)

https://ci.appveyor.com/api/projects/status/w52fee7j22q211cm/branch/master?svg=true

Mac OSX(1.9.1)/Ubuntu16.04(1.7.2)

https://travis-ci.org/strawlab/python-pcl.svg?branch=master

A note about types

Point Cloud is a heavily templated API, and consequently mapping this into Python using Cython is challenging.

It is written in Cython, and implements enough hard bits of the API (from Cythons perspective, i.e the template/smart_ptr bits) to provide a foundation for someone wishing to carry on.

API Documentation

Read the docs.

For deficiencies in this documentation, please consult the PCL API docs, and the PCL tutorials.

python-pcl's People

Contributors

adonaivera avatar akeoplus-boris-bocquet avatar astraw avatar blootsvoets avatar ccordoba12 avatar chrisidefix avatar chriswl avatar colincsl avatar duke194 avatar jabooth avatar jaceblake avatar jspricke avatar larsmans avatar marcelbrucker avatar martinresearch avatar mys007 avatar niranjanreddy891 avatar nzjrs avatar oroulet avatar pablogago11 avatar polyos avatar psporysz avatar sirokujira avatar svtter avatar vlobanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-pcl's Issues

ImportError: libDummyDevice.so.0: cannot open shared object file: No such file or directory

When importing the pcl Python library the following happens

 >>> import pcl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dwheeler/anaconda/lib/python2.7/site-packages/pcl/__init__.py", line 2, in <module>
    from ._pcl import * 
ImportError: libDummyDevice.so.0: cannot open shared object file: No such file or directory

The OS is Ubuntu 14.04. PCL was installed using the instructions in http://pointclouds.org/downloads/linux.html. pcl-python was installed from f17c686. Some more information,

 $ ldd _pcl.so
 linux-vdso.so.1 =>  (0x00007ffcc290b000)
 libpcl_io.so.1.7 => /usr/lib/libpcl_io.so.1.7 (0x00007fd39dede000)
 libOpenNI.so.0 => /usr/lib/libOpenNI.so.0 (0x00007fd39dc65000)
 libOpenNI2.so.0 => /usr/lib/libOpenNI2.so.0 (0x00007fd39da0a000)
 libDummyDevice.so.0 => not found
 libOniFile.so.0 => not found
 libPS1080.so.0 => not found
 ...
 ...

get_point causes Abort

The pointcloud.get_point function causes an abort instead; it should just throw an exception instead:

!/usr/bin/python

import numpy as np
import pcl

a = np.zeros( [30,3], dtype=np.float32 )
p = pcl.PointCloud( a )

print p.get_point(10,10)

output:

terminate called after throwing an instance of 'pcl::IsNotDenseException'
what(): Can't use 2D indexing with a unorganized point cloud
Aborted (core dumped)

Unable to build on Ubuntu 14.04

Sorry I've already found the other issue on a similar problem (#58) but didn't helped me out. I'am getting a similar error message as posted in the issue from asadeddin. I'am on Ubuntu 14.04, installed cython '0.21.1', numpy is '1.9.1', g++ is 4.8.2. First I tried the pcl 1.7.2 from packages but tried to built the pcl from source as well, both with the same outcome.

I would appreciate any help.

running install
running build
running build_py
running build_ext
skipping 'pcl/_pcl.cpp' Cython extension (up-to-date)
building 'pcl._pcl' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/pcl
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include/pcl-1.8 -I/usr/include/eigen3 -I/usr/include/python2.7 -c pcl/_pcl.cpp -o build/temp.linux-x86_64-2.7/pcl/_pcl.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0,
from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from pcl/_pcl.cpp:381:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
pcl/_pcl.cpp: In function ‘int pyx_pf_3pcl_4_pcl_10PointCloud___cinit(pyx_obj_3pcl_4_pcl_PointCloud, PyObject)’:
pcl/_pcl.cpp:3521:49: error: ‘>>’ should be ‘> >’ within a nested template argument list
sp_assign<pcl::PointCloud>(__pyx_v_self->thisptr_shared, __pyx_t_1);
^
In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ufuncobject.h:317:0,
from pcl/_pcl.cpp:382:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h: At global scope:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: ‘int _import_umath()’ defined but not used [-Wunused-function]
_import_umath(void)
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

import error on OS X

Cython version 0.21.2
pcl installed through home-brew

I've tried remaking and making clean, but I still wind up with this error:

Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import pcl
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pcl/init.py", line 2, in
from ._pcl import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pcl/_pcl.so, 2): Symbol not found: __ZN3pcl6search6SearchINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEERKNS5_IKSt6vectorIiSaIiEEEE
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pcl/_pcl.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pcl/_pcl.so

compiling with pcl 1.6

the binding has been test with PCL 1.5 and does not seem o compile with PCL 1.6.
I get he error

pcl.cpp:6378:21: error: ‘__pyx_t_8pcl_defs_MovingLeastSquares_t’ has no member named ‘reconstruct’
In file included from /usr/include/python2.7/numpy/ndarrayobject.h:26:0,
from /usr/include/python2.7/numpy/arrayobject.h:15,
from pcl.cpp:256:

this error seems similar to http://www.pcl-users.org/surface-reconstruction-error-td3829313.html and thus i guess it is due o a small change in the PCL API. Could hat be fixed ?

search namespace?

Is pcl::search::KdTree implemented on the wrapper? I find references in C++ code but I can't be able to use it from Python... :-(

Linker cannot find -lflann_cpp-gd

I compiled PCL from source with FLANN included and when i tried to install python-pcl i got this error:

c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-i686-2.7/pcl.o build/temp.linux-i686-2.7/minipcl.o -lpcl_io -lpcl_segmentation -lpcl_features -lpcl_filters -lpcl_sample_consensus -lpcl_surface -lpcl_search -lpcl_kdtree -lpcl_octree -lflann_cpp -lflann_cpp-gd -lpcl_common -o build/lib.linux-i686-2.7/pcl.so
/usr/bin/ld: cannot find -lflann_cpp-gd
collect2: error: ld failed with exit status 1
error: command 'c++' failed with exit status 1

When compiling, FLANN flags at CMAKE where:

FLANN_INCLUDE_DIR: /usr/include
FLANN_LIBRARY: /usr/lib/libflann.so
FLANN_LIBRARY_DEBUG: /usr/lib/libflann.so

I installed PCL 1.7.1 and i'm using ubuntu 13.10

Buffer Protocol support / memory sharing with NumPy

For me, a killer feature would be to support the Buffer Protocol, so we can do

p = PointCloud(...)
a = np.asarray(p)
# modify a, see results in p

This obviates the need to wrap or reimplement lots of simple functionality that NumPy offers as well. I'll see if I can implement this.

Any sample for visualization?

I'm looking forward to using python-pcl, however I'd need to have at least some visual feedback for checking the point cloud dataset while experimenting with methods/algorithms.

Is there any working sample for visualizing a point cloud dataset under Python? I'm thinking about Matplotlib if it's fast enough or possibly a PyOpenGL viewer? Has anyone done anything similar?

"pcl.cpp:284:29: fatal error: pcl/point_cloud.h: No such file or directory"

Hello, I'm trying to use your bindings the problem is that while I know the Python syntax and etc, this is my first time building a library/bindings which can't be easily installed via pip or the packet manager.

The steps I've taken to install the bindings are:

  1. make sure I have the dependencies installed, the requirements are pcl 1.5.1-1 and Cython 0.16-1 (experimental), I have pcl 1.6 (via apt-get) and Cython installed on a Linux Mint(Nadia) install.
  2. download and unzip the folder
  3. as the folder contains a Makefile I ran make from the console( as I said this the first time I try this with python bindings) and got the following error : pcl.cpp:284:29: fatal error: pcl/point_cloud.h: No such file or directory

error when import pcl

I installed the python-pcl, but when I import that, I have the following error:
/usr/local/lib/python2.7/dist-packages/pcl/_pcl.so: undefined symbol: _ZN3pcl7PCLBaseINS_8PointXYZEE10setIndicesERKN5boost10shared_ptrISt6vectorIiSaIiEEEE

I am on ubuntu 12.04, python 2.7, pcl 1.7

Dynamic linker error during `import pcl` on OS X with Anaconda

I'm trying to use PCL on OS X with packages installed via Anaconda and python bindings provided by python-pcl. I'm trying to install python-pcl and the required libraries in an Anaconda environment. First, I tried to run python setup.py install inside the environment and it complained that it couldn't find the pkg-config binary. I installed a version of pkg-config for OS X using Homebrew and tried installing again with the following command:

$ PKG_CONFIG_PATH="$CONDA_ENV_PATH/lib/pkgconfig" python setup.py install

This seemed to work fine, compiling successfully with a few warnings, then completing the setup.py installation. However, when I try to import python-pcl in ipython, I get the following:

$ ipython
Python 2.7.11 |Continuum Analytics, Inc.| (default, Dec  6 2015, 18:57:58)
Type "copyright", "credits" or "license" for more information.

IPython 4.1.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import pcl
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-dcd28fa30e40> in <module>()
----> 1 import pcl

/Users/david/projects/python-pcl/pcl/__init__.py in <module>()
      1 # XXX do a more specific import!
----> 2 from ._pcl import *
      3
      4 import sys
      5

ImportError: dlopen(pcl/_pcl.so, 2): Library not loaded: @rpath/./libpcl_io.1.7.dylib
  Referenced from: /Users/david/projects/python-pcl/pcl/_pcl.so
  Reason: image not found

It looks like the linker doesn't know where to find the pcl libraries, but I'm not sure exactly how to fix this. Any thoughts?

Build errors on Ubuntu 16.04 using PCL-1.8.0 stable version

Hi,

I am a Ubuntu 16.04 user with PCL-1.8.0 installed. When I run the setup.py file Python-PCL binding, I get the following error. It says that it cannot find pcl/point_cloud.h. I am wondering where is it searching for it. I appreciate your help at the earliest.

Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing pcl_2d-1.8.pc' to the PKG_CONFIG_PATH environment variable Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found Package pcl_2d-1.8 was not found in the pkg-config search path. Perhaps you should add the directory containingpcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found
Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing pcl_2d-1.8.pc' to the PKG_CONFIG_PATH environment variable Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found Package pcl_2d-1.8 was not found in the pkg-config search path. Perhaps you should add the directory containingpcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found
Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found
running install
running build
running build_py
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pcl
copying pcl/init.py -> build/lib.linux-x86_64-2.7/pcl
running build_ext
skipping 'pcl/_pcl.cpp' Cython extension (up-to-date)
building 'pcl._pcl' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c pcl/_pcl.cpp -o build/temp.linux-x86_64-2.7/pcl/_pcl.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from pcl/_pcl.cpp:289:0:
pcl/shared_ptr_assign.h:1:29: fatal error: pcl/point_cloud.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Python-pcl install issue with OS X

I have installed the latest pcl, when I run "python setup.py" on my terminal, the error came out with "setup.py: error: cannot find PCL, tried
pkg-config pcl_common-1.7
pkg-config pcl_common-1.6
pkg-config pcl_common"

No module named pcl

hello,
I have installed PCL1.6.0, pcl-1.6.0-pdb-msvc2010-win32, Primesense and openNI. I am not sure if I have to further configure PCL to work with Anaconda. I also tried copying the PCL folder in PCL1.6.0 in the site-package of the library folder of Anaconda, but it is still not working. The error I get when i try to execute a program importing "pcl" is :No module named pcl....

Can anyone kindly help or guide me towards the proper configuration...

test.py failure assuming k attribute for pcl._pcl.StatisticalOutlierRemovalFilter

Anything I can help with?
$ python --version
Python 2.7.10
$ dpkg -l python-nose
python-nose 1.3.6-1

Cheers,

Steffen

make[1]: Entering directory '/homeStorage/moeller/git/python-pcl'
nosetests -s
..................[pcl::PLYReader] /tmp/tmpdy8F1opcl-test/foo.ply:21: property 'float32 focal' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmpdy8F1opcl-test/foo.ply:22: property 'float32 scalex' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmpdy8F1opcl-test/foo.ply:23: property 'float32 scaley' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmpdy8F1opcl-test/foo.ply:24: property 'float32 centerx' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmpdy8F1opcl-test/foo.ply:25: property 'float32 centery' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmpdy8F1opcl-test/foo.ply:28: property 'float32 k1' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmpdy8F1opcl-test/foo.ply:29: property 'float32 k2' of element 'camera' is not handled
.....E.......
======================================================================
ERROR: testFilterPos (test.TestSegmenterNormal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/homeStorage/moeller/git/python-pcl/tests/test.py", line 281, in testFilterPos
    self.assertEqual(fil.k, 50)
AttributeError: 'pcl._pcl.StatisticalOutlierRemovalFilter' object has no attribute 'k'

----------------------------------------------------------------------

Build errors on Ubuntu 14.04

Hello,

I am using Ubuntu 14.04
Python 2.7.6
Cython version 0.20.1post0

I am trying to install python binding for PCL, but when ever i am running the command : python setup.py install , i am getting the following error:

Package openni-dev was not found in the pkg-config search path.
Perhaps you should add the directory containing openni-dev.pc' to the PKG_CONFIG_PATH environment variable Package 'openni-dev', required by 'pcl_io', not found Package openni-dev was not found in the pkg-config search path. Perhaps you should add the directory containingopenni-dev.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openni-dev', required by 'pcl_io', not found
Package openni-dev was not found in the pkg-config search path.
Perhaps you should add the directory containing openni-dev.pc' to the PKG_CONFIG_PATH environment variable Package 'openni-dev', required by 'pcl_io', not found Package openni-dev was not found in the pkg-config search path. Perhaps you should add the directory containingopenni-dev.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openni-dev', required by 'pcl_io', not found
running install
running build
running build_py
running build_ext
skipping 'pcl/_pcl.cpp' Cython extension (up-to-date)
building 'pcl._pcl' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c pcl/_pcl.cpp -o build/temp.linux-x86_64-2.7/pcl/_pcl.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from pcl/_pcl.cpp:358:0:
pcl/shared_ptr_assign.h:1:29: fatal error: pcl/point_cloud.h: No such file or directory
#include <pcl/point_cloud.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status

I tried to debug the error, but i was not able to install it.

Can anyone help me with the issue?

Thanks.

Windows Setup.py Install Error

After installing PCL 1.6.0 on WIndows, I have downloaded python-pcl into a folder.

After I type python setup.py install I get the following error:

pcl_error

Has anyone found a way to fix this?

I originally thought it was a path error, but I double checked the installation and saw these included in my path:

C:\Program Files\OpenNI\Bin64;C:\Program Files\OpenNI\Bin64;C:\Program Files\PCL 1.6.0\bin

Installation error

Hello I am on an ubuntu 14.04 machine runing python 2.7 with cython version 0.23.4. When I try to do an install of the straw lab, freshly downloaded I get an error.

What I try is sudo python setup.py install

I get a few warnings and 1 error that stops the install:

241:1: warning: ‘int _import_umath()’ defined but not used [-Wunused-function]
_import_umath(void)
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

The complete output can be found on the attached.
Error.txt

Thank you in advance for your help.

Unrecognized command line

Hi, I am having issues installing python-pcl. I have pcl=1.8, cython-0.23.4, numpy=1.10.2,
I am currently running an ubuntu 15.10. I have installed successfully on 14.04. But now I am running into problems like:

c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pcl/_pcl.o build/temp.linux-x86_64-2.7/pcl/minipcl.o -L/usr/local/lib -lpcl_registration -lpcl_segmentation -lpcl_features -lpcl_2d -lpcl_io -lOpenNI -lpcl_filters -lpcl_sample_consensus -lpcl_ml -lpcl_surface -lpcl_search -lpcl_kdtree -lflann_cpp -lpcl_octree -lpcl_common -o /home/ychen/Repos/python-pcl/pcl/_pcl.so
c++: error: unrecognized command line option ‘-fstack-protector-strong’
c++: error: unrecognized command line option ‘-fstack-protector-strong’
error: command 'c++' failed with exit status 1
Makefile:5: recipe for target 'pcl/_pcl.so' failed
make: *** [pcl/_pcl.so] Error 1

I actually manually changed '-fstack-protector-strong' to '-fstack-protector-all', then it works. BUT, I ran into the issue error when import pcl #50
#50

Website is behind

The website hasn't been updated in quite a while. The code snippets presented there show the old API.

undefined symbol: PyFPE_counter while import pcl

Hello,
I attempted to import pcl with Python 2.7, the lastest python-pcl, and numpy 1.8.2 but faced the following error.
File "./myPython.py", line 36, in
import pcl
File "/usr/local/lib/python2.7/dist-packages/pcl/init.py", line 2, in
from ._pcl import *
ImportError: /usr/local/lib/python2.7/dist-packages/pcl/_pcl.so: undefined symbol: PyFPE_counter

Is there anyone faced this issue?
Best,

OSError: [Errno 2] No such file or directory

Hi,

I am stuck with this installation problem. I have already installed Cython but when I try to install python-pcl I get the error below.

Traceback (most recent call last):
File "./setup.py", line 20, in
for flag in pkgconfig('--cflags-only-I'):
File "./setup.py", line 18, in pkgconfig
return subprocess.check_output(['pkg-config', flag] + pcl_libs).split()
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, _popenargs, *_kwargs)
File "/usr/lib/python2.7/subprocess.py", line 709, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

I am on Ubuntu 13.10, Saucy Salamander.

Thanks

pip install python-pcl

Can I know if that possible to install python-pcl using pip ... if cant, can I know how to install python-pcl in window?

Installing on windows

Hi everybody!

I'm trying to install python-pcl on win7 64bit. I installed the PCL1.5 using the prebuilt binaries (32bit version since I'am using 32bit Python). Then I tried run the setup.py and get stuck on the following error:
LINK : fatal error LNK1181: cannot open input file 'usb-1.0.lib' error: command '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1181

Can anybody help, please?

Compiling difficulties on El Capitan 10.11

I brew installed pcl and it's dependencies and ensured I have the right version of Cython running. Now whenever I attempt to compile python-pcl I receive the following errors. Any thoughts are greatly appreciated. Thank you!

In file included from /opt/local/include/boost/signals2/slot_base.hpp:18:
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:42:54: error: reference to 'weak_ptr' is ambiguous
template struct weak_ptr_traitsstd::weak_ptr
~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4958:29: note:
candidate found by name lookup is 'std::__1::weak_ptr'
class _LIBCPP_TYPE_VIS_ONLY weak_ptr
^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:25:30: note: candidate found by name lookup is 'std::weak_ptr'
template class weak_ptr;
^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:42:33: error: redefinition of
'weak_ptr_traits<weak_ptr >'
template struct weak_ptr_traitsstd::weak_ptr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:38:33: note: previous definition is here
template struct weak_ptr_traitsboost::weak_ptr
^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:54:56: error: reference to 'shared_ptr' is ambiguous
template struct shared_ptr_traitsstd::shared_ptr
~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3788:29: note:
candidate found by name lookup is 'std::__1::shared_ptr'
class _LIBCPP_TYPE_VIS_ONLY shared_ptr
^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:24:30: note: candidate found by name lookup is 'std::shared_ptr'
template class shared_ptr;
^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:54:33: error: redefinition of
'shared_ptr_traits<shared_ptr >'
template struct shared_ptr_traitsstd::shared_ptr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:50:33: note: previous definition is here
template struct shared_ptr_traitsboost::shared_ptr
^
In file included from pcl/_pcl.cpp:269:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy
API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it by " \

^
1 warning and 4 errors generated.
error: command 'clang' failed with exit status 1

Can't build in Ubuntu 12.04

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c pcl/_pcl.cpp -o build/temp.linux-x86_64-2.7/pcl/_pcl.o

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]

In file included from pcl/_pcl.cpp:245:0:

pcl/shared_ptr_assign.h:1:29: fatal error: pcl/point_cloud.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-ILBAU6-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HXf6ge-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-ILBAU6-build

In /usr/include/pcl-1.7 the files exists.

Compiling issue

I tried running the setup.py. I kept getting the following error:

pcl/_pcl.cpp:3831:49: error: ‘>>’ should be ‘> >’ within a nested template argument list
sp_assign<pcl::PointCloud>(__pyx_v_self->thisptr_shared, __pyx_t_1);

I ran the command: sudo python setup.py install

new feature

Hello, I'd like to have access to the keypoints from PCL. I am looking into implementing this but maybe that is something you have already been looking into? I'll happily accept any tips or advices.

Installing Python-pcl on 1.7

Dear all,

I'm having installation problems. I'm getting the following:

python setup.py build_ext --inplace
running build_ext
cythoning pcl.pyx to pcl.cpp
building 'pcl' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/pcl-1.7 -I/usr/include/eigen3 -I/usr/include/python2.7 -c pcl.cpp -o build/temp.linux-x86_64-2.7/pcl.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h:226:1: warning: ‘int _import_umath()’ defined but not used [-Wunused-function]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/pcl-1.7 -I/usr/include/eigen3 -I/usr/include/python2.7 -c minipcl.cpp -o build/temp.linux-x86_64-2.7/minipcl.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/pcl.o build/temp.linux-x86_64-2.7/minipcl.o -lpcl_io -lpcl_segmentation -lpcl_features -lpcl_filters -lpcl_sample_consensus -lpcl_surface -lpcl_search -lpcl_kdtree -lpcl_octree -lflann_cpp -lflann_cpp-gd -lpcl_common -o /home/asadeddin/python-pcl/pcl.so
/usr/bin/ld: cannot find -lflann_cpp-gd
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
make: *** [pcl.so] Error 1

I've tried searching online for the issue, but none so far. I've got Cython & PCL 1.7 installed. Would appreciate some advice! Thanks :)

Impossible to install python-pcl

Hello,

I'm very exciting to use this module but I cannot install it. Could you help me.

The errors during the installation process are:

Package openni-dev was not found in the pkg-config search path.
Perhaps you should add the directory containing openni-dev.pc' to the PKG_CONFIG_PATH environment variable Package 'openni-dev', required by 'pcl_io', not found Package openni-dev was not found in the pkg-config search path. Perhaps you should add the directory containingopenni-dev.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openni-dev', required by 'pcl_io', not found
Package openni-dev was not found in the pkg-config search path.
Perhaps you should add the directory containing openni-dev.pc' to the PKG_CONFIG_PATH environment variable Package 'openni-dev', required by 'pcl_io', not found Package openni-dev was not found in the pkg-config search path. Perhaps you should add the directory containingopenni-dev.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openni-dev', required by 'pcl_io', not found
running install
running build
running build_py
running build_ext
skipping 'pcl/_pcl.cpp' Cython extension (up-to-date)
building 'pcl._pcl' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c pcl/_pcl.cpp -o build/temp.linux-x86_64-2.7/pcl/_pcl.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
pcl/_pcl.cpp:346:29: fatal error: pcl/point_cloud.h: No such file or directory
#include "pcl/point_cloud.h"
^

compilation terminated.

I'm using
Ubuntu 14.04
Cython 20.0
PCL 1.7.2

I really need this module to work and I will appreciate if you can help me.
Thank !!
Manu

error setup python-pcl

Hello, I am not very familiar with programming but generally using python for simple scripts. I would like to implement python-pcl to work with some included functions to avoid further programming languages. I am very thankfull, that this opportunity exists. I am using python 2.7.4 (and VS2008 C++) and installed pcl 1.5.1 and cython 0.16. But when installing python-pcl (with make) I always encounter the error "fatal error c1083: Cannont open include file: 'numpy/arrayobject.h': No such file or directory". I have installed numpy 1.7.1. Is that an easy to solve problem? As I wrote, I am not into programming.

Thank you for eventually helping

Example not working

After installing in an Ubuntu 14.04 docker container like so:

FROM ubuntu:14.04

RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
RUN apt-get update && \
    apt-get install -y libpcl-all

RUN apt-get install -y python-pip git
RUN apt-get install -y python-dev
RUN pip install cython
RUN pip install numpy
RUN pip install git+https://github.com/strawlab/python-pcl.git#egg=pcl

With poincloudlib:

$ dpkg -s libpcl-all
Package: libpcl-all
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 25
Maintainer: Jochen Sprickerhof <[email protected]>
Architecture: all
Source: pcl-defaults
Version: 1.7+trusty1
Depends: libpcl-1.7-all
Description: The Point Cloud Library (or PCL) for point cloud processing - development
 The PCL framework contains numerous state-of-the art algorithms including
 filtering, feature estimation, surface reconstruction, registration, model
 fitting and segmentation.
 .
 This package depends on all PCL packages.
 .
 This package is a dependency package, which depends on the default PCL version (currently 1.7).
Homepage: http://pointclouds.org/

Trying the example from the readme doesn't work:

>>> import pcl
>>> import numpy as np
>>> p = pcl.PointCloud(np.array([[1, 2, 3], [3, 4, 5]], dtype=np.float32))
>>> seg = p.make_segmenter()
>>> seg.set_model_type(pcl.SACMODEL_PLANE)
>>> seg.set_method_type(pcl.SAC_RANSAC)
>>> indices, model = seg.segment()
[pcl::SampleConsensusModel::getSamples] Can not select 0 unique points out of 2!
[pcl::RandomSampleConsensus::computeModel] No samples could be selected!
[pcl::SACSegmentation::segment] Error segmenting the model! No solution found.

And make test returns:

nosetests -s
..................[pcl::PLYReader] /tmp/tmp9iTMsNpcl-test/foo.ply:21: property 'float32 focal' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmp9iTMsNpcl-test/foo.ply:22: property 'float32 scalex' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmp9iTMsNpcl-test/foo.ply:23: property 'float32 scaley' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmp9iTMsNpcl-test/foo.ply:24: property 'float32 centerx' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmp9iTMsNpcl-test/foo.ply:25: property 'float32 centery' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmp9iTMsNpcl-test/foo.ply:28: property 'float32 k1' of element 'camera' is not handled
[pcl::PLYReader] /tmp/tmp9iTMsNpcl-test/foo.ply:29: property 'float32 k2' of element 'camera' is not handled
..........E
======================================================================
ERROR: Failure: ImportError (No module named registration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/tmp/python-pcl/tests/test_registration.py", line 9, in <module>
    from pcl.registration import icp, gicp, icp_nl
ImportError: No module named registration

----------------------------------------------------------------------
Ran 29 tests in 3.847s

FAILED (errors=1)
make: *** [test] Error 1

Any suggestions on how to get RANSAC segmentation working? I tried different inputs, like a plane at height 1, or random height values between 0 and 1, but all with the same result.

Tests fail

I get the following test failures on Ubuntu w/ PCL 1.6, NumPy 1.7.1, Python 2.7.5. Tests run with nosetests tests/ after doing make clean all in the source directory.

======================================================================
FAIL: testSegment (test.TestSegmentCylinder)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/larsb/src/patty/python-pcl/tests/test.py", line 157, in testSegment
    self.assertEqual(len(indices), SEGCYLIN)
AssertionError: 11462 != 11461

======================================================================
FAIL: testFilterNeg (test.TestSegmenterNormal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/larsb/src/patty/python-pcl/tests/test.py", line 242, in testFilterNeg
    self._tneg(c)
  File "/home/larsb/src/patty/python-pcl/tests/test.py", line 224, in _tneg
    self.assertEqual(c.size, 1013)
AssertionError: 1015 != 1013

======================================================================
FAIL: testFilterPos (test.TestSegmenterNormal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/larsb/src/patty/python-pcl/tests/test.py", line 234, in testFilterPos
    self._tpos(c)
  File "/home/larsb/src/patty/python-pcl/tests/test.py", line 218, in _tpos
    self.assertEqual(c.size, 22747)
AssertionError: 22745 != 22747

======================================================================
FAIL: testFilterPosNeg (test.TestSegmenterNormal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/larsb/src/patty/python-pcl/tests/test.py", line 249, in testFilterPosNeg
    self._tpos(c)
  File "/home/larsb/src/patty/python-pcl/tests/test.py", line 218, in _tpos
    self.assertEqual(c.size, 22747)
AssertionError: 22745 != 22747

Finally, after reporting the number of failures, nosetests segfaults. Any idea what this could be?

Unable to install PCL on 14.04

Dear all,

I'm trying to install the pcl-python wrapper on Ubuntu 14.04, and I'm running into the following problem when I build from the setup.py file. I have not found a similar issues like this elsewhere, and don't understand exactly the impacts of disabling numpy will have.

running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pcl
copying pcl/__init__.py -> build/lib.linux-x86_64-2.7/pcl
running build_ext
cythoning pcl/_pcl.pyx to pcl/_pcl.cpp
building 'pcl._pcl' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/pcl
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/pcl-1.7 -I/usr/include/ni -I/usr/include/openni2 -I/usr/include/eigen3 -I/usr/include/python2.7 -c pcl/_pcl.cpp -o build/temp.linux-x86_64-2.7/pcl/_pcl.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from pcl/_pcl.cpp:381:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^
pcl/_pcl.cpp: In function ‘int __pyx_pf_3pcl_4_pcl_10PointCloud___cinit__(__pyx_obj_3pcl_4_pcl_PointCloud*, PyObject*)’:
pcl/_pcl.cpp:3519:49: error: ‘>>’ should be ‘> >’ within a nested template argument list
   sp_assign<pcl::PointCloud<struct pcl::PointXYZ>>(__pyx_v_self->thisptr_shared, __pyx_t_1);
                                                 ^
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ufuncobject.h:327:0,
                 from pcl/_pcl.cpp:382:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h: At global scope:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: ‘int _import_umath()’ defined but not used [-Wunused-function]
 _import_umath(void)
 ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

PointXYZ rgb

Hello,

I am new to the pcl lib and just started to use your python bindings. Would that be possible to acess the rgb data as well from the the pcd file? or have you guys only implemented the xyz coordinates?

So far, I have been using the ascii encoded pcd files and reading them from python like this:

f = open('your_pcd_file.pcd', 'r').readlines()
rgb_list = [[int(ff.split()[-1]) >> 16 & 0x000ff, int(ff.split()[-1]) >> 8 & 0x000ff, int(ff.split()[-1]) & 0x000ff] for ff in f[11:]]

But it is very slow (600 ms per file) which makes sense since they are not binaries.

Thank you very much
Youssef

pickle support

It seem that pickle is not yet supported with the PCL objects, Would that be feasible to make these objects compatible with pickle?

example code:

import pcl as pcl
import pickle
t = pcl.OctreePointCloudSearch(0.1)
filename='datafile'
with open( filename,'w') as f:
pickle.dump(t,f)
I get the error TypeError: can't pickle OctreePointCloudSearch objects

Windows environment setup

My environment:
PCL 1.7.2 all-in-one installed
OPENNI2 installed
Cython installed using anaconda2

Run: python setup.py install
failed:

Traceback (most recent call last):
File "setup.py", line 19, in
if subprocess.call(['pkg-config', 'pcl_common%s' % pcl_version]) == 0:
File "C:\Anaconda2\lib\subprocess.py", line 523, in call
return Popen(_popenargs, *_kwargs).wait()
File "C:\Anaconda2\lib\subprocess.py", line 711, in init
errread, errwrite)
File "C:\Anaconda2\lib\subprocess.py", line 959, in _execute_child
startupinfo)
WindowsError: [Error 2]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.