A vacuum cleaner is selectively operable in one of three modes, namely: an automatic self-directing mode, a remotely controlled mode, or a manual mode. The vacuum carries ultrasonic object detectors for detecting walls of a room being cleaned, as well as obstacles in the room. When in a self-directing mode, the vacuum selects a path of travel based upon a detected wall of the room as a reference, and steers itself to avoid obstacles in its path. An electric cord is automatically payed-out and retracted as the vacuum travels. A constant tension is imposed on the cord as it is payed-out or retracted by an appropriate manipulation of a spiral spring connected to the cord.