google-deepmind / google-deepmind/dm_control

Can the viewer work properly on WSL2?

Đang mở
#383 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
4.7k
Fork
764
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello,

I am trying to call the `viewer` on WSL2 (ubuntu20.04 with WSLg) and followed the example:

```python
env = suite.load(domain_name="humanoid", task_name="stand")
action_spec = env.action_spec()

# Define a uniform random policy.
def random_policy(time_step):
del time_step # Unused.
return np.random.uniform(low=action_spec.minimum,
high=action_spec.maximum,
size=action_spec.shape)
viewer.launch(
env, policy=random_policy,
)
```

However, I got an error:

`OpenGL.error.Error: Attempt to retrieve context when no valid context`

Error info

```python3
Traceback (most recent call last):
File "test_gym.py", line 64, in
dmc_rollout("humanoid_run")
File "test_gym.py", line 57, in dmc_rollout
viewer.launch(
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/dm_control/viewer/__init__.py", line 39, in launch
app = application.Application(title=title, width=width, height=height)
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/dm_control/viewer/application.py", line 187, in __init__
self._window = gui.RenderWindow(width, height, title)
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/dm_control/viewer/gui/glfw_gui.py", line 196, in __init__
self._fullscreen_quad = ctx.call(self._glfw_setup, self._context.window)
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/dm_control/_render/executor/render_executor.py", line 138, in call
return func(*args, **kwargs)
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/dm_control/viewer/gui/glfw_gui.py", line 204, in _glfw_setup
return fullscreen_quad.FullscreenQuadRenderer()
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/dm_control/viewer/gui/fullscreen_quad.py", line 66, in __init__
self._init_shaders()
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/dm_control/viewer/gui/fullscreen_quad.py", line 95, in _init_shaders
GL.glVertexAttribPointer(
File "src/latebind.pyx", line 51, in OpenGL_accelerate.latebind.Curry.__call__
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/OpenGL/GL/VERSION/GL_2_0.py", line 469, in glVertexAttribPointer
contextdata.setValue( key, array )
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/OpenGL/contextdata.py", line 59, in setValue
context = getContext( context )
File "/home/yan/miniconda3/envs/RL/lib/python3.8/site-packages/OpenGL/contextdata.py", line 38, in getContext
context = platform.GetCurrentContext()
OpenGL.error.Error: Attempt to retrieve context when no valid context
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by reproducing the viewer.launch example on WSL2 and inspect viewer/application.py, viewer/gui/glfw_gui.py, and viewer/gui/fullscreen_quad.py around context creation and _glfw_setup. Use the traceback to trace the failure through dm_control/_render/executor/render_executor.py. Done means the viewer no longer raises the invalid-context error in the reported WSL2 environment.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
linux, python, ubuntu
Lĩnh vực
computer-graphics, desktop, operating-systems
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.