Hi, Related to centroid dynamics, I would like to ask if there is a function to get center of mass (6d), its Jacobian(6, nq) and centroid inertia Ig (6, 6) of whole multi bodies. I guess simulator does not need to provide those functions and user should calculate it based on each links, but I found one example (simulate.cpp) includes option(f2 - M) showing the center of mass of all bodies. So I want to make sure if those are computed in mj_step and provided to users. Thank you
The field mjData.subtree_com contains the center of mass of each kinematic subtree (starting at the corresponding body). To obtain the centroid inertia matrix or Jacobians, you would have to implement your own functions.