Patent Publication Number: US-5523663-A

Title: Method for controlling a manipulator relative to a moving workpiece

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to a method of controlling the position and attitude of an end effector of a manipulator that has revolute joints. 
     2. Description of the Related Art 
     Various types of industrial robots have been developed to improve productivity and assure safety in factories. One type of prior art mobile robot includes an articulated manipulator. The articulated manipulator has an end effector at one end and is mounted on an autonomous carriage. The mobile robot handles an object or workpiece with the manipulator by controlling the travel of the carriage and the position and attitude of the manipulator. 
     The mobile robot described above includes a CCD camera or equivalent attached to the end effector to capture an image of the workpiece. The position and attitude of the end effector of the manipulator are controlled based on image data obtained by the camera. 
     The mobile robot performs the necessary control function in the following manner. The position and attitude of the workpiece is first derived from image data captured by the camera. Next, the robot calculates a target angle of each revolute joint of the manipulator necessary to shift the position and attitude of the end effector to grasp the workpiece. Then, the robot proportionally controls the angle of each revolute joint to agree with the target angles and the end effector grasps the workpiece. 
     The control method described above assumes that the workpiece remains stationary. The prior art mobile robot cannot adjust the target angles of the revolute joints responsive to the relative movement of the workpiece and the carriage to which the robot is mounted. 
     SUMMARY OF THE INVENTION 
     The invention provides a method of controlling the position and attitude of an end effector of a manipulator responsive to the relative movement of a workpiece to be grasped. 
     The above and further objects and features of the invention will be more fully apparent from the following detailed description with accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a perspective view of a mobile robot that employs the end effector control method of the invention; 
     FIG. 2 is a diagram depicting the static forces on a manipulator of the mobile robot; 
     FIG. 3 is a diagram depicting the external forces acting on an end effector of the manipulator in the x-y plane; 
     FIG. 4 is a diagram depicting a camera-centered coordinate system; 
     FIG. 5 is a diagram depicting the camera-centered system when the coordinate axes of a hand-centered coordinate system coincide with those of the camera-centered coordinate system; and 
     FIG. 6 is a block diagram of a control system in accordance with the invention for controlling the position and attitude of the end effector. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     A preferred embodiment of the invention will now be discussed with reference to the accompanying drawings. FIG. 1 is a perspective view of a mobile robot that employs the end effector control method of the invention. 
     The mobile robot includes a carriage 1 which is autonomous and includes a box-like body 10 supported by right and left driving wheels (only the right driving wheel 11 is depicted in the drawing) and by four casters (only three casters, 12A, 12B, and 12C are shown in the drawing). The driving wheels are independently driven by separate motors (not shown). An articulated manipulator 2 is mounted to body 10. The manipulator 10 has an end effector 20 and a plurality of rotary revolute joints (two revolute joints 21A and 21B are shown). A CCD camera 3 is provided for capturing an image of the end effector 20 and the vicinity thereof from above. 
     Each driving wheel is provided with a rotation speed detector with an incorporated pulse encoder (not shown) which generates pulses in accordance with the rotation of the wheel. An angle detector is provided for each of the revolute joints of the manipulator 2. In FIG. 1, Σ S  represents an absolute coordinate system set at an arbitrary point independent of the carriage 1 and the manipulator 2 (e.g., an arbitrary point on the floor), Σ H  indicates a hand-centered coordinate system set at the end effector 20 of the manipulator 2, Σ V  is a moving coordinate system set at the carriage 1 and Σ W  is a workpiece-centered coordinate system set at an object or workpiece 4. It is to be noted here that the description below assumes that the manipulator 2 has six degrees of freedom and six revolute joints, although only two revolute joints 21A and 21B are shown. 
     The relationship between the incremental rotations of the revolute joints of the manipulator 2, and the incremental translation and rotation of the end effector 20 relative to the moving coordinate system Σ V  will now be discussed. 
     Assume that the revolute joints of the manipulator 2 are incrementally rotated, thus incrementally translating and rotating end effector 20 of the manipulator 2. The matrix showing the angle of the incremental rotation of each revolute joint of the manipulator 2 is represented by the expression (1). The incremental translation of the end effector 20 is represented by the expression (2) as an incremental translation vector seen from the moving coordinate system Σ V , while the incremental rotation of the end effector 20 is represented by the expression (3) as an incremental rotation vector seen from the moving coordinate system Σ V . 
     
         dq=[dq.sub.1, dq.sub.2, dq.sub.3, dq.sub.4, dq.sub.5, dq.sub.8].sup.T (1) 
    
     where dq: angle of incremental rotation 
     dq 1  ˜dq 6  : rotation angles of 1st through 6th revolute joints 
     
         .sup.v dr.sub.HP ═[.sup.v dr.sub.x, .sup.v dr.sub.y, .sup.v dr.sub.z ].sup.T                                                   (2) 
    
     where  v  dr HP  : incremental translation vector 
       v  dr x  : x-axis component of incremental translation vector 
       v  dr y  : y-axis component of incremental translation vector 
       v  dr z  : z-axis component of incremental translation vector 
     
         .sup.v dr.sub.HO ═[.sup.v d.sub.92, .sup.v d.sub.θ, .sup.v d.sub.φ ].sup.T                                       (3) 
    
     where  v  dr HO  : incremental rotation vector 
       v  d.sub.ρ : x-axis component of incremental rotation vector 
       v  d.sub.θ : y-axis component of incremental rotation vector 
       v  d.sub.φ : z-axis component of incremental rotation vector 
     The relationship between the matrix q=[q 1 , q 2 , q 3 , q 4 , q 5 , q 6  ] T  representing the angles of each of the revolute joints of the manipulator 2, and the position and attitude of the end effector 20 seen from the moving coordinate system Σ v  is indicated by equation (4); 
     
         .sup.v r.sub.H =F (q)                                      (4) 
    
     where  v  r H  : vector of position and attitude of end effector from moving coordinate system 
     F: function determined by link mechanism 
     When both sides of equation (4) are differentiated, the relationship between the time differentiated value of the position and attitude of the end effector 20 and the time differentiated value of the revolute joint angles is represented by the equation (5); 
     
         .sup.V r.sub.H =.sup.v J(q)q                               5) 
    
     where  V  r H  : time differentiated value of  V  r H . 
       V  J (q): Jacobian matrix 
     q: time differentiated value of a q 
     The equation (5) may be changed into form (6) by applying expressions (1) and (3); ##EQU1## 
     The static forces on the manipulator 2 will now be discussed in reference to FIG. 2. FIG. 2 shows external force P acting downward on the end effector 20 and the external moment M acting around the end effector 20. In FIG. 2, manipulator 2 is represented by a simplified shape. 
     The external force P and the external moment M acting on the manipulator 2 as indicated in FIG. 2 are expressed by matrix (7) and matrix (8), respectively; ##EQU2## where P: external force 
     P x  : x-axis component of external force 
     P y  : y-axis component of external force 
     P z  : z-axis component of external force ##EQU3## where M: moment of external force 
     M x  : x-axis component of moment of external force 
     M y  : y-axis component of moment of external force 
     M z  : z-axis component of moment of external force 
     The relationship between the matrix τ=[τ 1 , τ 2 , τ 3 , τ 4 , τ 5 , τ 6  ] T  indicating the torque generated at each revolute joint of the manipulator 2 and the matrix q=[q 1 , q 2 , q 3 , q 4 , q 5 , q 6  ] T  representing the angle of each of the revolute joints of the manipulator 2 will now be obtained by employing the principle of virtual work. 
     The work W 1  applied to the manipulator 2 by the external force P and the external moment M is represented by expression (10) when the vector showing the displacement of the position and attitude of the end effector 20 (relative to the moving coordinate system) due to the external force P and the external moment M satisfies equation (9); 
     
         .sup.V dr.sub.H =[.sup.V dr.sub.HF.sup.T, .sup.v dr.sub.HO.sup.T].sup.T(9) 
    
     where  V  dr H  : vector of displacement of position and attitude end effector ##EQU4## where the superscripted T indicates a transposed matrix. 
     Furthermore, if the revolute joints are rotated by an angle dq due to the external force and the torque, the work W 2  within the manipulator 2 is represented by expression (11); 
     
         W.sub.2 =dq.sup.T τ                                    (11) 
    
     In accordance with static theory, since the work W 1  expressed by expression (10) is equal to the work W 2  shown by expression (11), equation (12) will hold; ##EQU5## 
     The equation (12) can be transformed into equation (13) by applying equation (6); ##EQU6## 
     The torque generated at each revolute joint when the external force P and the external moment M operate on the end effector 20 is represented by expression (14), obtained 30 through algebraic manipulation of equation (13). ##EQU7## 
     The operation of external force P xy  within the horizontal plane (hereinafter referred to as the x-y plane) will now be described. FIG. 3 is a diagram depicting the action of the external force P xy  in the x-y plane, showing external force P xy  resolved into components, an external force P x  in the x-axis direction and an external force P y  in the y-axis direction, when pulling the end effector 20 in a predetermined direction. 
     Assuming that the external forces P x  and P y  can be modelled as resulting from the extension of a spring, the external force P xy  can be represented as expression (15); ##EQU8## where δ x  is the extension of the spring in the x-axis direction, δ y  is the extension of the spring in the y-axis direction and k is a spring constant. 
     The matrix τ showing the torque obtained by substituting the external force P xy  in expression (14) indicates the torque needed at each revolute joint 21 of the manipulator 2 to generate the external force P xy  on the whole. 
     The method of controlling the position of the end effector 20 of the manipulator 2 by use of the camera 3 will now be explained. FIG. 4 is a diagram depicting camera-centered coordinate system Σ C . The origin of the camera-centered coordinate system Σ C  is the center of a region imaged by camera 3. The x and y axes of the camera-centered coordinate system determine an imaging plane of camera 3. Assuming that the camera-centered coordinate system Σ C  is overlayed on a monitor screen 5 for displaying an image captured by the camera 3. In the camera-centered coordinate system Σ C , the position of the work-centered coordinate system Σ W  (workpiece 4) seen from the camera-centered coordinate system Σ C  is indicated by a transposed matrix (δ x , δ y ) T . 
     FIG. 5 is a diagram depicting the camera-centered coordinate system when the coordinate axes of the hand-centered coordinate system coincide with those of the camera-centered coordinate system. If the camera 3 is positioned so as to make the coordinate axes of the camera-centered coordinate system Σ C  agree with those of the hand coordinate system Σ H , the positional displacement of the workpiece 4 from the end effector 20 indicates a position (δ x , δ y ) T  of the workpiece-centered coordinate system Σ W  relative to the camera-centered coordinate system Σ C . The external force P xy  of expression (15) acts in a direction indicated in FIG. 5. The matrix τ of expression (14) is the torque required at each revolute joint of the manipulator 2 to bring the end effector 20 closer to the workpiece 4 by applying force equivalent to the external force P xy . 
     If the camera 3 is able to measure not only δ x  and δ y , but also the arbitrary deviation of the position and attitude from the target position and attitude, the position and attitude of the end effector 20 can be corrected to the target position and attitude by employing the above-described principles. When a vector representing the deviation of the position and attitude of the end effector 20 seen from the camera-centered coordinate system Σ C , as derived from image data obtained from the camera 3, is represented by expression (16), the matrix δ of the torque to be generated at each revolute joint of the manipulator 2 is given by equation (17) which incorporates expression (14); ##EQU9## where δX: vector of deviation of position and attitude obtained from picture by camera 
     
         τ=K .sup.V J(q).sup.T δX                         (17) 
    
     where K: diagonal matrix to determine a spring constant in direction of each deviation 
     The control law of the manipulator 2 will now be discussed. All the revolute joints of the manipulator 2 are driven via a servo system including servo motors described earlier. A vector V indicative of the supply voltage to the servo system driving the revolute joints is calculated with equation (18) which incorporates equation (17) (to eliminate the deviation of the position and attitude of the end effector 20 determined from the image data obtained by the camera 3) with the fundamental control law of the servo system; 
     
         V=K.sub.1 (q.sub.d.sup.i -q.sup.i)+K.sub.2 .sup.v J(q.sup.i).sup.T δX.sup.i                                            (18) 
    
     where K 1 , K 2  : control gain 
     δX i  : vector of position and attitude of end effector from camera coordinate system 
     In equation (18), the first term on the right side shows the positional feedback for each revolute joint as derived from an instructed target value of the revolute joint angle. This first term is obtained by multiplying the deviation between the target revolute joint angle vector and the actually measured revolute joint angle vector by a predetermined control gain. The second term on the right side of equation (18) indicates the compensation of the revolute joints derived from the image data captured by the camera 3, which is obtained by multiplying the above-described Jacobian matrix by the vector of the position and attitude deviation of the end effector 20 relative to the camera-centered coordinate system Σ C  and by a predetermined control gain. In other words, the equation (18) is a control law which simultaneously implements positional feedback in accordance with the first term on the right side and position and attitude compensation in accordance with the second term on the right side. 
     However, the position and attitude of the end effector 20 resulting from control in accordance with the first term on the right side of the equation (18) includes an error resulting from an error in the position and attitude of the mobile robot. This error in the position and attitude of the end effector 20 is represented by the vector of the position and attitude deviation of the end effector 20, that is, the second term on the right side of the expression (18). However, performing positional feedback in accordance with both the first term on the right side of the expression (18) and the second term on the right side simultaneously results in disharmony, which as explained below is not easily avoided. 
     To avoid the above disharmony between the first term and the second term of the right side of equation (18), it would be possible to omit the first term on the right side causing the position and attitude error. In this case, however, all components of the vector δ x   i  in the second term on the right side must be accurately obtained, that is, accurate three-dimensional visual recognition is necessary. 
     However, such three-dimensional visual recognition is not practically feasible. Instead, the invention takes advantage of the fact that feedback of the position and attitude deviation components relative to all the axes of the workpiece-centered coordinate system Σ W  is unnecessary in some cases. For the end effector of the invention, the positional deviation along the z-axis and the attitude deviation about the x-axis and y-axis in the vector δ x   i  are supposed to be zero, since it is assumed that the mobile robot moves only within the x-y plane of the work coordinate system Σ W , the roughness of the running surface of the carriage 1 and the deflection of the link and reduction gear are negligible, and that the gravity influences are already compensated. Therefore, the camera 3 is restricted to capture an image in the vertical downward direction at all times, thus making it possible to correctly measure the positional deviation along the x-axis and y-axis and the attitude deviation about the z-axis from the two-dimensional image obtained by the camera 3. 
     Thus, the positional deviation along the x-axis and y-axis and the attitude deviation about the z-axis should be controlled (in accordance with the second term on the right side of the equation (18)) through camera feedback (feedback of data from the camera 3) and the other deviations should be controlled (in accordance with the first term on the right side of the equation (18)) through feedback of the position and attitude. 
     The following disharmony presents itself, however. When the control gain K 1  ≠0 while the control gain K 2  =0 in the equation (18), the equation (18) represents the control system itself through the position and attitude feedback, therefore the end effector 20 is controlled to stop at the origin of the hand-centered coordinate system Σ H  in FIG. 5. On the other hand, when the control gain K1=0 while the control gain K2≠0, the end effector 20 is controlled to move to the origin of the workpiece-centered coordinate system Σ W . Therefore, when both the control gains K1, K2 assume nonzero values, the end effector 20 is controlled to stop between the origin of the hand-centered coordinate system Σ H  and the origin of the workpiece-centered coordinate system Σ W , but not at the origin of the workpiece-centered coordinate system Σ W . 
     Since a control law which simply omits the first term on the right side of equation (18) does not properly position the end effector 20, this invention shares the control between the first and second terms on the right side. The target revolute joint angle in the first term on the right side of the expression (18) is derived from a vector  W  r Hd   i  indicating the target position and attitude of the end effector 20 relative to the workpiece-centered coordinate system Σ W . More specifically, the target position and attitude is obtained through calculating the vector  W  r H   i  showing the position and attitude that the end effector 20 should assume while considering the position and attitude of the carriage 1 of the mobile robot, then transforming the expression (4) inversely. 
     Therefore, in accordance with the first term on the right side of the equation (18), the position in the z-axis direction of the workpiece-centered coordinate system Σ W  and the attitude of the end effector 20 are controlled but the positions in the x-axis and y-axis directions of the workpiece-centered coordinate system Σ W  are not controlled. That is, control by the first term on the right side has no effect on the target values of the positions in the x-axis and y-axis directions. In other words, the control is shared by controlling the position along the z-axis direction of the workpiece-centered coordinate system Σ W  and the attitude of the end effector 20 in accordance with the first term on the right side, while controlling the positions in the x-axis and y-axis directions of the workpiece-centered coordinate system Σ W  in accordance with the second term on the right side, thus eliminating the disharmony. 
     How the invention actually shares control between the first and second terms on the right side will now be discussed. The homogeneous transformation matrix showing the position and attitude of the end effector 20 in the workpiece-centered coordinate system Σ W  at the time it can be obtained in a prescribed manner, with respect to the matrix q i  indicating the angle of each revolute joint 21 of the manipulator 2 at a time it and the homogeneous transformation matrix of the position and direction of the carriage 1 in the absolute coordinate system Σ S  at the time iτ. With respect to this result the vector  W  r H   i  indicating the target position and attitude of the end effector 20 in the workpiece-centered coordinate system Σ W  at the time it is obtained in a prescribed manner. 
     If a condition that the vector  W  r H   i  is equal to the vector  W  r Hd   i  is met the matrix q i  becomes equal to the matrix q d   i  and the first term on the right side of the equation (18) has no value, which is equivalent to omitting the first term on the right side. Accordingly, the desired control sharing is realized if  W  r x   i  and  W  r y   i  which are the x-axis and y-axis components of the vector  W  r H   i  are substituted for  W  r xd   i ,  W  r yd   i  which are the x-axis and y-axis components of the vector  W  r Hd   i  so as to make the former components equal to the latter components at all times. 
     A vector p W  r Hd   i  indicating a target position and attitude of the end effector 20 relative to the workpiece-centered coordinate system Σ W  adjusted for the desired control sharing between the first and second terms on the right side of the equation (18) is obtained with equation (19): ##EQU10## 
     The first matrix in the second term on the right side of equation (19) is referred to as a switching matrix S. Control is not performed for directions where 1 is held in the appropriate position of the switching matrix. For example, the switching matrix S for obtaining the vector p W  r Hd   i  in equation (19) where the attitude of the end effector is not controlled will be represented by the following expression (20): ##EQU11## 
     When equation (19) is expressed in terms of the switching matrix S, equation (21) results: 
     
         p.sup.W r.sub.Hd.sup.i =(E-S).sup.W r.sub.Hd.sup.i +S.sup.W r.sub.H.sup.i ( 21) 
    
     where E: unit matrix 
     The vector V indicating the supply voltage to the servo system for driving the revolute joints of the manipulator 2 is obtained from equation (22). In equation (22), the target revolute joint angle of the manipulator 2 obtained on the basis of the vector p W  r Hd   i  is represented by a matrix  p  q d   i . Control for directions not controlled by the first term on the right side of the expression (18) is accomplished by the second term on the right side: 
     
         V=K.sub.1 (.sub.p q.sub.d.sup.i -q.sup.i)+K.sub.2 .sup.V J(q.sup.i).sup.T Sδx.sup.1                                           (22) 
    
     In the first term on the right side of equation (22), the deviation between the adjusted target revolute joint angle indicated by the matrix  p  q d   i  obtained as above and the actually measured revolute joint angle is multiplied by a predetermined control gain, wherein only the position in the z-axis direction of the workpiece-centered coordinate system Σ W  and the attitude of the end effector are controlled. In the second term on the right side, the Jacobian matrix is multiplied by the vector indicating the position and attitude deviation of the end effector 20 seen from the camera-centered coordinate system Σ C , by the switching matrix S for controlling only the positions in the x-axis and y-axis directions of the workpiece-centered coordinate system Σ W , and by a predetermined control gain, wherein the positions of the end effector 20 are controlled only in the x-axis and y-axis directions of the workpiece-centered coordinate system Σ W . In other words, equation (22) is the control law that harmonizes the control of position in the z-axis direction of the workpiece-centered coordinate system Σ W  and the attitude in accordance with the first term on the right side and the control of the positions in the x-axis and y-axis directions of the workpiece-centered coordinate system Σ W  in accordance with the second term on the right side. 
     The structure of the system for controlling the position and attitude of the manipulator 2 in accordance with the invention will now be discussed. FIG. 6 is a block diagram of this control system. 
     In FIG. 6, a position and attitude target value set means 61 sets a target value of the position and attitude of the end effector 20 in the workpiece-centered coordinate system Σ W , and supplies the set data to a position and attitude target value decision means 64. 
     A carriage position and attitude calculation means 62 calculates the current position and attitude of the carriage 1 based on the running state of the carriage 1, and supplies the calculated data to a hand position and attitude calculation means 63 and a revolute joint actuation data calculation means 65. The hand position and attitude calculation means 63 calculates the current position and attitude of the end effector 20 on the basis of the detected current revolute joint angles of the manipulator 2 and the detected position and attitude of the carriage 1 supplied by the carriage position and attitude calculation means 62. The hand position and attitude calculation means 63 supplies the current position and attitude to the position and attitude target value decision means 64. 
     The position and attitude target value decision means 64 applies equation (21) to derive the adjusted target value used to control the position and attitude of the end effector 20 from the target position and attitude data set by the position and attitude target value set means 61 and the current position and attitude data calculated by the hand position and attitude calculation means 63. The position and attitude target value decision means 64 supplies the decided adjusted target value to the revolute joint actuation data calculation means 65. 
     The revolute joint actuation data calculation means 65 applies equation (4) to calculate the target angle of each revolute joint of the manipulator necessary to match the position and attitude of the end effector 20 to the target value supplied by the position and attitude target value decision means 64, taking into account the position and attitude data of the carriage 1 supplied by the carriage position and attitude calculation means 62. The target joint angle data is supplied to a servo system supply voltage calculation means 67. 
     The image data captured by the camera 3 is supplied to an image process means 66 which processes the image data captured by the camera 3 to obtain the deviation of the position and attitude of the end effector 20 relative to the camera-centered coordinate system Σ C , and supplies the deviation data to the servo system supply voltage calculation means 67. 
     In addition to the above-described data, the measured angle of each revolute joint of the manipulator is supplied to the servo system supply voltage calculation means. The servo system supply voltage calculation means 67 calculates the supply voltage to the servo system from the actually measured angle of each revolute joint, the target revolute joint angle data from the revolute joint actuation data calculation means 65 and the deviation data for the position and attitude of the end effector 20 obtained from the image process means 66. The calculated data is supplied to the servo system of the manipulator 2. 
     The manipulator 2 is operated by the control system described above with the supply voltages being calculated by the servo system supply voltage calculation means 67. 
     In the control method of this invention, the angle of each revolute joint of the manipulator 2 is controlled by harmonizing two methods, a first method which relies on the image data captured by the camera 3 and a second method which relies on the target values of the angle of each revolute joint 21 of the manipulator 2. The image data showing the real-time horizontal position and attitude of the end effector is included in the control of the revolute joint angle, thereby effectively controlling the position and attitude of the manipulator 2 in relation to the relatively moving workpiece 4. 
     As this invention may be embodied in several forms without departing from the spirit of essential characteristics thereof, the present embodiment is therefore illustrative and not restrictive, since the scope of the invention is defined by the appended claims rather than by the description preceding them, and all changes that fall within the metes and bounds of the claims, or equivalence of such metes and bounds thereof are therefore intended to be embraced by the claims.