A method for controlling a robot, the robot including: a kinematically downstream first rotary shaft and a kinematically upstream second rotary shaft which can be extended in a same direction, a first motor and a second motor configured to rotate the downstream rotary shaft and the upstream rotary shaft, respectively; and an arm configured to be rotated around the downstream rotary shaft and to hold a load directly or indirectly at a distal end of the arm, the method comprising: extending the downstream rotary shaft and the upstream rotary shaft in a same direction; rotating the upstream rotary shaft and vibrating the downstream rotary shaft so as to rotate the downstream rotary shaft relative to the load, the downstream rotary shaft being vibrated to eliminate the effects of a static friction of the downstream rotary shaft, the vibration being clockwise and counterclockwise rotations around the joint angle of the downstream rotary shaft, the vibration center of the downstream rotary shaft coinciding with the joint angle of the upstream rotary shaft, the vibration amplitude of the downstream rotary shaft being smaller than the rotation amplitude of the upstream rotary shaft in the clockwise and counterclockwise directions; equating the joint angle of the upstream rotary shaft with the joint angle of the downstream rotary shaft rotated relative to the load in the step of rotating the upstream rotary shaft so as to establish a correlation between the gravitational torque of the load applied to the downstream rotary shaft and the joint angle of the upstream rotary shaft, wherein the contact area between the robot and the ground is used as reference plane for the amplitudes of the joint angles of the downstream rotary shaft and of the upstream rotary shaft, and calculating a gravitational torque of the load applied to the downstream rotary shaft while the downstream rotary shaft is being rotated relative to the load in the step of rotating the upstream rotary shaft. a kinematically downstream first rotary shaft and a kinematically upstream second rotary shaft which can be extended in a same direction, a first motor and a second motor configured to rotate the downstream rotary shaft and the upstream rotary shaft, respectively; and an arm configured to be rotated around the downstream rotary shaft and to hold a load directly or indirectly at a distal end of the arm, the method comprising: extending the downstream rotary shaft and the upstream rotary shaft in a same direction; rotating the upstream rotary shaft and vibrating the downstream rotary shaft so as to rotate the downstream rotary shaft relative to the load, the downstream rotary shaft being vibrated to eliminate the effects of a static friction of the downstream rotary shaft, the vibration being clockwise and counterclockwise rotations around the joint angle of the downstream rotary shaft, the vibration center of the downstream rotary shaft coinciding with the joint angle of the upstream rotary shaft, the vibration amplitude of the downstream rotary shaft being smaller than the rotation amplitude of the upstream rotary shaft in the clockwise and counterclockwise directions; equating the joint angle of the upstream rotary shaft with the joint angle of the downstream rotary shaft rotated relative to the load in the step of rotating the upstream rotary shaft so as to establish a correlation between the gravitational torque of the load applied to the downstream rotary shaft and the joint angle of the upstream rotary shaft, wherein the contact area between the robot and the ground is used as reference plane for the amplitudes of the joint angles of the downstream rotary shaft and of the upstream rotary shaft, and calculating a gravitational torque of the load applied to the downstream rotary shaft while the downstream rotary shaft is being rotated relative to the load in the step of rotating the upstream rotary shaft. extending the downstream rotary shaft and the upstream rotary shaft in a same direction; rotating the upstream rotary shaft and vibrating the downstream rotary shaft so as to rotate the downstream rotary shaft relative to the load, the downstream rotary shaft being vibrated to eliminate the effects of a static friction of the downstream rotary shaft, the vibration being clockwise and counterclockwise rotations around the joint angle of the downstream rotary shaft, the vibration center of the downstream rotary shaft coinciding with the joint angle of the upstream rotary shaft, the vibration amplitude of the downstream rotary shaft being smaller than the rotation amplitude of the upstream rotary shaft in the clockwise and counterclockwise directions; equating the joint angle of the upstream rotary shaft with the joint angle of the downstream rotary shaft rotated relative to the load in the step of rotating the upstream rotary shaft so as to establish a correlation between the gravitational torque of the load applied to the downstream rotary shaft and the joint angle of the upstream rotary shaft, wherein the contact area between the robot and the ground is used as reference plane for the amplitudes of the joint angles of the downstream rotary shaft and of the upstream rotary shaft, and calculating a gravitational torque of the load applied to the downstream rotary shaft while the downstream rotary shaft is being rotated relative to the load in the step of rotating the upstream rotary shaft.