Open3d: “示例/Python/Basic/half_edge_mesh.py”中的“TypeError:crop():不兼容的函数参数”

创建于 2019-10-14  ·  3评论  ·  资料来源: intel-isl/Open3D

描述错误
我无法运行示例half_edge_mesh.py 。 #1218之后总是抛出

RPly: Unable to open file
[Open3D WARNING] Read PLY failed: unable to open file: ../../TestData/sphere.ply
Traceback (most recent call last):
  File "examples/Python/Basic/half_edge_mesh.py", line 28, in <module>
    mesh = mesh.crop(bbox)
TypeError: crop(): incompatible function arguments. The following argument types are supported:
    1. (self: open3d.open3d.geometry.TriangleMesh, min_bound: numpy.ndarray[float64[3, 1]], max_bound: numpy.ndarray[float64[3, 1]]) -> open3d.open3d.geometry.TriangleMesh

Invoked with: geometry::TriangleMesh with 0 points and 0 triangles., geometry::AxisAlignedBoundingBox

在#1218(仍为0.8.0版本)之前,它抛出

RPly: Unable to open file
[Open3D WARNING] Read PLY failed: unable to open file: ../../TestData/sphere.ply
Traceback (most recent call last):
  File "examples/Python/Basic/half_edge_mesh.py", line 26, in <module>
    het_mesh = o3d.geometry.HalfEdgeTriangleMesh.create_from_triangle_mesh(mesh)
AttributeError: type object 'open3d.open3d.geometry.HalfEdgeTriangleMesh' has no attribute 'create_from_triangle_mesh'

再现
重现行为的步骤:

  1. cd open3d
  2. python3示例/Python/Basic/half_edge_mesh.py
  3. 查看错误

预期行为
这个例子应该有效。

环境(请填写以下信息):

  • 操作系统:OSX Mojave
  • Python版本:3.7
  • Open3D 版本:0.8.0
  • 这是远程工作站吗?:否
  • 你是如何安装 Open3D 的?:conda

附加上下文
我试图将示例文件half_edge_mesh.py到与TestData/sphere.ply相同的文件夹并编辑路径。 警告[Open3D WARNING] Read PLY failed: unable to open file: ../../TestData/sphere.ply消失了,但 TypeError 或 AttributeError 仍然存在。

possible bug

最有用的评论

好的,我知道了。 您正在使用来自使用AxisAlignedBoundingBox的 master 分支的示例代码,但您使用的 open3d 源似乎比 master 分支更旧(请参阅第一个输出片段中的方法签名)。
要么将 open3d 更新为当前主版本并自行编译,要么使用v0.8.0分支(https://github.com/intel-isl/Open3D/tree/v0.8.0)中的示例。

所有3条评论

我无法使用 master 的代码进行复制。 您是否在Open3D/examples/Python/Basic运行脚本?

@griegler是的,我做了,但同样的错误。 我能做些什么来找到更多线索吗?

好的,我知道了。 您正在使用来自使用AxisAlignedBoundingBox的 master 分支的示例代码,但您使用的 open3d 源似乎比 master 分支更旧(请参阅第一个输出片段中的方法签名)。
要么将 open3d 更新为当前主版本并自行编译,要么使用v0.8.0分支(https://github.com/intel-isl/Open3D/tree/v0.8.0)中的示例。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

hzxie picture hzxie  ·  4评论

lordlycastle picture lordlycastle  ·  3评论

nrj127 picture nrj127  ·  4评论

blackccpie picture blackccpie  ·  3评论

taochenshh picture taochenshh  ·  3评论