openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.87k stars 814 forks source link

Run Ant-v1, got WARNING: Nan, Inf or huge value in QACC at DOF 0. The simulation is unstable. Time = 0.0000. #35

Open andrewliao11 opened 7 years ago

andrewliao11 commented 7 years ago

Hi all, I run a3c in Ant-v1 and got this warning:

WARNING: Nan, Inf or huge value in QACC at DOF 0. The simulation is unstable. Time = 0.0000.

Are there anyone know what's the problem with this, and maybe the reason why. (My code runs well for other envs

haoliuhl commented 7 years ago

I met the same issue on several environments, does anyone know a solution?

andrewliao11 commented 7 years ago

my mujoco-py version is mujoco-py==0.5.7 I'm not sure if it appears in other version

kkjh0723 commented 7 years ago

@andrewliao11 I also tried Ant-v1 with your pytorch a3c code. I changed line 81 in test.py

state, reward, done, _ = env.step(action.numpy())

and then, the warning was disappeared

HenryZhou7 commented 6 years ago

Any updates on this issue? I am having the same trouble. I suspect that it is due to some structure that causes the acceleration becoming too large.

kirk86 commented 6 years ago

Same issue here with different environments. If anyone has found as solution plz kindly share!

cyrilzakka commented 5 years ago

Seems to be an issue with MuJoCo - too much penetration or contact between two bodies will cause this error. Model needs to updated

muratcancicek commented 5 years ago

I had a similar problem in #340. I discovered that you should slow down stepping. I solved the issue by just delaying the next step with time.sleep(.002).

time.sleep(.002) obs, r, done, _ = self.env.step(action)

quantumiracle commented 3 years ago

Similar problem when using this for a robotic control task.

HankerSia commented 3 years ago

Similar problem when using this for grasp task with a customized mesh file. Any new solution? I had tried the sleep solution, it seems no help...

HYDesmondLiu commented 3 years ago

Sleep solution is not helping for me, either.

lucasjinreal commented 2 years ago

any updates?

MoritzLange commented 2 years ago

I recommend taking a look at the action you're passing to step(). I'm debugging some quite complex code and at some point this error occured when the action just consisted of nans. So at least in my case the problem is exactly what the error message states.