Ground Reaction Force

Discussion in 'Visualization' started by Rawal Khirodkar, Jun 4, 2018.

  1. Hi,

    How to extract the ground reaction forces (in global coordinates) from the model?

    I believe it is a part of efc_force (one of the constraints force) in mjData.
    The constraint forces can be distinguished using efc_type. However, I am only interested in contact forces with the ground.

    Any help would be appreciated.

    Thank you
     
    Kyokushin likes this.
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    You have to write some code that searches the list of contacts (mjData.contact) and identifies contacts where one of the geoms is the ground.
     
  3. Thank you for your question, @Rawal Khirodkar, and thank you very much for pointing me to a cleaner way of detecting GRFs, @Emo Todorov. Before I was using mjData.crfc_ext described here, which also worked out.

    Could you please share your solution, when you're done, @Rawal Khirodkar?

    Thank you in advance and best luck!
    Rustam