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
829 stars 124 forks source link

Python kernal crashing #71

Open namansaxena9 opened 3 years ago

namansaxena9 commented 3 years ago

I am using Spyder with python 3.7. As soon as I run my code the kernal crashes.

The following is my sample code:

import pybulletgym import gym env_name = 'HumanoidPyBulletEnv-v0' env = gym.make(env_name)

env.render() env.reset()

for i in range(10000): obs, rewards, done, _ = env.step(env.action_space.sample()) env.close()

What could be reason for the crash?

benelot commented 3 years ago

Hi! Can you tell at what point in the code it crashes?

On Wed, Jul 21, 2021 at 6:47 AM namansaxena9 @.***> wrote:

I am using Spyder with python 3.7. As soon as I run my code the kernal crashes.

The following is my sample code:

import pybulletgym import gym env_name = 'HumanoidPyBulletEnv-v0' env = gym.make(env_name)

env.render() env.reset()

for i in range(10000): obs, rewards, done, _ = env.step(env.action_space.sample()) env.close()

What could be reason for the crash?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/benelot/pybullet-gym/issues/71, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXXXK3OHHWLVHAROIV6CVLTYZGPFANCNFSM5AXFJVEQ .

namansaxena9 commented 3 years ago

When I execute the code, the simulation window pops up. But the window is complete blank. Soon after that window goes into "Not Responding" state and kernel crashes.

I have tried to execute just this code:

import pybulletgym import gym env_name = 'HumanoidPyBulletEnv-v0' env = gym.make(env_name)

env.render() env.reset()

It crashes on the execution of just this code.

benelot commented 3 years ago

That is very surprising and I have never seen this. Can you check in pybullet (not pybullet gym) if you have the same problem? Pybullet gym is basically implementations of mujoco envs, and pybullet is the physics base system and also contains some envs you can test this bug with.

robodave94 commented 3 years ago

Just offering my two cents here, I had the same error described, I found that a quick fix was downgrading the gym version utilized. When utilizing the latest version of gym, some process was not being activated in the rendering step.

i.e. pip install gym==0.9.7 worked immediately, probably a more modern version would also work.