Describe the bug
Upon initializing a mujoco environment through gym (the issue is with mujoco_py and other packages like metaworld etc as well), when one resets the env and renders it the expected behavior would be that any number of renders would give the same image observation. This is true if the rendering backend is glfw (as on mac), however for other backends egl & omesa this is not true.
Code example
When running a simple code :
import gym
x = gym.make('Humanoid-v2', render_mode='rgb_array')
x.reset(seed=2)
a = x.render()
b = x.render()
print((a!=b).sum())
The expected result should be 0. It is 0 if infact i'm running glfw (either onscreen / ofscreen on mac, or ofscreen with xvfb on headless server). But for egl / omesa backend this is non zero & significantly varies.
System Info
Describe the characteristic of your environment:
gym version 0.26.2, mujoco 2.1.2.14, mujoco 2.2.0
OS : CentOS7, Ubuntu 20x (tried on both)
Python 3.9x
Checklist
[x] I have checked that there is no similar issue in the repo (required)
Describe the bug Upon initializing a mujoco environment through gym (the issue is with mujoco_py and other packages like metaworld etc as well), when one resets the env and renders it the expected behavior would be that any number of renders would give the same image observation. This is true if the rendering backend is glfw (as on mac), however for other backends egl & omesa this is not true.
Code example When running a simple code :
The expected result should be 0. It is 0 if infact i'm running glfw (either onscreen / ofscreen on mac, or ofscreen with xvfb on headless server). But for egl / omesa backend this is non zero & significantly varies.
System Info Describe the characteristic of your environment:
Checklist