A method for repositioning a robot comprising the following steps: Step S1: detecting, by the robot, an obstacle, and entering step S2; Step S2: walking along an edge of the obstacle, judging whether a path along the edge of the obstacle meets a condition of determining that the obstacle is an isolated object or not, when the path does not meet the condition of determining that the obstacle is the isolated object, entering step S3, and when the path meets the condition of determining that the obstacle is the isolated object, entering step S4; Step S3: adjusting a walking angle of the robot to leave the obstacle and continue walking, and when another obstacle is detected, re-executing step S2; Step S4: recording an along-edge path of walking along an edge of the isolated object, judging whether the presently recorded along-edge path is similar to an along-edge path that is stored before or not, when the presently recorded along-edge path is not similar to the stored along-edge path, entering step S5, and when the presently recorded along-edge path is similar to an along-edge path that is stored before, entering step S6; Step S5: determining the recorded along-edge path walking along the edge of the isolated object as a stored along-edge path, and entering step S3; and Step S6: determining the stored along-edge path similar to the presently recorded along-edge path as a reference positioning path, determining a first local map where the presently recorded along-edge path is located and a second local map where the reference positioning path is located, overlapping the first local map and second local map with the same shape and size, determining as at least one positioning cell at least one grid cell of a part of the present along-edge path in the first local map overlapping the reference positioning path in the second local map, replacing a grid coordinate presently detected when the robot is in the at least one positioning cell with a grid coordinate of a corresponding grid cell in the reference positioning path. Step S1: detecting, by the robot, an obstacle, and entering step S2; Step S2: walking along an edge of the obstacle, judging whether a path along the edge of the obstacle meets a condition of determining that the obstacle is an isolated object or not, when the path does not meet the condition of determining that the obstacle is the isolated object, entering step S3, and when the path meets the condition of determining that the obstacle is the isolated object, entering step S4; Step S3: adjusting a walking angle of the robot to leave the obstacle and continue walking, and when another obstacle is detected, re-executing step S2; Step S4: recording an along-edge path of walking along an edge of the isolated object, judging whether the presently recorded along-edge path is similar to an along-edge path that is stored before or not, when the presently recorded along-edge path is not similar to the stored along-edge path, entering step S5, and when the presently recorded along-edge path is similar to an along-edge path that is stored before, entering step S6; Step S5: determining the recorded along-edge path walking along the edge of the isolated object as a stored along-edge path, and entering step S3; and Step S6: determining the stored along-edge path similar to the presently recorded along-edge path as a reference positioning path, determining a first local map where the presently recorded along-edge path is located and a second local map where the reference positioning path is located, overlapping the first local map and second local map with the same shape and size, determining as at least one positioning cell at least one grid cell of a part of the present along-edge path in the first local map overlapping the reference positioning path in the second local map, replacing a grid coordinate presently detected when the robot is in the at least one positioning cell with a grid coordinate of a corresponding grid cell in the reference positioning path.