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

Callback functions in customized_visualization.py doesn't work as expected #6071

Open
3 tasks done
pminimd opened this issue Apr 9, 2023 · 1 comment
Open
3 tasks done
Labels
bug Not a build issue, this is likely a bug.

Comments

@pminimd
Copy link

pminimd commented Apr 9, 2023

Checklist

Describe the issue

I want generate a GIF of a self-rotating mesh object.

So I tried the example in customized_visualization.py. My running environment: Ubuntu18.04 python3.8 Open3D-0.17.0

Strange thing is: No bugs or errors was reported, but the view didn't move around or went with the trajectory as it defined in the "Callback" funtion.

Here is the output showed in terminal:

1. Customized visualization to mimic DrawGeometry
2. Changing field of view
Field of view (before changing) 60.00
Field of view (after changing) 90.00
Field of view (before changing) 60.00
Field of view (after changing) 5.00
3. Customized visualization with a rotating view
4. Customized visualization showing normal rendering
5. Customized visualization with key press callbacks
   Press 'K' to change background color to black
   Press 'R' to load a customized render option, showing normals
   Press ',' to capture the depth buffer and show it
   Press '.' to capture the screen and show it
6. Customized visualization playing a camera trajectory
Capture image 00000
Capture image 00001
Capture image 00002

Steps to reproduce the bug

def custom_draw_geometry_with_rotation(pcd):

    def rotate_view(vis):
        ctr = vis.get_view_control()
        ctr.rotate(10.0, 0.0)
        return False

    o3d.visualization.draw_geometries_with_animation_callback([pcd],
                                                              rotate_view)

Error message

nothing

Expected behavior

I expected the mesh object will be rotating in the GUI window.

Open3D, Python and System information

- Operating system: Ubuntu 18.04
- Python version: Python 3.8
- Open3D version: 0.17.0
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip packagewheel

Additional information

No response

@pminimd pminimd added the bug Not a build issue, this is likely a bug. label Apr 9, 2023
identxxy referenced this issue May 19, 2023
This function can be used to obtain a ray to perform raycasting queries
on the visualizer.

Co-authored-by: Rene Sepulveda <errissa@gmail.com>
@identxxy
Copy link

identxxy commented May 19, 2023

Going back to version 0.16.0 solved my problem.

I guess the issue is caused here where I leave a comment.

Also there is already a PR#6116 fixing this.

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

No branches or pull requests

2 participants