Gravity compensation torque

I am developing a PD controller based on reinforcement learning using isaac gym.
Is there a way to get the gravity compensation torque for each joint of the robot arm?