Initialize simulator to a grasped state

Discussion in 'Priority support' started by Samarth Brahmbhatt, Apr 16, 2021.

  1. Hello,

    I am working on a robot grasping environment. A parallel jaw gripper grasps an object and lifts it. After playing with solimp and turning on the noslip solver, the object does not slip and fall down.

    I am trying to figure out how to initialize the simulator to this lifted and grasped state.

    I looked at some other threads, which point to this section of the docs:

    So I saved the state vector, qacc_warmstart, and the all controls. Next, I created a new sim with the same model and applied the saved state vector, qacc_warmstart, and controls. Then I called forward() to re-create the full state.

    Now, applying the same constant controls in a loop and stepping the sim causes the gripper to open slightly, plate falls down, and then the gripper closes back. The same controls and state starting point had maintained the object in a static grip before (when grasping the object from scratch).

    It seems like when I do this saving & loading, the gripper experiences some outward force from contact with the object as soon as the sim is stepped, which causes it to open slightly, and the grasp is lost.

    Does anyone know how this problem can be solved?