We consider the problem of planning sensor control strategies that enable a sensor to be automatically configured for robot tasks. In this paper we present robust and efficient algorithms for computing the regions from which a sensor has unobstructed or partially obstructed views of a target in a goal. We apply these algorithms to the Error Detection and Recovery problem of recognizing whether a goal or failure region has been achieved. Based on these methods and strategies for visually cued camera control, we have built a robot surveillance system in which one mobile robot navigates to a viewing position from which it has an unobstructed view of a goal region, and then uses visual recognition to detect when a specific target has entered the region.1. Introduction. This paper investigates several problems in the area of visibilitybased planning of sensor control strategies. We present combinatorially precise algorithms for computing partial and complete visibility maps that can be used to automatically configure sensors for robot tasks. A sensor control strategy consists of motions to move the sensor to an observation point, plus control parameters to the camera controller. The strategies have both visually cued and task-based components.A primary motivation for this work is in the domain of cooperating robots. Suppose robot A is performing a task, and robot B is equipped with sensors and should "watch" robot A. Then our algorithms can be used, for example, to compute the regions that B should not enter, if A is to remain visible. Less generally, A and B could be part of the same robot, for example, a physically distributed but globally controlled system.Multimedia applications that involve controlling cameras to observe people could also employ our camera control strategies.The Error Detection and Recovery Framework [12] provides a natural problem domain in which to apply our strategies. An Error Detection and Recovery (EDR) strategy is one that is guaranteed to achieve a specified goal when the goal is recognizably achievable,