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.81k stars 810 forks source link

A FLAG instead of a warning stop when got WARNING: Nan, Inf or huge value in QACC at DOF 0. The simulation is unstable. #736

Open StaminaTang opened 2 years ago

StaminaTang commented 2 years ago

Describe the bug Hello! I got an error like this in halfcheetah: got WARNING: Nan, Inf or huge value in QACC at DOF 0. The simulation is unstable.

Expected behavior When this error raised, my run stops. I know we have a function to ignore this instability warning. Is there any function to return this warning flag and according to this flag I could do sth. such as: step... if warningflag: do

Thank you so much!

Error Messages Including more/longer error messages gives us more information to work with.

Desktop (please complete the following information):

mujoco 2.1.5 mujoco-py 2.1.2.14

Environment

Additional context Add any other context about the problem here.