bullet3 icon indicating copy to clipboard operation
bullet3 copied to clipboard

compatibility with Gym 0.26.0

Open markub3327 opened this issue 1 year ago • 6 comments

Hi @erwincoumans,

for fixing the issues https://github.com/bulletphysics/bullet3/issues/4331 and https://github.com/openai/gym/issues/3073, I must add order_enforce=False flag to all register() at init.py becouse new version of Gym doesn't allow call env.render() before calling env.reset().

Thanks for your time.

markub3327 avatar Sep 07 '22 13:09 markub3327

For compatibility with Gym 0.26.0 is needed to change the: if id in registry.env_specs: To: if id in registry.keys():

Thanks.

markub3327 avatar Sep 12 '22 13:09 markub3327

For compatibility with Gym 0.26.0 and newer, I must change all step() and reset(), too.

The new form of step() is:

observation, reward, terminated, truncated, info = env.step(action)

The new form of reset() is:

observation, info = env.reset()

The render or renders argument in __init__() in all envs is changed to render_mode.

@erwincoumans Please can you do tests of the correctness?

markub3327 avatar Sep 14 '22 18:09 markub3327

Thanks for the pull request. Would this change also make PyBullet incompatible with all older versions of Gym? Is there some gym version check possible? Or remove the order enforcing wrapper after make externally?

erwincoumans avatar Sep 25 '22 02:09 erwincoumans

There are more changes than the wrapper, because Gym 0.26.0 use new form of env.reset() and env.step().

It will be incompatible with the older Gym..... But checking the Gym version can solve this problem.

Thanks.

markub3327 avatar Sep 25 '22 03:09 markub3327