Skip to content

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

Open
@Jinbo-Zuo

Description

@Jinbo-Zuo

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions