python-pcl
python-pcl copied to clipboard
PointCloud_PointXYZRGBA does not support creating from array
Environment
- Operating System and version: Ubuntu 18.04 LTS
- Compiler: gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
- PCL Version: 1.8.1
- Cython Version: 0.29.21
Issue
Our code is generating a NumPy array of type Double for XYZRGBA pointclouds. This code fails:
p = pcl.PointCloud_PointXYZRGBA() p.from_array(data.astype(np.float32))
The error is:
File "pcl/pxi/PointCloud_PointXYZRGBA_180.pxi", line 143, in pcl._pcl.PointCloud_PointXYZRGBA.from_array AssertionError
A closer look at the pxi shows assert arr.shape[1] == 4, while XYZRGBZ shape should be 7. This class is improperly structured to support the PointCloud_PointXYZRGBA class.