Is it possible to obtain detailed touch information in MuJoCo?

Discussion in 'Simulation' started by Amir, Jul 6, 2018.

  1. I know hat MuJoCo provides haptic feedback so that if you have a joystick you, as the human controller, will feel the forces applied to joints etc (if you're controlling an articulated hand model) while moving the stuff in a scene. However, for the project that I'm working on I need to get some more detailed information. For instance, imagine you have an articulated hand like shown in this video and you move the hand to touch other objects. I need to get access to information such as how much force/pressure is being applied to every part (e.g. face) of the articulated hand. I wonder, is it possible to obtain these information in MuJoCo?
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    There is a touch sensor in MuJoCo. You can attach one such sensor to each part of the hand that you are interested in. Alternatively, you can write code that examines the array at each time step and takes appropriate action depending on what contacts are active.
  3. Thank you. So can I add as many as touch sensors as I want? I just read somewhere that there is a limit on the number of sensors I can add (32). Is that true?

    Update: Are these the information that I can get from a touch sensor?

    int ncon; //number of detected contacts
    float time; //simulation time
    float pos[mjMAXSZ][3]; //contact position
    float frame[mjMAXSZ][9]; //contact frame (0-2: normal)
    float dist[mjMAXSZ]; //normal distance
    float force[mjMAXSZ][3]; //force in contact frame
    int geom1[mjMAXSZ]; //id of 1st contacting geom
    int geom2[mjMAXSZ]; //id of 2nd contacting geom (force: 1st -> 2nd)

    Also, could you be more specific on what kind of information does that touch sensor provide and how accurate is it? Does it only provide information like the object is 'touching' to another object or is it more fine-grained? By fine-grained I mean does it provide information on things like Normal forces, tangential forces or anything else as well?
    Last edited: Jul 6, 2018