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

About the infinite loop in 'generate_data.py' #27

Open
Jinbo-Zuo opened this issue Apr 6, 2023 · 1 comment
Open

About the infinite loop in 'generate_data.py' #27

Jinbo-Zuo opened this issue Apr 6, 2023 · 1 comment

Comments

@Jinbo-Zuo
Copy link

while not ok: # TODO this could result in an infinite loop, though very unlikely idx = np.random.randint(len(points)) point, normal = points[idx], normals[idx] ok = normal[2] > -0.1 # make sure the normal is poitning upwards
I want to know why the infinite loop may happen? I found if I set object_count = 1, the infinite loop will happen easily, but if I set object_count as a little big number, the infinite loop won't happen. And I want to know how could I avoid the infinite loop by some engineering method?

@Jinbo-Zuo
Copy link
Author

I tried to use 'break' to jump out the loop when the loop run enough. But I don't know if this way may cause any bad result ...

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

No branches or pull requests

1 participant