Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel crashes when running the ICP algorithm in Python. #6928

Open
3 tasks done
qinjiaying opened this issue Aug 23, 2024 · 0 comments
Open
3 tasks done

Kernel crashes when running the ICP algorithm in Python. #6928

qinjiaying opened this issue Aug 23, 2024 · 0 comments
Labels

Comments

@qinjiaying
Copy link

qinjiaying commented Aug 23, 2024

Checklist

My Question

Attempting to register two frames of point clouds using the ICP algorithm, but the kernel crashes. Conda version is 24.5.0, Python version is 3.9.19, and the latest Python packages are installed. There are no issues with the CPU or RAM. Where might the problem be?

加载数据库

# import open3d as o3d
# import numpy as np
# import laspy
# import copy
# import os
# import subprocess
# accumulated_target_pcd = o3d.geometry.PointCloud()

处理第一个点云文件

# first_ply_path = f"E:/Auguest_collect_data/c83-b/ply/1.ply"

读取第一个点云并

# accumulated_target_pcd = o3d.io.read_point_cloud(first_ply_path)

# ply_path = f"E:/Auguest_collect_data/c83-b/ply/2.ply"
# source = o3d.io.read_point_cloud(ply_path)

执行ICP配准,将源点云与累积的目标点云对齐

# icp_result = o3d.pipelines.registration.registration_icp(
    # source, accumulated_target_pcd, 0.05, np.eye(4),
    # o3d.pipelines.registration.TransformationEstimationPointToPoint(),
    # o3d.pipelines.registration.ICPConvergenceCriteria(max_iteration=1000)
# )

# 应用变换
# source.transform(icp_result.transformation)
# o3d.io.write_point_cloud(f"E:/Auguest_collect_data/c83-b/test_ply/ply_{i}.ply", source)

将变换后的源点云合并到累积点云中

# accumulated_target_pcd += source

# o3d.io.write_point_cloud(f"E:/Auguest_collect_data/c83-b/test_ply/accumulated_target_pcd.ply", accumulated_target_pcd)

“””
“””
{
# "name": "",
# "message": "",
# "stack": "The Kernel crashed while executing code in this or the previous cell. Please review the code in the cell to # identify the possible cause of the failure. For more details, click <a # href='https://aka.ms/vscodeJupyterKernelCrash'>here. For more detailed information, check the Jupyter <a # href='command:jupyter.viewOutput'>log."
# }
“””

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant