pypcd
pypcd copied to clipboard
A python3 version for pypcd, and it also can load the binary version of PCD
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.
I found a solution for that. By combining the following two pull request, the issue is solved.
- https://github.com/dimatura/pypcd/pull/35 (Migration to Python 3)
- https://github.com/dimatura/pypcd/pull/22 (fixing the numpy >1.15, The behavior of multi-field indexes changed from Numpy 1.15 to Numpy 1.16.)
I hope they will be merged some time. Nevertheless, I have a local version which works at least for my use cases.
Regards Sven
I found a solution for that. By combining the following two pull request, the issue is solved.
- A python3 version for pypcd, and it also can load the binary version of PCD #35 (Migration to Python 3)
- save function incompatible with numpy 1.16 #22 (fixing the numpy >1.15, The behavior of multi-field indexes changed from Numpy 1.15 to Numpy 1.16.)
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.