-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Calling draw_geometries() while in a non-blocking drawing loop breaks the non-blocking drawing #599
Comments
Hi @martinakos. The workaround is to define Visualizer() class and use internal functions. Let me take an example using non_blocking_visualisation.py:
This script will show two screens without glitch. |
Sorry, I think I wasn't very clear. I only call draw_geometries() from the interactive prompt, for debugging purposes. It allows me to verify and interactively inspect that my intermediate operations work as I intend while stopped at a breakpoint. I've wrapped draw_geometries() with a function that creates a number of point clouds from numpy arrays and allows me to add some markers. It's very handy for interactive debugging. The problem is that if I use this function my non-blocking visualisation breaks. Thanks for the example. I see in this example that I can interact with both windows. This is good.
What I was hopping for is that I could stop the code at a breakpoint at the line "if save_image"; then as explained in the comment above this line, call my show_drawings(source) in an interactive prompt; inspect the pointcloud; close the window by pressing ESC; and then carry on with the execution of the script. However, for some reason, when closing window2, by pressing ESC, window1 is closed too! and the next time window1 is used the "GLFW Error: The GLFW library is not initialized" will appear again. Any idea how to do what I intend? |
I see the same symptom. It seems glfw window close event is being broad-casted to the every windows, but I couldn't find how to fix this yet. |
add vis.destroy_window()
del vis |
Consider the non_blocking_visualisation.py example.
If we call
any time after
then after exiting draw_geometries, when we try to use vis it prints the following error:
GLFW Error: The GLFW library is not initialized
and nothing shows up in the vis window after that point.
I find myself in this scenario in an app I'm making which displays point clouds in a non-blocking way. But as I'm debugging it I often call draw_geometries() from the ipython interpreter to display some intermediate results. The problem is that, at the moment, if I do this I can't continue with the app, as the non-blocking visualization stops working. I have to restart the app to see the non-blocking visualization again.
Is there anything that can be done to avoid this?
The text was updated successfully, but these errors were encountered: