I am trying to use MuJoCo for quadruped robot with reinforcement learning. I get states of bodies with free joint and hinge joint through qpos. Can I also get the position data of CoM for sub-tree bodies without joints?
Yes, this information is available in mjData.subtree_com. For each body, it contains the 3D CoM for the sub-tree originating at this body. For bodies without children, this coincides with the body CoM.
I am so appreciated to your reply. However, I think subtree Com sensor is only contained in mjpro140 and OpenAI gym is based on mjpro131. Can I use mjpro140 with OpenAI by changing the path in a mujoco_py package?
It takes a bit more work than that to upgrade the Python wrapper unfortunately I hope OpenAI releases an upgrade soon...