From d1ae2fd7e5323dd80e4f2481d8a71f9877f98790 Mon Sep 17 00:00:00 2001 From: Staubsaugerbeutel <40735221+Staubsaugerbeutel@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:22:02 +0100 Subject: [PATCH] removed pcd_load from line.fit() which caused error "pcd_load" variable was in place of "thresh" argument of the .fit function call leading to following error Traceback (most recent call last): A, B, inliers = line.fit(points,pcd_load, thresh=15) TypeError: Line.fit() got multiple values for argument 'thresh' --- test_line.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_line.py b/test_line.py index 62ce18a..a4e23b8 100644 --- a/test_line.py +++ b/test_line.py @@ -24,13 +24,13 @@ line = pyrsc.Line() -A, B, inliers = line.fit(points,pcd_load, thresh=15) +A, B, inliers = line.fit(points, thresh=15) R = pyrsc.get_rotationMatrix_from_vectors([0, 0, 1], A) -plane = pcd_load.select_by_index(inliers).paint_uniform_color([1, 0, 0]) +# plane = pcd_load.select_by_index(inliers).paint_uniform_color([1, 0, 0]) # # obb = plane.get_oriented_bounding_box() # # obb2 = plane.get_axis_aligned_bounding_box() # # obb.color = [0, 0, 1] @@ -46,4 +46,4 @@ mesh_cylinder = mesh_cylinder.translate((B[0], B[1], B[2])) o3d.visualization.draw_geometries([pcd_load, plane, mesh_cylinder]) -# o3d.visualization.draw_geometries([plane, not_plane, mesh,mesh_rot, mesh_cylinder]) \ No newline at end of file +# o3d.visualization.draw_geometries([plane, not_plane, mesh,mesh_rot, mesh_cylinder])