dimatura / pypcd

PCL pcd fileformat i/o in Python
Other
266 stars 196 forks source link

A python3 version for pypcd, and it also can load the binary version of PCD #35

Open climbingdaily opened 2 years ago

SvenMuc commented 1 year ago

I checked your changes. It seems not to work correctly. On Python 2.x it behaves as expected. But in case of writing binary PCD files from a PointCloud2 message on Python 3.8 it still produced corrupted pcd files.

It seems that the binary conversion of the numpy array behaves differently between Python 2 and 3. But I could not identify the root cause yet.

SvenMuc commented 1 year ago

I found a solution for that. By combining the following two pull request, the issue is solved.

I hope they will be merged some time. Nevertheless, I have a local version which works at least for my use cases.

Regards Sven

climbingdaily commented 1 year ago

I found a solution for that. By combining the following two pull request, the issue is solved.

I hope they will be merged some time. Nevertheless, I have a local version which works at least for my use cases.

Regards Sven

Hi Sven, the code works correctly with numpy 1.20.3 environment on my computer. When using it, I just copy the pypcd.py and import it as pypcd.