leomariga/pyRANSAC-3D

error running the the test_plane.py

Closed this issue · 2 comments

I ran the 'tests/test_plane.py ' but got the following error:

>>> python tests/test_plane.py  
RPly: Unable to open file
[Open3D WARNING] Read PLY failed: unable to open file: dataset/caixa.ply
0
Traceback (most recent call last):
  File "tests/test_plane.py", line 15, in <module>
    best_eq, best_inliers = plano1.fit(points, 0.01)
  File "/Users/opt/anaconda3/envs/open3d/lib/python3.8/site-packages/pyransac3d/plane.py", line 46, in fit
    id_samples = random.sample(range(1, n_points-1), 3)
  File "/Users/opt/anaconda3/envs/open3d/lib/python3.8/random.py", line 363, in sample
    raise ValueError("Sample larger than population or is negative")
ValueError: Sample larger than population or is negative

You should move dataset folder to the same folder you run the tests. The error states that you cannot find the "caixa.ply" file.
Please, verify if you have the file from this folder

Hi,
I'm having the same issue. The file is in the same folder.

import open3d as o3d
print(o3d.__version__)  # '0.17.0'

cloud = o3d.io.read_point_cloud("aaa.ply")

[Open3D WARNING] Read PLY failed: unable to read file: aaa.ply RPly: Aborted by user