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!
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.