Contact Forces

Discussion in 'Visualization' started by Aniket Shah, May 30, 2018.

  1. Hello,

    I am trying to use the contact forces from my simulation to provide visual feedback.
    I am using the Matlab API to get the information from MuJoCo.

    Using 'contact = mj_get_contact', I am getting access to the forces involved in the contacts but I am unable to figure out what the values in the matrix signify. When I access the contact struct in the work space, I am seeing a matrix of numbers for contact.force based on the number of contacts (ncon). How do I distinguish the contact forces? Is it purely based on the position? Also, is it a column based segregation or a row based segregation for each contact made?

    I have attached pictures to provide a better understanding

    contact.PNG contact_force.PNG