Abstract
Disclosed are an electronic device and a method for controlling thereof. A method of controlling an electronic device includes identifying a first traveling path heading to a preset destination based on a map corresponding to an environment in which an electronic device operates; identifying an object interfering with traveling according to the first traveling path based on at least one sensor while traveling according to the first traveling path; identifying an avoidance path to avoid the object based on at least one of a location and speed of the identified object and traveling according to the avoidance path; and based on the identified object being distant by a preset distance or more based on traveling according to the avoidance path, controlling the electronic device to travel according to the first traveling path based on a current location of the electronic device.