Skip to content

Append voxels to VoxelGrid #2660

@maxim0815

Description

@maxim0815

Describe the bug:
I tried to append Voxels to the VoxelGrid. There was one related issue #1101. I tried it the same way but I get the error:

open3d.cpu.pybind.geometry.VoxelGrid' object has no attribute 'voxels'

There seems to be some functionality within the C++ class:
https://github.com/intel-isl/Open3D/blob/49d7fc2b88b8cee4ad733f1c439eb12e49955472/cpp/open3d/geometry/VoxelGrid.h#L130

What is the recommended way to add own Voxels to a given VoxelGrid in python?

To Reproduce:

vg = o3d.geometry.VoxelGrid()
voxels = []
vox = o3d.geometry.Voxel()
vox.grid_index = np.array([  7,  59, 101])
voxels.append(vox)
vg.voxels = voxels

Environment (please complete the following information):

  • OS: Ubuntu20.04
  • Python version: 3.8.5
  • Open3D version: 0.11.2
  • Is this remote workstation?: no
  • How did you install Open3D?: pip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions