Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualizer.get_view_control() gives a copy. #6009

Closed
3 tasks done
Kemo-Huang opened this issue Mar 18, 2023 · 16 comments · Fixed by #6116
Closed
3 tasks done

Visualizer.get_view_control() gives a copy. #6009

Kemo-Huang opened this issue Mar 18, 2023 · 16 comments · Fixed by #6116
Labels
bug Not a build issue, this is likely a bug.

Comments

@Kemo-Huang
Copy link

Kemo-Huang commented Mar 18, 2023

Checklist

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

@Kemo-Huang Kemo-Huang added the bug Not a build issue, this is likely a bug. label Mar 18, 2023
@ez4lionky
Copy link

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

@yudai09
Copy link

yudai09 commented Mar 22, 2023

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

@starrabb1t
Copy link

starrabb1t commented Apr 9, 2023

same error. open3d 0.17.0, ubuntu 22.04
but it's all ok in 0.16.0

@benjaminalt
Copy link

I have the same problem on open3d 0.17.0, Ubuntu 20.04.5

@cwreynolds
Copy link

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.

cwreynolds added a commit to cwreynolds/flock that referenced this issue Apr 12, 2023
Boid: fiddling with steer_to_flock()
Agent: fiddle with default max_speed and max_force
Draw: add update_camera(), which does not work because of isl-org/Open3D#6009 -- see also custom_draw_geometry_with_rotation() from example code.
@andrea-cimatoribus-pix4d

Same here, with Ubuntu 22 and Python 3.10.

@lopeLH
Copy link

lopeLH commented Apr 17, 2023

Also affected by this. 😢

@LemonPi
Copy link

LemonPi commented Apr 20, 2023

So what is the current workaround for this? Rollback to 0.16?

@meyerjo
Copy link

meyerjo commented May 3, 2023

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.

@QuanyiLi
Copy link

Got this problem on Windows 11 with open3d==0.17.0. Lowering the version to 0.16.0 addresses this issue.

@ssheorey
Copy link
Member

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.

@meyerjo
Copy link

meyerjo commented Jul 6, 2023

@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

@arpit15
Copy link

arpit15 commented Aug 4, 2023

latest build 0.17.0+179886d from this page removes this bug for me on Ubuntu 22.04 and python 3.10

@emojilearning
Copy link

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.

@zjwzcx
Copy link

zjwzcx commented Oct 11, 2023

Same issue on Ubuntu 20.04 + python3.7 + Open3D 0.17.0. Solved it by downgrading Open3D to 0.16.0.

@Lionelsy
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not a build issue, this is likely a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.