Accessing the 'Control Policy' in Reachy

Hello. I’ve been trying to access the underlying ‘control policy’ for the reachy. Essentially, I’ve been trying to implement gravity compensation for the PID controller. However, I cannot see where the ‘torque’ commands are being generated for the controller. I need help understanding how the joint PID gains are being utilized. Are they being used to directly modify the motor PID gains, or are they used to generate torque values? I’d be grateful for any help in this matter.