Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinitely-running relaxationdartthrowing filter #4119

Closed
SalzingerJ opened this issue Jul 25, 2023 · 5 comments · Fixed by #4184
Closed

Infinitely-running relaxationdartthrowing filter #4119

SalzingerJ opened this issue Jul 25, 2023 · 5 comments · Fixed by #4184

Comments

@SalzingerJ
Copy link

SalzingerJ commented Jul 25, 2023

Hello, I am having issues with the relaxationdartthrowing filter used as below :

$ pdal translate in.laz out.laz relaxationdartthrowing <options>

I would expect the filter to throw errors or otherwise adapt to the following situations :

  • the "count" parameter is more or equal to the starting number of points in in.laz
  • several points are very close to eachother/have the same position

Instead, the current behaviour as far as I can see in those situations is that the filter simply gets stuck and runs "infinitely" (or at least, more than 10 minutes even for very small point clouds of <200 points).

This also happens is other cases when the parameter "count" is close but still strictly smaller than the number of points in in.laz, even after running the "sample" filter to remove very close points. However, I was not able to figure out the cause, nor a reason for which threshold for "count" would completely solve the issue.

System/installation information:

$ uname -a
Linux L1AAS87 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ pdal --version
pdal 2.5.5 (git-version: 9d28a2)

(installed with conda)

@hobu
Copy link
Member

hobu commented Jul 25, 2023

Instead, the current behaviour as far as I can see in those situations is that the filter simply gets stuck and runs "infinitely" (or at least, more than 10 minutes even for very small point clouds of <200 points).

Can you please post this file?

@SalzingerJ
Copy link
Author

Thank you for your answer.

the "count" parameter is more or equal to the starting number of points in in.laz

This issue as far as I can see can be reproduced with any pointcloud. At least, it works with all of mines, including the attached ones. For example : pdal translate cleaned.laz result.laz relaxationdartthrowing --filters.relaxationdartthrowing.count=100 will remain stuck because cleaned.laz contains only 55 points.

several points are very close to eachother/have the same position

Please find attached an example point cloud with many duplicate points called duplicates.laz. You can reproduce the problem with for example : pdal translate duplicates.laz result.laz relaxationdartthrowing --filters.relaxationdartthrowing.count=100. Running the same with the provided cleaned.laz instead (with count=50 for instance) works instantly.

This also happens is other cases when the parameter "count" is close but still strictly smaller than the number of points in in.laz, even after running the "sample" filter to remove very close points.

This happened at some points during our debugging but unfortunately I was no longer able to reproduce the issue, so let's ignore this one ;), might have been a mistake on my part.

point_clouds.zip

@chambbj
Copy link
Member

chambbj commented Jul 25, 2023

I agree. We should clean this up. The filter can definitely get stuck running indefinitely if the count cannot be reached. It just keeps trying over and over again with smaller radii.

@chambbj
Copy link
Member

chambbj commented Sep 21, 2023

Going to finally put this one to bed today. My plan is to

  1. Check for input view smaller than requested number of output points, and return the input view if it's smaller.
  2. Add a minimum radius parameter and terminate once it is reached. Will probably default this to 1 mm which is overkill for aerial lidar applications.

@SalzingerJ
Copy link
Author

This seems like a decent fix, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants