isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.39k stars 2.3k forks source link

SolveCPU: singular condition detected #4241

Closed AlexSkyline closed 2 years ago

AlexSkyline commented 2 years ago

Hi everyone, Due to speed problems with the "registration_icp" function I am trying to use the "run_slac_optimizer_for_fragments" function instead only I get the following error "[Open3D Error] (void open3d :: core :: OPEN3D_LAPACK_CHECK (long long, const std :: string &)) /Users/pc/Downloads/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:59: gels failed in SolveCPU: singular condition detected. "

I experiment a little in all directions but not finding an example of use I am a little blocked.

import open3d as o3d
import numpy as np
import os
import copy
import time

liste_file=["/Users/pc/Downloads/Open3D/examples/test_data/dataset/scanne/fragement/1.ply","/Users/pc/Downloads/Open3D/examples/test_data/dataset/scanne/fragement/2.ply","/Users/pc/Downloads/Open3D/examples/test_data/dataset/scanne/fragement/3.ply","/Users/pc/Downloads/Open3D/examples/test_data/dataset/scanne/fragement/4.ply"]
print("launch")
o3d.utility.set_verbosity_level(o3d.utility.VerbosityLevel.Debug)
#voxel_size = 0.03
#pcds_down = load_point_clouds(voxel_size)
#o3d.visualization.draw_geometries(pcds_down[0],zoom=0.3412,front=[0.4257, -0.2125, -0.8795],lookat=[2.6172, 2.0475, 1.532],up=[-0.0694, -0.9768, 0.2024])
print("Initial alignment")
pose_graph = o3d.pipelines.registration.PoseGraph()

o3d.t.pipelines.slac.run_slac_optimizer_for_fragments(liste_file, pose_graph, params=o3d.t.pipelines.slac.slac_optimizer_params(max_iterations=10,voxel_size= 0.03, slac_folder="/Users/pc/Downloads/Open3D/examples/test_data/dataset/scanne/fragement"), debug_option=o3d.t.pipelines.slac.slac_debug_option(debug=False, debug_start_node_idx=0))
theNded commented 2 years ago

First, ICP is the fastest solution for registration. SLAC is a dense approach for non-rigid point cloud deformation and could be significantly slower. Second, SLAC requires a constructed pose graph with multi-way registration (which depends on ICP). The pose graph you provided is empty, so there are no entries updated in the SLAC matrix, leading to the singular condition. In your case please fall back to ICP. If speed is an issue with very dense point clouds, down sample them following the tutorial.

AlexSkyline commented 2 years ago

Thank you for your response I have to further understand the ICP in this case to further improve speed and accuracy