# zero-g mode for UR10 gravity compensation

I would like to freely move my UR10 arm in response to an external force, just like the zero-g mode for Baxter robot, which can be activated by holding its wrist. The Baxter documentation on zero-g mode says the following:

Zero-G mode can often be confused with the mode obtained by disabling the gravity compensation torques. By default, the gravity compensation torques will always be applied when the robot is enabled. In Zero-G mode, the controllers are disabled and so the arm can be freely moved across. In this case, the effect of gravity would be compensated by the gravity compensation model applying gravity compensation torques across the joints, there would be no torques from the controllers since they would not be active, and so the arm can be moved freely around, hence the name.

So apparently this means that the controller torques need to be disabled in order to achieve the zero-g mode. I am using ur_modern_driver for my UR10 arm. Any ideas on how can I implement this mode with the running modern driver?

If I understand your question correctly, You want to move the robot freely, its possible but only in the following case( as far as my understanding goes, in fact my experience on other robot):

1. The control mode should be in torque mode( mean the controller output is torque not position i.e send torque command not a position to each joint)
2. Compensate the torque of gravity which is induced to each joint based on the specific robot configuration, mass of each link, and center of mass of each link.

3. The equivalent way to say this is do dynamic modeling of your robot

i.e.

$a_{g} = [0,0,-g_{0}],g_{0} = 9.8$ this is acceleration due to gravity in base coordinate frame (CF)so you need to use Transformation matrix to have acceleration due to gravity for each link in its joint CF

in fact its the right technical term is inverse dynamics control.

If your goal is gravity compensation only you need to know(you can estimate from CAD robot model or given by manufacturer): the mass, the center of mass of each robot link and current joint configuration ($q_i$ i=1,...,6). Then you can determine torque required to support the robot at the given configuration recursively(start from last joint and determine sequentially for the other joints/links ).