Update point_cloud2.py to support type point xyzi#18
Update point_cloud2.py to support type point xyzi#18rancheng wants to merge 1 commit intoeric-wieser:masterfrom
Conversation
|
@eric-wieser Do you want me to look into it? |
|
This seems not particularly worth it to me. You can get what you want with numpy builtins these days: from numpy.lib.recfunctions import structured_to_unstructured
fields = ['x', 'y', 'z', 'intensity']
xyzi_arr = structured_to_unstructured(pointcloud2_to_array(cloud_msg)[fields]) |
|
Sure, but Ran's solution is more elegant. |
|
I'd argue more elegant would be to not combine the arrays into a flat array in the first place. I can't think of a convincing use-case for an array like |
|
Agreed. I would also expect the structure of the array to be [(x,y,z), i]. I was not talking about the implementation, but rather the ease of use. |
|
Perhaps then what is actually missing is |
|
To me, it seems unnecessary to bloat the code with special functions for many possible point types if a generic conversion is simple as |
|
The one advantage of |
I have use your library for a long time and am very appreciate for your hard working towards advancing this field! Thanks for your contribution all the time, Awesome work!
I updated the function in
point_cloud2.pyto support typeXYZIpoint cloud, when I was trying to use your code to convert into Kitti bin format.