To simply correct the positional data in the teaching program for the
robot at a stable precision. The working tool (such as a spot welding gun
13 or others) is mounted to an arm of the robot 10 and imaging means 14
is detachably attached to the arm by a magnet 17 or others so that the
optical axis coincides with the working direction (the opening/closing
direction of the gun 13). When the positional data correcting program
starts, the points P1 to P3 on the jig 1 or the workpiece 2 are imaged at
a plurality of image positions D1, D2 and D3, and the position of the
respective point is detected. Based on the detected result, the
correction is made on the positional data in the teaching program,
corresponding to the deviation (in comparison with the off-line data or
positional data prior to the transfer of the system) of position and
posture of the jig 1 (or the workpiece 2). The tool may be a laser beam
machining nozzle, an arc welding torch or a sealing gun.