Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

cropbox example failing #123

Open
PeterTor opened this issue Sep 22, 2017 · 5 comments
Open

cropbox example failing #123

PeterTor opened this issue Sep 22, 2017 · 5 comments
Labels

Comments

@PeterTor
Copy link

Hi I got the following exception when I execute the cropbox example:
AttributeError: 'pcl._pcl.PointCloud' object has no attribute 'make_cropbox'

any idea?

@PeterTor
Copy link
Author

The Pointcloud object has the following methods for me:

['class', 'delattr', 'doc', 'format', 'getattribute', 'getitem', 'hash', 'init', 'new', 'pyx_vtable', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', '_from_pcd_file', '_from_ply_file', '_to_pcd_file', '_to_ply_file', 'extract', 'from_array', 'from_file', 'from_list', 'get_point', 'height', 'is_dense', 'make_kdtree_flann', 'make_moving_least_squares', 'make_octree', 'make_passthrough_filter', 'make_segmenter', 'make_segmenter_normals', 'make_statistical_outlier_filter', 'make_voxel_grid_filter', 'resize', 'sensor_orientation', 'sensor_origin', 'size', 'to_array', 'to_file', 'to_list', 'width']

@Sirokujira
Copy link
Collaborator

After deleting the module containing pip,
Can I reinstall the module?

I delete the related file by calling the following file.

Linux/MacOSX

bash ./clear.sh

Windows

clear.bat

@niranjanreddy891
Copy link
Contributor

niranjanreddy891 commented Mar 20, 2018

@PeterTor and @Sirokujira I am facing the same issue. Can anyone help me with this issue?

@Miriup
Copy link

Miriup commented Jan 5, 2019

For everyone facing the same problem until we've figured out what happened to make_cropbox:

I just had the same problem with PCL-1.9.1 and python-pcl. I solved it (temporarily) by applying a make_passthrough_filter twice - once for X and once for Y. Z you can filter the same way; in my case I needed to deal with Z differently.

f_x = cloud1.make_passthrough_filter()
f_x.set_filter_field_name("x")
f_x.set_filter_limits(X-0.1, X+0.1)
c_x = f_x.filter()
logging.debug( "X: Got %i points", c_x.size )
f_y = c_x.make_passthrough_filter()
f_y.set_filter_field_name("y")
f_y.set_filter_limits(Y-0.1,Y+0.1)
z_cloud = f_y.filter()
logging.debug( "Y: Got %i points", z_cloud.size )

It's probably not terribly efficient, but if you need something that works at least then this seems to do. :-)

@Me817
Copy link

Me817 commented May 11, 2020

The solution in issue #187 worked for me. I just wrote "outcloud = clipper.filter()" instead of "clipper.Filtering(outcloud)" and it saved the resulting pcd-file in the python-pcl/examples folder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants