Segmentation Fault for Adding Colored Point Cloud into OffscreenRenderer
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [x] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [x] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [x] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### Describe the issue
I try to render colored point clouds in OffscreenRenderer mode. Different from mesh, `add_geometry` is not incompatible for point cloud and cannot load ply correctly. Could you please tell me how to load point clouds into OffscreenRenderer?
### Steps to reproduce the bug
```python
import open3d as o3d
import numpy as np
import open3d.visualization.rendering as rendering
if __name__ == '__main__':
# Setup OffscreenRenderer
img_width = 640
img_height = 640
render = o3d.visualization.rendering.OffscreenRenderer(img_width, img_height)
ply = o3d.io.read_point_cloud('./longdress_vox10_0000.ply')
render.scene.add_geometry(ply)
cam = o3d.camera.PinholeCameraParameters()
cam.extrinsic = np.asarray([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 150], [0, 0, 0, 1]])
cam.intrinsic = o3d.camera.PinholeCameraIntrinsic(640, 640, 640, 640, 320, 320)
render.setup_camera(cam.intrinsic, cam.extrinsic)
# Save screenshot
image = render.render_to_image()
o3d.io.write_image("headless.png", image, 9)
```
### Error message
Traceback (most recent call last):
File "/home/sml/render/render.py", line 23, in
render.scene.add_geometry(ply)
TypeError: add_geometry(): incompatible function arguments. The following argument types are supported:
1. (self: open3d.cuda.pybind.visualization.rendering.Open3DScene, name: str, geometry: open3d.cuda.pybind.geometry.Geometry3D, material: open3d.cuda.pybind.visualization.rendering.MaterialRecord, add_downsampled_copy_for_fast_rendering: bool = True) -> None
2. (self: open3d.cuda.pybind.visualization.rendering.Open3DScene, name: str, geometry: open3d.cuda.pybind.t.geometry.Geometry, material: open3d.cuda.pybind.visualization.rendering.MaterialRecord, add_downsampled_copy_for_fast_rendering: bool = True) -> None
Invoked with: , PointCloud with 682380 points.
Segmentation fault (core dumped)
### Expected behavior
Could you please tell me how to load point clouds into OffscreenRenderer?
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 22.04
- Python version: Python 3.8
- Open3D version: 0.19.0
- System architecture: x86
- Is this a remote workstation?: yes
- How did you install Open3D?: pip
- Compiler version (if built from source): gcc 11.4
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.