Joint torques that compensate gravity
Robotics System Toolbox / Manipulator Algorithms
The Gravity Torque block returns the joint torques required to hold the robot at a given configuration with the current Gravity setting on the Rigid body tree robot model.