Got MuJoCo Warning: Nan, Inf or huge value in QACC at DOF 0. The simulation is unstable.Time = 0.51

Discussion in 'Simulation' started by Sandipan Haldar, Apr 5, 2018.

  1. Hi
    I am using a 2 DOF robotic arm. When I change the joint_qpos of one DOF 1 , it is working fine. But when I do the same for DOF 0 it showing the following error. Can you please explain what could be the possible reason and how to solve it?

    File ".mujoco/mjpro150/mujoco-py-1.50.1.1/mujoco_py/mjsim.pyx", line 96, in mujoco_py.cymj.MjSim.step
    File ".mujoco/mjpro150/mujoco-py-1.50.1.1/mujoco_py/cymj.pyx", line 103, in mujoco_py.cymj.wrap_mujoco_warning.__exit__
    File ".mujoco/mjpro150/mujoco-py-1.50.1.1/mujoco_py/cymj.pyx", line 63, in mujoco_py.cymj.c_warning_callback
    File "/home/sandipan/.mujoco/mjpro150/mujoco-py-1.50.1.1/mujoco_py/builder.py", line 273, in user_warning_raise_exception
    raise MujocoException('Got MuJoCo Warning: {}'.format(warn))
    mujoco_py.builder.MujocoException: Got MuJoCo Warning: Nan, Inf or huge value in QACC at DOF 0. The simulation is unstable. Time = 0.5160.


    Link to XML file .
    Link to meshes
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    The simulator monitors the system state for large numbers or infs/nans, and resets automatically if it finds them. I am not sure why you are changing qpos directly; the whole point of a simulator is to change the positions for you automatically, while you provide control signals. Anyway, it is possible that you are changing the position in such a way that it creates a large joint or contact penetration, which triggers a large correction making the simulation unstable. MuJoCo uses a soft constraint model so you can in principle do this if you want, but you have to use much smaller time steps.
     
  3. It works when I use smaller time steps. How to provide control signals as you mentioned? I am using position type actuator
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    When using position actuators, mjData.ctrl has the meaning of reference position. You may want to read the actuator section of the documentation.