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

Update visualizer.py. Fix import when no GUI #636

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ccoulombe
Copy link

Shield import when Open3D was not built with GUI.

Shield import when Open3D was not built with GUI.
@ssheorey
Copy link
Member

ssheorey commented Feb 9, 2024

Hi @ccoulombe if Open3D is not built with GUI, then the whole visualizer.py code will not work. You will just run into an error later. It's better to let the import statement catch the error earlier and give a more understandable error message.

@pycoco
Copy link

pycoco commented Mar 13, 2024

Hi @ccoulombe if Open3D is not built with GUI, then the whole visualizer.py code will not work. You will just run into an error later. It's better to let the import statement catch the error earlier and give a more understandable error message.

If i want to plot bboxes of pointcloud using tensorborad on headless server. How to fix the problem?
We need build Open3D with Open3D-ML using "-DENABLE_HEADLESS_RENDERING=ON", no GUI will be enabled.
As you say, the Open3D is not built with GUI, then the whole visualizer.py code will not work.

@ccoulombe
Copy link
Author

ccoulombe commented Mar 13, 2024

@ssheorey
I understand that the visualizer will not work if Open3D is not built with GUI support, and that's my point here : the import is not conditionnal

This import needs to be shielded and conditionnal to GUI support. In a case where Open3D does not have GUI support, the visualizer makes no sense to import as you have pointed out, hence it should not be imported.

Importing the visualizer no matter the case, make importing open3d fail.

@ssheorey
Copy link
Member

Ahhh, you are using Open3D somewhere and it imports visualizer.py, but you don't need that functionality. You are actually not using visualizer.py itself. That makes more sense now. Please add this comment in the code to the check anbd we can merge.

# Allow Open3D import when visualizer is not built or used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants