Center of mass of subtree on local frame

Discussion in 'Simulation' started by jpsb, Oct 24, 2017.

  1. Hello!

    How can I obtain the CoM of a subtree with respect to another body? For example, in a humanoid, the CoM of a arm with respect to the coordinate frame of the body that makes up the head?

    Tranks!
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    There is no function for that, you have to do the math yourself. The subtree coms in global coordinates are in mjData.subtree_com. So you need to do a coordinate transformation.