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

请问有遇到过Segmentation fault得问题吗 #2

Open
naah69 opened this issue Dec 23, 2021 · 3 comments
Open

请问有遇到过Segmentation fault得问题吗 #2

naah69 opened this issue Dec 23, 2021 · 3 comments

Comments

@naah69
Copy link

naah69 commented Dec 23, 2021

我在docker中通过conda安装了pclpy,结果使用hull时报错Segmentation fault

@maguangyan
Copy link
Owner

可以贴一下代码片段和报错信息吗

@naah69
Copy link
Author

naah69 commented Dec 23, 2021

hull.reconstruct 报错,在windows下没问题,在linux下会报错

        from pclpy import pcl
        tb = pcl.PointCloud.PointXYZ()
        tb = tb.from_array(vertexes)  # 凸包顶点
        hull = pcl.surface.ConvexHull.PointXYZ()
        hull.setInputCloud(tb)
        hull.setDimension(3)
        polygon = pcl.vectors.Vertices()  # 凸包顶点
        surface_hull = pcl.PointCloud.PointXYZ()  # 凸包形状
        hull.reconstruct(surface_hull, polygon)  # 计算凸包

我暂时使用以下方法代替该方法了

        from scipy.spatial import ConvexHull
        hull = ConvexHull(vertexes)
        polygon = self.list_to_vertices(hull.simplices)
        surface_hull = pcl.PointCloud.PointXYZ()
        surface_hull = surface_hull.from_array(vertexes)  # 凸包顶点
        return hull, surface_hull, polygon

@naah69
Copy link
Author

naah69 commented Dec 23, 2021

vertexes=[
                [
				 -11.620271234832265,
				 2.640974040337443,
				 -2.043000030517578
			], [
				 -11.620271234832265,
				 2.640974040337443,
				 -0.1389999955892563
			], [
				 -9.08636688079943,
				 2.105642134555592,
				 -2.043000030517578
			], [
				 -9.08636688079943,
				 2.105642134555592,
				 -0.1389999955892563
			], [
				 -7.444682369735905,
				 0.17844727374092292,
				 -2.043000030517578
			], [
				 -7.444682369735905,
				 0.17844727374092292,
				 -0.1389999955892563
			], [
				 -10.620985010706638,
				 -3.6402536541696238,
				 -2.043000030517578
			], [
				 -10.620985010706638,
				 -3.6402536541696238,
				 -0.1389999955892563
			], [
				 -11.834403997144898,
				 -3.8900752102011564,
				 -2.043000030517578
			], [
				 -11.834403997144898,
				 -3.8900752102011564,
				 -0.1389999955892563
			], [
				 -13.1192005710207,
				 -3.783008829044784,
				 -2.043000030517578
			], [
				 -13.1192005710207,
				 -3.783008829044784,
				 -0.1389999955892563
			], [
				 -14.368308351177733,
				 -3.0692329546689816,
				 -2.043000030517578
			], [
				 -14.368308351177733,
				 -3.0692329546689816,
				 -0.1389999955892563
			], [
				 -15.653104925053537,
				 -0.6067061880724615,
				 -2.043000030517578
			], [
				 -15.653104925053537,
				 -0.6067061880724615,
				 -0.1389999955892563
			], [
				 -16.152748037116346,
				 1.7487541973676899,
				 -2.043000030517578
			], [
				 -16.152748037116346,
				 1.7487541973676899,
				 -0.1389999955892563
			], [
				 -15.046395431834405,
				 3.3904387084320367,
				 -2.043000030517578
			], [
				 -15.046395431834405,
				 3.3904387084320367,
				 -0.1389999955892563
			], [
				 -13.261955745895792,
				 3.568882677025988,
				 -2.043000030517578
			], [
				 -13.261955745895792,
				 3.568882677025988,
				 -0.1389999955892563
			]]

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

No branches or pull requests

2 participants