Test higher version of mujoco but failed, add hard version check in code

This commit is contained in:
wty-yy
2026-07-22 21:37:17 +08:00
parent 30643dfed8
commit c1b347c89f
3 changed files with 622 additions and 7 deletions

View File

@@ -8,14 +8,17 @@
@Desc : Run Robogauge Pipeline
'''
import os
import sys
# Headless solution for mujoco
# For GPU
# os.environ['MUJOCO_GL'] = 'egl'
# For CPU (Slow)
# os.environ['MUJOCO_GL'] = 'osmesa'
# With a graphical user interface (GUI)
os.environ['MUJOCO_GL'] = 'glfw'
# Select the rendering backend before importing MuJoCo. EGL provides an
# offscreen context on headless Linux, while GLFW is used by the GUI viewer.
# Keep an explicit MUJOCO_GL value so callers can override either default.
default_mujoco_gl = (
'egl'
if sys.platform.startswith('linux') and '--headless' in sys.argv
else 'glfw'
)
os.environ.setdefault('MUJOCO_GL', default_mujoco_gl)
os.environ["OMP_NUM_THREADS"] = "1"
os.environ["MKL_NUM_THREADS"] = "1"