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 for mujoco envs and inverted_pendulum mujoco obs dimension #47

Closed manuelbre closed 3 years ago

manuelbre commented 4 years ago

My two proposed changes are not related. Feel if you want me to submit them separately.

The first change in pybulletgym/envs/mujoco/envs/env_bases.py was already submitted for robotschool environments. This just reflects the same change due to a renaming for the mujoco envs.

The second change is due to the fact that the observations returned should be a 1-D array, not a 2x2 array. The current implementation fails if you combine the environment with existing agents from stable_baselines. Also, this change makes things more consistent.