Abstract We present a localization method for robots equipped with only a compass, a contact sensor and a map of the environment. In this framework, a localization strategy can be described as a sequence of directions in which the robot moves maximally. We show that a localizing sequence exists for any simply connected polygonal environment by presenting an algorithm for computing such a sequence. We have implemented the algorithm and we present several computed examples. We also show that the sensing model is minimal by showing that replacement of the compass by an angular odometer precludes the possibility of performing localization.