Robot becomes unstable while after changing qpos0 values

Discussion in 'Simulation' started by Parijat Dewangan, Oct 27, 2017.

  1. for(int i=0;i<13;i++)
    {
    m->qpos0[13+i] = fRand(angle_bound[0][6+i], angle_bound[1][6+i]);
    }
    mj_resetData(m,d);
    mj_kinematics(m,d);
    mj_step(m,d);

    I am able to set the qpos initial values at default pose. Due the change is qpos0 values, the robot becomes unstable(because of high qvel values) when mj_step is performed. The robot is stable when all the qpos0 values are zero. For non zero qpos0 values, there is high change in angle, hence high force acting which make the robot unstable.

    How to set the values at default pose, without any qvel?