benelot / pybullet-gym

Open-source implementations of OpenAI Gym MuJoCo environments for use with the OpenAI Gym Reinforcement Learning Research Platform.
https://pybullet.org/
Other
814 stars 124 forks source link

fix import issue with newer versions of pybullet #49

Closed isacarnekvist closed 3 years ago

isacarnekvist commented 4 years ago

Remaining issue that was partly fixed: Issue: https://github.com/benelot/pybullet-gym/issues/36 Partal fix: https://github.com/benelot/pybullet-gym/pull/35

I just made the same one-liner fix for the mujoco envs. Tried it with pybullet 2.7.9 and it works.

Tests

Very little manual testing done, just opened an environment that previously did not work --- now it works.

Also ran:

python pybulletgym/tests/test_pybulletgym_mujoco_sanity.py

which reported no problems.

On the other hand:

python pybulletgym/tests/test_pybulletgym_roboschool_performance.py

showed this (before fix also):

The following envs perform worse: ['Walker2DPyBulletEnv-v0', 'HumanoidFlagrunHarderPyBulletEnv-v0', 'AtlasPyBulletEnv-v0'] 

The following envs have problems: ['PusherPyBulletEnv-v0', 'ThrowerPyBulletEnv-v0', 'StrikerPyBulletEnv-v0']
benelot commented 3 years ago

The tests show that everything runs as expected. I tried to build a performance related test with roboschool performance, but that should not change with your import. No idea why it did not work as expected.

benelot commented 3 years ago

I will merge as it its the correct fix to apply.