isl-org / isl-org/Open3D

Cannot compile on under Headless Ubuntu 18.04 and module 'open3d.visualization' has no attribute 'rendering'

Open
#5,505 6 comments 2 reactions 0 assignees View on GitHub
build/install
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](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Steps to reproduce the issue

I want to render and save images from a terminal without any display device

the cmake command is the following:
cmake -DENABLE_HEADLESS_RENDERING=ON \
-DBUILD_GUI=OFF \
-DBUILD_WEBRTC=OFF \
-DUSE_SYSTEM_GLEW=OFF \
-DUSE_SYSTEM_GLFW=OFF \
..
The result of cmake is as follows:
![image](https://user-images.githubusercontent.com/69669353/188559106-9138d6ad-9e0e-44f9-872d-017c0367df34.png)

Then, I make install-pip-package:
![image](https://user-images.githubusercontent.com/69669353/188563865-4830a51c-7b04-4a01-9485-e4dba3050444.png)

Finally, successfully tested the provided Python script for saving depth and surface normal sequences:
cd ~/Open3D/examples/python/visualization
python headless_rendering.py
This should print the following:
Capture image 00000
Capture image 00001
Capture image 00002

It all looks normal!

But, when i want to test own program :
render = o3d.visualization.rendering.OffscreenRenderer(width, height, headless=True)
AttributeError: module 'open3d.visualization' has no attribute 'rendering'

![image](https://user-images.githubusercontent.com/69669353/188564033-4ec561d6-af4c-4d5d-91cb-4822fe662b11.png)

### Error message

```shell
render = o3d.visualization.rendering.OffscreenRenderer(width, height, headless=True)
AttributeError: module 'open3d.visualization' has no attribute 'rendering'

I don't know if the compilation is correct, if not how to fix it, thank you!
```

### Open3D, Python and System information

```markdown
- Operating system: Ubuntu 18.04
- Python version: Python 3.7
- Open3D version: output from python: `print(open3d.__version__)`
- System architecture: x86
- Is this a remote workstation?: yes
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 7.5
```

### Additional information

_No response_

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.