WARNING: Nan, Inf or huge value in QACC at DOF 1.

Discussion in 'Simulation' started by ClaudeAbles, Nov 2, 2017.

  1. Hello,
    I am simulating a 7-DoF robotic arm, and wanna assign the position of one joint like following (before 'mj_step(m, d);', in the main loop):

    int id4 = mj_name2id(m, mjOBJ_JOINT, "robot_joint_4");
    d->qpos[m->jnt_qposadr[id4]] = 0.5;


    However, I got the following error during simulation:
    WARNING: Nan, Inf or huge value in QACC at DOF 1. The simulation is unstable. Time = 3.3100.

    While the remaining joints work well. The simulated robot behaves as it has been reseted to its original position at this error time point.

    Could you please give me any hints about this problem? Thanks. :)
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    The change you are making is somehow causing the simulation to become unstable. When that happens, you get a warning and the state is automatically reset.

    So you should find a way to avoid the instability. My guess is that the position you are setting is causing a large contact penetration, or some other large constraint violation.
     
  3. Hello,
    I set my action to all zero. The problem still "sometimes" appears.
    I wonder if there is some unnecessary randomness inside Mujoco engine that causes this.

    update:
    I'm using mujoco_py from Openai. So, the problem might be in there implementation. I'm not sure.
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    There is no randomness in MuJoCo, except in simulation of sensor noise (when enabled) but that does not feed into the simulation (unless you are using a feedback controller driven by noisy sensor data).