bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
http://bulletphysics.org
Other
12.42k stars 2.86k forks source link

Convert code to support Gymnasium instead of Gym #4369

Open ManosL opened 1 year ago

ManosL commented 1 year ago

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

Sitin commented 1 year ago

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.

rickstaa commented 1 year ago

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:

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,
)
araffin commented 10 months ago

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)