isl-org / isl-org/Open3D

Append voxels to VoxelGrid

Open
#2,660 0 comments 0 reactions 1 assignee Claimed by @sanskar107 View on GitHub
geometry legacy (Open3D 0.x API) voxelgrid
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

**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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.