bullet3 icon indicating copy to clipboard operation
bullet3 copied to clipboard

Convert code to support Gymnasium instead of Gym

Open ManosL opened this issue 2 years ago • 3 comments

Considering that Gym is not maintained by OpenAI and its maintained now from a different repo Gymnasium, I suggest to change the code in order to import gymnasium instead of gym, in order for the codebase to be up-to-date with the recent developments of Gym

ManosL avatar Nov 05 '22 09:11 ManosL

Are there any plans to include this into the roadmap? I don't think that this will be too hard and I would love to help with any existing effort.

Sitin avatar Jun 28 '23 08:06 Sitin

Are there any plans to include this in the roadmap? I don't think this will be too hard, and I would love to help with any existing effort.

I quickly checked if I could quickly migrate the examples to Gymnasium, although it is not hard, I think the job takes quite an effort since not only the import has to be changed but also the:

  • Step method.
  • Reset method.
  • Seeding behaviour.
  • Rendering behaviour.

For more information, see https://gymnasium.farama.org/content/migration-guide. In the end, decided to use the compatibility wrappers provided by Farama for my research (see https://gymnasium.farama.org/content/gym_compatibility/).

register(
    id="WrappedMinitaur",
    entry_point="pybullet_envs.bullet.minitaur_gym_env:MinitaurBulletEnv",
    disable_env_checker=True,
    apply_api_compatibility=True,
)

rickstaa avatar Jul 14 '23 09:07 rickstaa

Fyi, I pushed and released on pypi a subset of pybullet envs compatible with gymnasium: https://github.com/araffin/pybullet_envs_gymnasium pip install pybullet_envs_gymnasium (I will crosspost this message as it may interest several people)

araffin avatar Nov 08 '23 13:11 araffin