nmwsharp / nmwsharp/polyscope

Issue with running on Google Colab

オープン
#82 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C++
スター
2.2k
フォーク
242
平均マージ
11分
マージ済み PR(30日)
1

説明

Hi there.
I'm trying to use polyscope on Google Colab, but after installing with pip and running the following code:


import polyscope as ps

# Initialize polyscope
ps.init()

### Register a point cloud
# `my_points` is a Nx3 numpy array
ps.register_point_cloud("my points", my_points)

### Register a mesh
# `verts` is a Nx3 numpy array of vertex positions
# `faces` is a Fx3 array of indices, or a nested list
ps.register_surface_mesh("my mesh", verts, faces, smooth_shade=True)

# Add a scalar function and a vector function defined on the mesh
# vertex_scalar is a length V numpy array of values
# face_vectors is an Fx3 array of vectors per face
ps.get_surface_mesh("my mesh").add_scalar_quantity("my_scalar", 
        vertex_scalar, defined_on='vertices', cmap='blues')
ps.get_surface_mesh("my mesh").add_vector_quantity("my_vector", 
        face_vectors, defined_on='faces', color=(0.2, 0.5, 0.5))

# View the point cloud and mesh we just registered in the 3D UI
ps.show()

I just get the following error:


---------------------------------------------------------------------------

RuntimeError                              Traceback (most recent call last)

<ipython-input-36-bdac230fc77e> in <module>()
      2 
      3 # Initialize polyscope
----> 4 ps.init()
      5 
      6 ### Register a point cloud

/usr/local/lib/python3.6/dist-packages/polyscope/core.py in init(backend)
     10     cwd_before = os.getcwd() # see note below
     11 
---> 12     psb.init(backend)
     13 
     14     # NOTE: For some reason I do not understand, calling psb.init() changes the working directory, causing e.g. writes to relative file paths to write to unexpected locations afterwards.

RuntimeError: [polyscope] ERROR: Failed to initialize glfw

Any idea why is this happening?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

polyscope/core.py の init() から始め、続いて「Failed to initialize glfw.」と報告する backend の初期化を追跡します。Google Colab で最小限の ps.init() 呼び出しを再現し、修正可能な初期化問題なのか、サポート対象外の環境なのかを判断します。動作が解決されるか、制限事項が明確に文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, python
領域
cloud, computer-graphics
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。