Closed ajprax closed 5 years ago
Hi @ajprax Sorry to hear that you ran into problems. Would it be possible for you to provide the ply file for reproduction?
https://drive.google.com/file/d/1G94EA74FkXseDXFQKj2Y8itmhmx0U3MJ/view?usp=sharing is the cloud in question.
I also just tried a second similar point cloud and got the same issue.
Thanks for sharing the file. Did you verify that your points are in the correct format? When reading the first 4 points, I get the following coordinates:
[
-35.082672119140625,
-20.7841796875,
262.5119934082031,
]
[
0.00000000000000000000000000000003094276995682936,
-0.00000000000016122782904755273,
-0.00000000000000000000000000000000000110002288181905,
]
[
NaN,
0.0000000000000010807879944333592,
-129058759245824.0,
]
[
-631795853673368500000000000000.0,
-0.00000000000000008414934179537062,
0.000000000000000000000000000000000018215204755882552,
]
This looks pretty suspicious to me...
The first one looks about like I'd expect but the rest are definitely wrong. I generated the ply from a pcd (which I've confirmed looks normal) using pcl's tools, maybe that conversion didn't work correctly for some reason. In particular it looks like a lot of the points are coming out super close to 0 which would explain why so many points end up in the same smallest-size octree node. I'll look into fixing the ply and reopen the issue if I still can't generate the octree. Thanks for your help.
Ok, please let us know if the conversion was correct. If this is the case, we may have to dig into the ply reader to see if there is anything going wrong.
Unless the other binary ply readers I tried are broken it seems like the problem was pcl's pcd2ply binary encoding is wrong. pcd2ply ascii works fine, but I guess you guys don't support that yet.
@ajprax Thanks for the information! It shouldn't be too difficult to integrate ascii support. How about you create a PR for this? As a starting point you would need to integrate ascii support into https://github.com/googlecartographer/point_cloud_viewer/blob/master/src/read_write/ply.rs#L339 and https://github.com/googlecartographer/point_cloud_viewer/blob/master/src/read_write/ply.rs#L243...
I'm running into an issue while trying to convert a ply to an octree. When I run the command below I get normal seeming output for a while and then it crashes consistently due to a missing .xyz file for a particular node. The splitting process seems to reach a point where it does not split any more and a large number of nodes are created with the same set of 878063 points (more than half the cloud), and the first of these nodes is the one which causes the error. I'm wondering if a file is not created because it would have no points or something like that. It's also strange that so many points would end up in the same node. I've checked my point cloud and there are no large concentrations of points, they're fairly evenly distributed throughout the entire volume.
Command I'm running:
./target/release/build_octree ~/tmp/1.nonans.ply --output_directory ~/tmp/1_octree
Output
Error
ls of the node which causes the error (also the first node with the final number of points)