Method for detecting an object using structured light and robot using the same

A method for detecting an object using structured light and a robot using the same are provided to detect a floor object to influence to operation of the robot and to provide a special job to the robot. A robot(100) using method for detecting an object using structured spontaneously travels and performs a given job for a desired purpose. On a traveling path of the robot, there may be an object(10) on the floor. There is a height difference between a region where the object is present and a region where the object is not present within a region(20) where the robot travels. The object such as carpet, rug, and a slipper is an object existing on the traveling region of the robot and to influence the job to be performed by the robot. The robot measures the height difference of the floor during the travel and detects the object using the measured height difference. In order to measure the height difference, the robot projects structured light(30) in the traveling direction and captures the projected area of the structured light.