floating gripper

Discussion in 'Simulation' started by supermario, Nov 24, 2017.

  1. I am working with a floating gripper. I set the desired pose as described here:
    http://www.mujoco.org/book/index.html#Floating
    but when the simulation continues the gripper keeps falling(probably because of the gravity). How can I move the gripper to the desired pose without falling?
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Yes, gravity tends to make things fall :)

    If you have a floating base, why do you expect the object to stay in place? There are several mechanisms in MuJoCo for doing that, but first you need to decide what physical phenomenon you are trying to simulate. The simplest method is to just have a fixed base. Alternatively, you can use a mocap body as base -- it is fixed for the purposes of simulation, but you can move it programmatically by setting mjData.mocap_pos/quat. You could also have a (soft) equality constraint between the floating base and a mocap body which you move around. If you look at the MPL hand model in the HAPTIX distribution, it uses that approach to move the hand with a motion capture marker. Finally, you can apply forces on the base to cancel gravity, and maybe add some feedback controller to keep it in place in case it drifts.