BIT-TYJ / SLOOP

SLOOP: Rethinking Semantic Graph Matching based Loop Closure Detection as Seeking Aligned Coordinate Space
1 stars 0 forks source link

代码疑问 #1

Closed rich2300 closed 1 month ago

rich2300 commented 1 month ago

作者您好,看了您关于这个代码的简介,我非常想尝试学习,并尝试运行了一下,为什么按照pose_refine_readme.md的提示在SLOOP.PY里面加入相关代码后,输出的文件反而是空的呢?

rich2300 commented 1 month ago

报的错如下: { "name": "IndexError", "message": "too many indices for array: array is 1-dimensional, but 2 were indexed", "stack": "--------------------------------------------------------------------------- IndexError Traceback (most recent call last) File /home/zrq/SLOOP/src/SLOOP.py:1189 1185 pickle.dump(pair_data_list, file) 1188 if name == \"main\": -> 1189 main() 1191 f_GM_information.close()

File /home/zrq/SLOOP/src/SLOOP.py:1172 1165 GM_Spherical_plane(vertexs_src, V, 1166 src_frame, query_frame, 1167 src_normal, query_normal, 1168 first_remained_flag, common_RGB_perception) 1171 tf_init = pose_estimation.transform_two_coordinate_system(z_axis_src, y_axis_src, x_axis_src, origin_src, origin_2_src, z_axis_query, y_axis_query, x_axis_query, origin_query, origin_2_query) -> 1172 tf_icp = pose_estimation.vertex_icp_2d(vertexs_src, vertexs_query, tf_init) 1173 if save_icp_result: 1174 pair_data = { 1175 \"src_vertex\": vertexs_src, 1176 \"que_vertex\": vertexs_query, (...) 1180 \"icp_transform\": tf_icp, 1181 }

File ~/SLOOP/src/pose_estimation.py:71, in vertex_icp_2d(src_vertexs, que_vertexs, init_tf) 69 def vertex_icp_2d(src_vertexs, que_vertexs, init_tf): 70 src_2d_vertexs = get_copy_without_z(list2pc(src_vertexs)) ---> 71 que_2d_vertexs = get_copy_without_z(list2pc(que_vertexs)) 72 init_tf_yaw_only = get_tf_yaw_only(init_tf) 73 icp_tf = icp(que_2d_vertexs, src_2d_vertexs, init_tf_yaw_only)

File ~/SLOOP/src/pose_estimation.py:55, in list2pc(li) 53 def list2pc(li): 54 arr = np.array(li) ---> 55 arr = arr[:, :3] #从数组中取出前三列 56 pcd = o3d.geometry.PointCloud(o3d.utility.Vector3dVector(arr)) #创建点云对象 57 return pcd

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed" }

rich2300 commented 1 month ago

以上问题已经解决~

harold-lu-bit commented 1 month ago

您好,这部分问题在新的提交中应该已解决~

rich2300 commented 1 month ago

嗯嗯,已解决,感谢~