Skip to content

Commit

Permalink
Merge pull request #4 from huggingface/user/aliberts/2024_04_09_fix_G…
Browse files Browse the repository at this point in the history
…L_error

Fix GL error
  • Loading branch information
aliberts authored Apr 9, 2024
2 parents 6c98935 + 7150dea commit 824b228
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gym_pusht/envs/pusht.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import collections
import os

import cv2
import gymnasium as gym
Expand All @@ -12,6 +13,10 @@

from .pymunk_override import DrawOptions

RENDER_MODES = ["rgb_array"]
if os.environ.get("MUJOCO_GL") != "egl":
RENDER_MODES.append("human")


def pymunk_to_shapely(body, shapes):
geoms = []
Expand Down Expand Up @@ -114,7 +119,7 @@ class PushTEnv(gym.Env):
* TODO:
"""

metadata = {"render_modes": ["human", "rgb_array"], "render_fps": 10}
metadata = {"render_modes": RENDER_MODES, "render_fps": 10}

def __init__(
self,
Expand Down

0 comments on commit 824b228

Please sign in to comment.