A control device of a robot that performs insertion or a press-fitting operation of a workpiece in a Z direction into a hole part , the robot comprising an end effector attached to the end part of the robot and having a mechanism for gripping the workpiece, and a force sensor attached to the end effector configured to detect a pressure applied to the workpiece , wherein the control device comprises: a measuring part , configured to measure an elapsed time from a time point of starting a correcting operation in a case where the position of the workpiece in the X direction and in the Y direction does not come to the press-fitting position corresponding to the hole part or the pushing force detected by the force sensor reaches a preset determination value, wherein the correcting operation comprises a searching operation of searching for an insertion position or a press-fitting position, and a biting canceling operation of canceling biting of a workpiece during insertion or press-fitting; a calculating part , configured to calculate a total remaining time of the correcting operation by subtracting an elapsed time from a start to an end of the correcting operation from a preset total allowed time of the correcting operation; a comparing part , configured to compare the total remaining time of the correcting operation with a required operation time, the required operation time being the elapsed time from the start to the end of the correcting operation, wherein the start and the end of the correcting operation are determined based on a value detected by the force sensor; and a control part , configured to interrupt the correcting operation before the allowed time elapses in a case where the total remaining time of the correcting operation is less than the required operation time. a measuring part , configured to measure an elapsed time from a time point of starting a correcting operation in a case where the position of the workpiece in the X direction and in the Y direction does not come to the press-fitting position corresponding to the hole part or the pushing force detected by the force sensor reaches a preset determination value, wherein the correcting operation comprises a searching operation of searching for an insertion position or a press-fitting position, and a biting canceling operation of canceling biting of a workpiece during insertion or press-fitting; a calculating part , configured to calculate a total remaining time of the correcting operation by subtracting an elapsed time from a start to an end of the correcting operation from a preset total allowed time of the correcting operation; a comparing part , configured to compare the total remaining time of the correcting operation with a required operation time, the required operation time being the elapsed time from the start to the end of the correcting operation, wherein the start and the end of the correcting operation are determined based on a value detected by the force sensor; and a control part , configured to interrupt the correcting operation before the allowed time elapses in a case where the total remaining time of the correcting operation is less than the required operation time. <EOS>