There can be many issues when automating a cell manufacturing process using a robot, and the use of a jig is one of them. The last step of a manufacturing process is closing the lid of a product, and it is desirable to perform such a task without using a jig to improve the manufacturing efficiency. In this study, we propose a novel algorithm which uses a dual-arm robot or the friction of the box to compensate for the initial position and orientation errors between the box and the lid. Then, force control can be used to combine the proposed algorithm with an assembly algorithm, enabling a robot to close the lid of a box without a jig regardless of its initial position and orientation errors. The performance of the proposed algorithm was verified through experiments.