An apparatus for controlling an industrial robot system comprising a workpiece handling apparatus having first revolute joint means for moving a workpiece, and a tool moving apparatus having second revolute joint means for moving a tool, so as to coordinately move said tool on a first trajectory located between adjacent first and second points and said workpiece on a second trajectory located between adjacent third and fourth points, said first, second, third, and fourth points being predetermined as teaching points, the apparatus comprising:
- (a) first memory means for storing at least four sets of teaching data at said first, second, third, and fourth points, each set of teaching data including
- (1) a tool position defined as a position and an attitude of said tool based on a workpiece reference point predetermined in said workpiece,
- (2) a workpiece position defined as a position and an attitude of said workpiece based on a predetermined reference coordinate system, and
- (3) a tool speed defined as a translational speed of a tool reference point predetermined in said tool based on said workpiece reference point upon a translational movement of said tool on said first trajectory;
- (b) first interpolation means, operatively connected with said first memory means, in response to said tool positions and said tool speeds at said first and second points which are stored in said first memory means, for calculating a time required for said translational movement of said tool position from said first point to said second point, and a plurality of pairs of positions and attitudes of said tool based on said workpiece reference point, at a plurality of first interpolation points obtained by dividing said first trajectory by a predetermined number of interpolation intervals, using a predetermined interpolation method;
- (c) second interpolation means, operatively connected with said first memory means and said first interpolation means, in response to said workpiece positions at said third and fourth points which are stored in said first memory means and said required time calculated by said first interpolation means, for calculating a plurality of pairs of positions and attitude of said workpiece based on said predetermined reference coordinate system, at a plurality of second interpolation points obtained by dividing said second trajectory by said predetermined number of interpolation intervals, using another predetermined interpolation method;
- (d) first calculation means, operatively connected with said second interpolation means, in response to said plurality of pairs of positions and attitudes of said workpiece based on said reference coordinate system at said plurality of second interpolation points which are calculated by said second interpolation means, for calculating a position and an attitude of a predetermined coordinate system of a predetermined workpiece attachment reference point based on a coordinate system of a baseplane of said workpiece handling apparatus, said calculated position and attitude of said coordinate system corresponding to each of said second interpolation points;
- (e) second calculation means, operatively connected with said first and second interpolation means, in response to said plurality of positions and attitudes of said workpiece based on said reference coordinate system at said plurality of second interpolation points which are calculated by said second interpolation means, and said plurality of positions and attitudes of said tool based on said workpiece reference point which are calculated by said first interpolation means, for calculating a position and an attitude of a predetermined coordinate system of a predetermined tool attachment reference point based on a coordinate system of a baseplane of said tool moving apparatus, said calculated position and attitude of a predetermined coordinate system corresponding to each of said first interpolation points;
- (f) third calculation means, operatively connected with by said first calculation means, in response to the position and attitude of said coordinate system of said workpiece attachment reference point which are calculated by said first calculation means, for calculating joint variables of said first revolute joint means for moving said workpiece on said second trajectory;
- (g) fourth calculation means, operatively connected with said second calculation means, in response to the position and attitude of said coordinate system of said tool attachment reference point which are calculated by said second calculation means, for calculating joint variables of said second revolute joint means for moving said tool on said first trajectory;
- and
- (h) driving means, operatively connected with said first and second revolute joint means and said third and fourth calculation means, in response to said joint variables of said first revolute joint means calculated by said third calculation means and said joint variables of said second revolute joint means calculated by said fourth calculation means, for simultaneously driving said first revolute joint means of said workpiece handling apparatus and said second revolute joint means of said tool moving apparatus, to coordinately move said tool on said first trajectory and said workpiece on said second trajectory.