An autonomous mobile robot (AMR) comprising a light detection and ranging (LiDAR), the AMR configured for obtaining an initial detection angle of an object detected by the LiDAR, and obtaining an actual angle of the object according to a compensation angle and the initial detection angle, wherein the compensation angle is obtained by using an angle compensation method, the angle compensation method comprising:
- obtaining a first position of the object, wherein the first position is an actual position of the object relative to a predetermined reference area;
- obtaining a second position of the object detected by the LiDAR when the LiDAR reaches the predetermined reference area;
- obtaining a first distance between the second position and the first position;
- and
- determining the compensation angle of the LiDAR according to the first distance.