Visualizer.get_view_control() gives a copy.
Kemo-Huang opened this issue ยท 16 comments
Checklist
- I have searched for similar issues.
- For Python issues, I have tested with the latest development wheel.
- I have checked the release documentation and the latest documentation (for
master
branch).
Describe the issue
I found that the 0.17.0 version of open3d.visualization.Visualizer() is different from the ones of previous versions, especially the get_view_control() function. It gives a copy but not the original ViewControl
object. This seems ridiculous to me. e.g. convert_from_pinhole_camera_parameters() can only change the copied view control but it has no effect on the original visualizer. How can I change or set the view control of a visualizer on 0.17.0?
Steps to reproduce the bug
import open3d
vis = open3d.visualization.Visualizer()
vis.create_window() # the 0.17.0 version demands create_window() first, otherwise gives segmentation fault. Why?
ctr = vis.get_view_control()
assert id(ctr) == id(vis.get_view_control()) # assertion error.
Error message
AssertionError
Expected behavior
No response
Open3D, Python and System information
- Operating system: Ubuntu 20.04
- Python version: Python 3.8
- Open3D version: output from python: 0.17.0
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
Additional information
No response
The same problem occurred when using open3d 0.17.0 on Ubuntu 20.04.
assert id(ctr) == id(vis.get_view_control()) # assertion error
id(ctr) # return 139617577783344
id(vis.get_view_control()) # return 139617504181232
Same error occurred using open3d 0.17.0 enabling headless rendering on Ubuntu 18.04.
>>> ctr = vis.get_view_control()
>>> id(ctr)
140093941361968
>>> id(vis.get_view_control())
140094247748400
same error. open3d 0.17.0, ubuntu 22.04
but it's all ok in 0.16.0
I have the same problem on open3d 0.17.0, Ubuntu 20.04.5
Oh! I saw this too, but as an Open3D newbie, I assumed was just โdoing it wrong.โ
I saw this in 0.17.0 (on macOS 12.6.4) the only version I have used.
Same here, with Ubuntu 22 and Python 3.10.
Also affected by this. ๐ข
So what is the current workaround for this? Rollback to 0.16?
Having the same issue. Stumbled on that as
ctr = vis.get_view_control()
parameters = o3d.io.read_pinhole_camera_parameters("camera_name.json")
ctr.convert_from_pinhole_camera_parameters(parameters)
does not work in headless mode with open3d 0.17. Rolling back to 0.16.0 and re-compiling proved to be the workaround for me.
Got this problem on Windows 11 with open3d==0.17.0. Lowering the version to 0.16.0 addresses this issue.
Please try with the latest development Python wheel from here:
http://www.open3d.org/docs/latest/getting_started.html#development-version-pip
The bug fix is included there.
@ssheorey I am not sure whether this issue is resolved in the latest version. With version 0.17.0+684d7cd
I am still having the same issue that the view controller does not update the view. Rolling back to 0.16.0
again solves the issue. The problem is persistent both on Ubuntu 22.04 and on Windows 10. I am running Python 3.10 on both machines.
pip list ==> NOT working version
Package Version
-------------------- --------------
ansi2html 1.8.0
asttokens 2.2.1
attrs 23.1.0
backcall 0.2.0
certifi 2023.5.7
charset-normalizer 3.1.0
click 8.1.3
colorama 0.4.6
comm 0.1.3
ConfigArgParse 1.5.5
dash 2.11.1
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0
debugpy 1.6.7
decorator 5.1.1
executing 1.2.0
fastjsonschema 2.17.1
Flask 2.2.5
idna 3.4
ipykernel 6.24.0
ipython 8.14.0
ipywidgets 8.0.7
itsdangerous 2.1.2
jedi 0.18.2
Jinja2 3.1.2
jsonschema 4.17.3
jupyter_client 8.3.0
jupyter_core 5.3.1
jupyterlab-widgets 3.0.8
MarkupSafe 2.1.3
matplotlib-inline 0.1.6
nbformat 5.7.0
nest-asyncio 1.5.6
numpy 1.25.0
open3d 0.17.0+684d7cd
packaging 23.1
parso 0.8.3
pickleshare 0.7.5
pip 23.1.2
platformdirs 3.8.0
plotly 5.15.0
prompt-toolkit 3.0.39
psutil 5.9.5
pure-eval 0.2.2
tenacity 8.2.2
tornado 6.3.2
traitlets 5.9.0
typing_extensions 4.7.1
urllib3 2.0.3
wcwidth 0.2.6
Werkzeug 2.2.3
wheel 0.38.4
widgetsnbextension 4.0.8
latest build 0.17.0+179886d
from this page removes this bug for me on Ubuntu 22.04 and python 3.10
Please try with the latest development Python wheel from here:
http://www.open3d.org/docs/latest/getting_started.html#development-version-pip
The bug fix is included there.
The link for macos is invalid.
Same issue on Ubuntu 20.04 + python3.7 + Open3D 0.17.0. Solved it by downgrading Open3D to 0.16.0.
The same error on Ubuntu 20.04 + python3.9 + Open3D 0.17.0 (pip install open3d==0.17)
But it works on open3d==0.16