isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.28k stars 2.28k forks source link

Open3D on WSL2 unable to visualize. Error: GLFW Error: Wayland: The platform does not support setting the window position, Failed to initialize GLEW., [DrawGeometries] Failed creating OpenGL window. #6872

Open Hi-Daniel opened 2 months ago

Hi-Daniel commented 2 months ago

Checklist

Describe the issue

I am unable to run visualization with open3D running on WSL2.

I have looked at many similar issues however none of the solutions seem to work.

Before I was getting issues similar to this one. But after creating the symlinks as described in that issue, and after downloading Open3D using conda-forge instead of pip, I was able to curb the "LibGl Error: ..." problems and now I just get the warnings above, but no output.

more info:

my output from glxinfo -B is the following:

glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (Intel(R) UHD Graphics) (0xffffffff)
    Version: 23.2.1
    Accelerated: yes
    Video memory: 16381MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.1
    Max compat profile version: 4.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (Intel(R) UHD Graphics)
OpenGL core profile version string: 4.1 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL core profile shading language version string: 4.10
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.1 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL shading language version string: 4.10
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 23.2.1-1ubuntu3.1~22.04.2   
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Steps to reproduce the bug

import open3d as o3d

# Create a point cloud (you can replace this with your actual data)
points = [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]]
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(points)

# Visualize the point cloud
o3d.visualization.draw_geometries([pcd])

Error message

the error that I get:

[Open3D WARNING] GLFW Error: Wayland: The platform does not support setting the window position
[Open3D WARNING] Failed to initialize GLEW.
[Open3D WARNING] [DrawGeometries] Failed creating OpenGL window.

Expected behavior

I expected to be able to visualize geometries.

Open3D, Python and System information

- Operating system: Ubuntu 22.04.4 LTS
- Python version: Python 3.12.4 (also tried python 3.11.9)
- Open3D version: 0.18.0+a38ec05
- System architecture: x86
- Is this a remote workstation?: yes? (WSL2)
- How did you install Open3D?: conda (also tried pip)
- Compiler version (if built from source): N/A

Additional information

No response

SemaanAnthony commented 2 months ago

Facing same issue