stanfordnmbl / osim-rl

Reinforcement learning environments with musculoskeletal models
http://osim-rl.stanford.edu/
MIT License
877 stars 248 forks source link

python crashes with no error when running env.reset() #228

Open samstar197 opened 3 years ago

samstar197 commented 3 years ago

I am working on trying to implement the L2M2019 challenge, and I have an issue where, if I try to run

from osim.env import L2M2019Env

env = L2M2019Env(visualize=True)
observation = env.reset()
for i in range(200):
    observation, reward, done, info = env.step(env.action_space.sample())

then python terminal/jupyter kernel or whatever I use just closes/dies with no error being shown.

I found a similar problem here except the solution doesn't seem to change anything for me.

That issue has been marked as closed however the issue still persists for me, any help is massively appreciated.

(I am very new to opensim so if this is a simple thing to fix or something then I apologise)

kidzik commented 3 years ago

Does it work properly with visualize=False? Which system are you using?

samstar197 commented 3 years ago

@kidzik thanks for the quick reply, it doesnt work with visualize=False.

I am on Windows 10

samstar197 commented 3 years ago

@kidzik I have more insight into what is going on but I don't know how to solve it. when running in powershell I can see that i get an Intel MKL ERROR. Intel MKL ERROR: Parameter 1 was incorrect on entry to CPTEQR. This error occurs whether or not i have visualize as true or false.

Any understand as to what this could be? thanks!

kidzik commented 3 years ago

Have you tried compiling from the source? Alternatively maybe running within a docker container could help since the linux version is better maintained

SoroushK93 commented 2 years ago

@samstar197 could you solve this problem?

zupatisc commented 1 year ago

I think I am experiencing the same issue. Going through it step by step it seems that both the call to model.equilibrateMuscles(state) as well as manager.initialize(state) are what crashes the jupyter kernel for me.

SoroushK93 commented 1 year ago

I'm using VSC not Jupiter. I remember the problem was a version conflict. I'm using Python 3.6.2 for L2M2019Env env, and it is working fine now.

zupatisc commented 1 year ago

The crash seems to happen inside one of the c functions from opensim. I will give a rebuild a try.

zupatisc commented 1 year ago

Turns out this was some issue with the Intel MLK for me. This solution fixed the problem for me https://github.com/alumae/kaldi-gstreamer-server/issues/251#issuecomment-801871858