mujoco-py icon indicating copy to clipboard operation
mujoco-py copied to clipboard

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

Open andrewliao11 opened this issue 7 years ago • 12 comments

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

andrewliao11 avatar Apr 14 '17 07:04 andrewliao11

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

lhao499 avatar Sep 03 '17 19:09 lhao499

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

andrewliao11 avatar Oct 19 '17 04:10 andrewliao11

@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

kkjh0723 avatar Nov 07 '17 13:11 kkjh0723

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.

HenryZhou7 avatar Mar 22 '18 01:03 HenryZhou7

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

kirk86 avatar Jul 26 '18 00:07 kirk86

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

cyrilzakka avatar Dec 28 '18 13:12 cyrilzakka

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)

muratcancicek avatar Jan 22 '19 09:01 muratcancicek

Similar problem when using this for a robotic control task.

quantumiracle avatar Jan 15 '21 02:01 quantumiracle

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...

HankerSia avatar Mar 05 '21 01:03 HankerSia

Sleep solution is not helping for me, either.

HYDesmondLiu avatar Sep 08 '21 20:09 HYDesmondLiu

any updates?

lucasjinreal avatar May 07 '22 04:05 lucasjinreal

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.

MoritzLange avatar Aug 25 '22 12:08 MoritzLange