pybullet-gym icon indicating copy to clipboard operation
pybullet-gym copied to clipboard

Python kernal crashing

Open namansaxena9 opened this issue 3 years ago • 4 comments

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?

namansaxena9 avatar Jul 21 '21 04:07 namansaxena9

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 .

benelot avatar Jul 21 '21 10:07 benelot

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.

namansaxena9 avatar Jul 21 '21 10:07 namansaxena9

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.

benelot avatar Jul 21 '21 15:07 benelot

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.

robodave94 avatar Aug 10 '21 04:08 robodave94