PCDReader: remove fields with zero count instead of throwing exception while reading#4623
Conversation
|
Hi, sorry for the delay. |
|
same issue here. .PCD v0.7 - Point Cloud Data file formatVERSION 0.7 |
|
Instead of modifying the core lib, how about a tool to remove 0 count fields? |
|
Or how about changing the PCDReader so that these fields are removed during reading, as if they had never been in the PCD file? |
|
😆 Didn't realize this was not an issue, but a single line PR |
| int col_count; | ||
| sstream >> col_count; | ||
| if (col_count < 1) | ||
| if (col_count < 1 && cloud.fields[i].name != "_") |
There was a problem hiding this comment.
Instead of moving ahead with a 0 count, should we be using erase+remove on cloud.fields[i]? (either here or after reading the header)
|
This is still an issue in 2022. Will that PR be merged? |
Not with the changes it makes right now. Copied from my earlier comment:
|
mvieth
left a comment
There was a problem hiding this comment.
I will merge this in a few days if there are no objections
Description
For LIDAR pcd files, there can be instances where the count for a field is < 1 if the field is
"_". In such cases, we shouldn't throw an error when trying to read the file.Bugs resolved
PDAL/PDAL#2572