前提
Windows11のWSL2 (Ubuntu)上でopen3dを使って点群データを表示させたいと思っています。
そこでまず https://github.com/isl-org/Open3D の README.mdの Python quick startに従って サンプルコードを実行したのですがエラーが出ます。
実行環境は以下の通りです。
・ノートPC
・OS: Windows11 (21H2)
・GPU(内蔵): Intel(R) Iris(R) Xe Graphics
・GPU(独立): NVIDIA GeForce RTX 3050 Ti Laptop GPU
・WSL2 (Ubuntu20.04)
・Python venv で作った仮想環境内で 実行
実現したいこと
- open3dの Python quick startのサンプルコードを正常に実行したい
発生している問題・エラーメッセージ
(open3d) t@LAP-JP-008-WIN:~$ python -c "import open3d as o3d; print(o3d.__version__)" 0.15.2 (open3d) t@LAP-JP-008-WIN:~$ python -c "import open3d as o3d; \ > mesh = o3d.geometry.TriangleMesh.create_sphere(); \ > mesh.compute_vertex_normals(); \ > o3d.visualization.draw(mesh, raw_mode=True)" FEngine (64 bits) created at 0x7f0762fde010 (threading is enabled) FEngine resolved backend: OpenGL X Error of failed request: GLXBadFBConfig Major opcode of failed request: 148 (GLX) Minor opcode of failed request: 0 () Serial number of failed request: 27 Current serial number in output stream: 27 Segmentation fault
試したこと
調べてみるとバックエンドで動くOpenGLのエラーのようで、以下の環境変数を設定すると上手くいくという事例を見つけたので試してみました。
(open3d) t@LAP-JP-008-WIN:~$ export MESA_GL_VERSION_OVERRIDE=4.5
再度同じコードを実行するとOpen3dのウィンドウは立ち上がったのですが、ブランクのスクリーンのままで何も描画されません。Ubuntuのコンソールの方には実行時のログが大量に出力され、冒頭に以下のコンパイルエラーのログが出ました。
FEngine (64 bits) created at 0x7f970f003010 (threading is enabled) FEngine resolved backend: OpenGL COMPILE ERROR: 0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, and 3.00 ES
補足情報(FW/ツールのバージョンなど)
調べている中でOpenGLに関する情報を glxinfo
コマンドで調べられるということで、glxinfoで情報を出力してみました。
(open3d) t@LAP-JP-008-WIN:~$ glxinfo name of display: :0 display: :0 screen: 0 direct rendering: Yes ... OpenGL vendor string: Microsoft Corporation OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3050 Ti Laptop GPU) OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.6 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.5 (Compatibility Profile) Mesa 21.2.6 OpenGL shading language version string: 3.30 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 OpenGL ES profile extensions:
direct rendering: Yes
と
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3050 Ti Laptop GPU)
という2行からGPUとそのドライバは正しく設定されていると思いました。
上記コンパイルエラーで GLSL4.10はサポートされてないという出てますが、glxinfoの情報を見る限り
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6
とあるのでサポートされてるバージョンという理解です。
初心者質問ですみませんが、わかる方アドバイスお願いします。
あなたの回答
tips
プレビュー