Mujoco grip parameters

Discussion in 'Simulation' started by Giusebar, Jun 13, 2018.

  1. Hello, I'm attempting to grasp a box with a UR10 and a custom gripper. I am able to grasp the box with a pinch grasp but the block slides out of the finger. Based on this discussion I have tried to set up the values of solimp and solref as suggested and that seems to help.

    Anyway I'm a bit confused by the meaning of those parameters in relation to actual physical contact between the gripper and the box.

    I wonder whether there are some example on how to set up parameters that allows to simulate properly the different contact behaviour depending on the type of materials (E.g. rubber on cardboard).

    Or what is the rule of thumbs to set up those parameters?

    Thanks,
    Giuseppe
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Think of the *deformation* as behaving like a mass-spring-damper. solimp sets the mass, in a way that may depend on position (i.e. the mass of the deformation increases with constraint violation), while solref sets the stiffness and damping. There is internal scaling applied, so that the same solref/imp parameters result in similar behaviors for very different masses of the rigid bodies. The details are in the documentation here

    http://www.mujoco.org/book/computation.html#soParameters

    In general, the best way to set parameters for a given physical system is to do system identification: obtain measurements form the system, and optimize the model parameters so as to make the model fit the data. Normally people do this to infer inertias and frictions. But since MuJoCo has a rich model of deformation dynamics, these parameters also have to be identified.

    If you still have problems with slip in grasping, and can also try the noslip solver.
     
  3. Hi, thanks for your answer. I was able to set up the parameters better but I would like to avoid using the noslip solver as I would like to the objects to be able to slip if the grasp is not good enough.

    Anyway at the moment i'm still getting some strange behaviours.
    I've attached screenshots of my use-case in which I'm grasping a cylinder. In the picture in which the contacts are displayed, we can see that 5 contacts are detected between the gripper and the object. The displayed contacts between the palm of the gripper induces to think that there is contact between the palm and the cylinder. However when I remove the contact virtualisation it's clearly visible that there is a gap between the gripper and the cylinder, exactly in the position in which the contact is reported to be. I have set the margin to be 0 (default value), hence i would have expected to see the contacts only in places where the meshes are actually touching. Is this the right meaning of the margin parameter?

    I attached the model parameters, maybe you can have a look and let me know whether I'm doing something wrong or whether there is a configuration or settings that could make the grasp look better.

    The robot_ur10_environemnt.xml file has the description of the object cylinder while the robot_ur10_fh_model.xml has the description of the arm and gripper.

    Thanks,
    Giuseppe
     

    Attached Files:

  4. I have taken more screenshot that shows the problem from a better perspective. Here is clearly possible to see the contacts displayed, although the cylinder is actually floating within the gripper.

    Thanks again,
    Giuseppe
     

    Attached Files:

  5. Hi,

    Another related issue is a collision within the arm as shown in the screenshot below.
    It looks like the visualised meshes are not exactly the ones used for collision. The geom tag is defined as type "mesh", hence I would expect the collision model to be the same as the mesh so I don't exactly understand how is this contact computed.
    Is there a way to check the collision shapes? Or is there anything else I could tweak to have consistent contacts?

    Thanks again,
    Giuseppe
     

    Attached Files: