This paper introduces a task planner for a model-based remote maintenance robot system: TAROS (Toshiba Advanced Robot System) which we are developing now. TAROS's task planner has a task knowledge database describing procedures to perform desired tasks and an environment knowledge database describing geometrical characteristics and arrangement data of objects to be handled. These data are represented by frames. When the operator inputs a task command, the task planner generates robot control programs automatically by referring to the databases. In our task planner, even though the object's position or orientation data in the environment knowledge database include errors, suitable motions are selected from the task knowledge database according to the amount of errors, and executed. So, we can perform a desired task easily without making a detailed robot control program which the object's position and orientation errors are taken into consideration. We verified that the fastening and loosening operations of a nut and a flange bolt were performed autonomously by using the task planner of TAROS.