Hi, I'm trying to implement a robot manipulator and gripper in Mujoco. I used torque actuator and wrote a pid controller myself but I had a lot of trouble making the simulation stable mainly due to gravity. My initial thoughts on compensating the gravity are as follows: get the gravity bias on each joint and then add control term calculated from error. I searched previous post and found that mjData->qfrc_bias gives the gravitational bias and all internal forces. At each time step I calculate the ctrl term from errors my pid gains and then add qfrc_bias. But it didn't work well. The joint angles have large steady state errors. Is "mjData->qfrc_bias" the correct way to access ONLY the gravity bias on each joint at each time step? What exactly is the definition of internal forces? Do contact forces count as internal forces or external forces? I want to work on manipulation tasks so I definitely don't want to compensate for contact and frictions.... Thanks!