davidcaron / pclpy

Python bindings for the Point Cloud Library (PCL)
MIT License
428 stars 59 forks source link

Issue loading Numpy array into pclpy.PointCloud object #84

Closed VisionaryMind closed 3 years ago

VisionaryMind commented 3 years ago

It's not clear where the problem is, but it appears that the _fromarray method for PointCloud objects is not fully implemented. I haven't done any digging, but here is how to duplicate the problem:

testpoints = numpy.full((100,4),1.0).astype(np.float32)
testcloud = pcl.PointCloud.PointXYZI()
cloud.from_array(testcloud)

Using C++, this equivalent procedure would yield a fully populated pointcloud.

VisionaryMind commented 3 years ago

User error. The cloud.from_array method must be stored in a second object.