bullet3
bullet3 copied to clipboard
compatibility with Gym 0.26.0
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.
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.
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?
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?
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.