Center-of-gravity-of-load position calculator for robot and method thereof

10800035 ยท 2020-10-13

Assignee

Inventors

Cpc classification

International classification

Abstract

A center-of-gravity-of-load position calculator is provided which determines the position of the center of gravity of a physical load held by a horizontal four-axis robot arm. The center-of-gravity-of-load position calculator moves horizontally move the physical load a plurality of times in conditions where positions of a fourth axis are different from each other and measures degrees of torque acting on the fourth axis during such movement to calculate given first and second parameters. The center-of-gravity-of-load position calculator calculates the position of the center of gravity of the physical load as a function of the first and second parameters. This achieves fast and easy calculation of the position of the center of gravity of the physical load.

Claims

1. An apparatus for calculating center-of-gravity-of-load position for a horizontal four-axis robot arm which is equipped with a first, a second, a third, and a fourth axis, comprising: a controller programmed to: instruct the robot arm, which is holding a physical load of a known mass on an end thereof, to actuate at least one of the first axis and the second axis to move the robot arm from a first initial position to a first calculation position; determine a first velocity of the one of the first axis and the second axis in a first constant-velocity range where the velocity of the one of the first and second axes is constant in a first action period of time between when the robot arm is at the first initial position and when the robot arm reaches the first calculation position; determine a first static torque and a first constant-velocity torque, the first static torque being torque exerted on the fourth axis to hold the fourth axis from being rotated, so that the fourth axis is kept at an angular position thereof before the one of the first and second axes is actuated in the first action period of time, the first constant-velocity torque being torque required for the fourth axis to cancel torque which results from rotation of one of the first and second axes so as to keep the fourth axis stationary while the one of the first and second axes is being actuated in the first action period of time; calculate a first parameter according to an equation below which is derived using the first velocity and the first static torque,
T.sub.1=l.sub.h sin(.sub.4+.sub.h) where T.sub.1 is the first parameter, l.sub.h is a center-of-gravity distance between the fourth axis and the physical load, .sub.4 is a position of the fourth axis, and .sub.h is an angular position of the physical load based on the position .sub.4; instruct the robot arm to actuate at least one of the first axis and the second axis to move the robot arm from a second initial position to a second calculation position, the second initial position being a position of the robot arm where the position of the fourth axis is changed to a position .sub.4 from that of the fourth axis when the robot arm is at the first initial position, the second calculation position being a position of the robot arm where positions of the first, the second, and the third axis are identical with those thereof when the robot arm is at the first calculation position; determine a second velocity of the one of the first axis and the second axis in a second constant-velocity range where the velocity of the one of the first and second axes is constant in a second action period of time between when the robot arm is at the second initial position and when the robot arm reaches the second calculation position; determine a second static torque and a second constant-velocity torque of the fourth axis in the second action period of time; calculate a second parameter according to an equation below which is derived using the second velocity and the second static torque,
T.sub.2=l.sub.h sin(.sub.4+.sub.h) where T.sub.2 is the second parameter, and .sub.4 is the position of the fourth axis when the robot arm is at the second initial position; and calculate a position of the center of gravity of the physical load using the first and second parameters.

2. The apparatus as set forth in claim 1, wherein controller is programmed to instruct the robot arm to actuate both the first and second axes.

3. The apparatus as set forth in claim 1, wherein the controller is programed to set one of the positions .sub.4 and .sub.4 to 0 and other to 90.

4. The apparatus as set forth in claim 1, wherein the controller is programed to instruct the robot arm to keep the third axis at an upper limit thereof in the first action period of time or the second action period of time.

5. A center-of-gravity-of-load position calculating method for a horizontal four-axis robot arm which is equipped with a first, a second, a third, and a fourth axis, comprising: a first step of actuating at least one of the first axis and the second axis of the robot arm which is holding a physical load on an end thereof to move the robot arm from a first initial position to a first calculation position, the physical load having a known mass; a second step of determining a velocity of the one of the first axis and the second axis in a constant-velocity range where the velocity of the one of the first and second axes is constant in a first action period of time between when the robot arm is at the first initial position and when the robot arm reaches the first calculation position; a third step of determining a static torque and a constant-velocity torque, the static torque being torque exerted on the fourth axis to hold the fourth axis from being rotated, so that the fourth axis is kept at an angular position thereof before the one of the first and second axes is actuated in the first action period of time, the constant-velocity torque being torque required for the fourth axis to cancel torque which results from rotation of one of the first and second axes so as to keep the fourth axis stationary while the one of the first and second axes is being actuated in the first action period of time; a fourth step of calculating a first parameter using the velocity and the static torque according to an equation below
T.sub.1=l.sub.h sin(.sub.4+.sub.h) where T.sub.1 is the first parameter, l.sub.h is a center-of-gravity distance between the fourth axis and the physical load, .sub.4 is a position of the fourth axis, and .sub.h is an angular position of the physical load based on the position .sub.4; a fifth step of actuating at least one of the first axis and the second axis of the robot arm to move the robot arm from a second initial position to a second calculation position, a second initial position being a position of the robot arm where the position of the fourth axis is changed to a position .sub.4 from that of the fourth axis when the robot arm is at the first initial position, the second calculation position being a position of the robot arm where positions of the first, the second, and the third axis are identical with those thereof when the robot arm is at the first calculation position; a sixth step of determining a velocity of the one of the first axis and the second axis in a constant-velocity range where the velocity of the one of the first and second axes is constant in a second action period of time between when the robot arm is at the second initial position and when the robot arm reaches the second calculation position; a seventh step of determining the static torque and the constant-velocity torque of the fourth axis in the second action period of time; an eighth step of calculating a second parameter using the velocity and the static torque, as determined in the seventh step, according to an equation below
T.sub.2=l.sub.h sin(.sub.4+.sub.h) where T.sub.2 is the second parameter, and .sub.4 is the position of the fourth axis when the robot arm is at the second initial position; and a ninth step of calculating a position of the center of gravity of the physical load using the first and second parameters.

6. A center-of-gravity-of-load position calculating method as set forth in claim 5, wherein each of the first and fifth steps actuates the first and second axes.

7. A center-of-gravity-of-load position calculating method as set forth in claim 5, wherein each of the fourth and eighth steps sets one of the positions .sub.4 and .sub.4 to 0 and other to 90.

8. A center-of-gravity-of-load position calculator as set forth in claim 5, wherein each of the first and the fifth steps keeps the third axis at an upper limit thereof in the first action period of time or the second action period of time.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The present invention will be understood more fully from the detailed description given hereinbelow and from the accompanying drawings of the preferred embodiments of the invention, which, however, should not be taken to limit the invention to the specific embodiments but are for the purpose of explanation and understanding only.

(2) In the drawings:

(3) FIGS. 1(a) and 1(b) are a flowchart of a sequence of logical steps executed to calculate the position of the center of gravity of a physical load according to an embodiment;

(4) FIG. 2 is a view which illustrates a four-axis arm model when moved from a first initial position to a first calculation position;

(5) FIG. 3 is a view which shows waveforms of velocity of a first axis and a second axis;

(6) FIG. 4 is a view which shows a torque waveform of a fourth axis;

(7) FIG. 5 is a view which explains adverse effects of static friction on a value of torque on a fourth axis;

(8) FIG. 6 is a view which represents an example of torque on a fourth axis which includes an error resulting from adverse effects of a static friction;

(9) FIG. 7 is a view which represents an example of torque on a fourth axis from which an error resulting from adverse effects of a static friction is removed;

(10) FIG. 8 is a view which shows a four-axis arm model when moved from a second initial position to a second calculation position;

(11) FIG. 9 is a perspective view which illustrates an industrial robot system according to an embodiment;

(12) FIG. 10 is a view which shows a four-axis arm mode; and

(13) FIG. 11 is a view which represents motor torque .sub.M4 for a fourth axis of a robot arm in a constant-velocity range.

DESCRIPTION OF THE PREFERRED EMBODIMENT

(14) An embodiment will be described below with reference to the drawings. FIG. 9 illustrates a system structure of a typical industrial robot. Specifically, the robot system 1 includes the robot 2, the controller 3 for controlling an operation of the robot 2, and the teaching pendant 4 connected to the controller 3. The controller 3 works as a control unit and a center-of-gravity-of-load position calculator. The robot 2 is designed as, for example, a four-axis horizontal articulated robot. The robot 2 includes the base 5 secured to a mounting surface, the first arm 6, the second arm 7, and the shaft 8. The first arm 6 is joined to the base 5 to be rotatable around the first axis J1. The first axis J1 is a vertical axis whose longitudinal center line is aligned in a Z-axis direction in a Cartesian coordinate system, as defined below. The second arm 7 is joined to the top end of the first arm 6 to be rotatable around the second axis J2 whose longitudinal center line is aligned in the Z-axis direction. The shaft 8 is installed in a top end of the second arm 7 to be vertically movable and rotatable about its longitudinal axis. Specifically, the shaft 8 is vertically moved along the third axis J3 and rotatable around the fourth axis J4. The shaft 8 has the flange 9 which is positioned and detachably attached to a lower end of the shaft 8.

(15) The base 5, the first arm 6, the second arm 7, the shaft 8, and the flange 9 function as an arm of the robot 2. The flange 9 that is a tip of the arm has a tool, for example, the air chuck 10 attached thereto. In the example of FIG. 9, the air chuck 10 is sucking the workpiece 11 as a physical load. The axes J1 to J4 of the robot 2 are driven by respective electrical motors, not shown. A position sensor, not shown, is arranged near each of the electrical motors to measure an angle of rotation and an angular position of a rotating shaft of the electrical motor.

(16) Usually, industrial robots are designed to act according to an operation program made by executing given teachings. The controller 3 works to control the operations of the electrical motors according to the operation program in a feedback mode to control action of the arm of the robot 2.

(17) The teaching pendant 4 works as an operation device and is designed to be of a rectangular flat box shape whose size enables a user or human operator to carry or hold it with his or her a hand to manually operate the teaching pendant 4. The teaching pendant 4 is equipped with a variety of keyswitches. The operator manipulates the keyswitches to input instructions to the teaching pendant 4. The teaching pendant 4 is connected to the controller 3 through a cable to achieve high-speed transfer of data between itself and the controller 3 through a communication interface. Information about instruction signals inputted through the keyswitches is transmitted from the teaching pendant 4 to the controller 3.

(18) The principle of estimating or calculating the position of the center of gravity of the workpiece 11 including a tool will be described below. FIG. 10 illustrates a four-axis arm model of the robot 2. In the following discussion, an x-y or an x-y-z coordinate system (i.e., an x-y plane), as shown in FIG. 9, is used. Specifically, the x-y-z coordinate shown in FIG. 9 is a coordinate system where the origin is defined to be at the lower end of the axis J1. The x-y coordinate system shown in FIG. 10 is used to calculate the position of the center of the gravity of the workpiece 11. The x-axis in the x-y coordinate system is an axis, as denoted by x in FIG. 10, which passes straight through the centers of the axes J1, J2, and J4 when the arms 6 and 7 extend straight. The y-axis extends perpendicular to the x-axis. The z-axis extends perpendicular to the x- and y-axes.

(19) The following discussion will refer to calculation of the center of gravity of the workpiece 11 using centrifugal torque acting on the fourth axis J4 when the first and second axes J1 and J2 of the arm are actuated or rotated. The mass m of the workpiece 11 including the tool is already known. In this disclosure, when the tool is also held by the shaft 8 (i.e., the air chuck 10), the mass m is mass of a combination of the workpiece 11 and the tool, while when the tool is not held by the shaft, the mass m is mass of only the workpiece 11. When the fourth axis J4 is fixed without being rotated, and the first and second axes J1 and J2 are actuated or rotated, the centrifugal force F acting on the fourth axis J4 is given by equation (1) below.
F=m{(2.sub.1+.sub.2).sub.1L.sub.2+.sub.1.sup.2(L.sub.1+L.sub.2)}(1)
where .sub.1 is the angular velocity of the first axis J1, .sub.2 is the angular velocity of the second axis J2, L.sub.1 is a linkage length of the first arm 6 (i.e., a distance, as illustrated in FIG. 10, between the center of the first axis J1 and the center of the second axis J2), and L.sub.2 is a linkage length of the second arm 7 (i.e., a distance between the center of the second axis J2 and the center of the fourth axis J4).

(20) The centrifugal force .sub.f4 acting on the fourth axis J4 is expressed as
.sub.f4=Fl.sub.h sin(.sub.2+.sub.4+.sub.h)(2)
where .sub.2 is an angle (i.e., an angular position) of the second axis J2 in the x-y coordinate system, .sub.4 is an angle (i.e., an angular position) of the fourth axis J4 in the x-y coordinate system, .sub.h is a center-of-gravity direction of the workpiece 11, and l.sub.h is a center-of-gravity distance of the workpiece 11. Note that the center-of-gravity direction is expressed by an angle (i.e., an angular position) of the workpiece 11 measured from the x-axis in FIG. 10 to the position of the center of gravity of the workpiece 11 in the x-y coordinate system. For example, when a line passing through the center of the fourth axis J4 and the center of gravity of the workpiece 11 when the fourth axis J4 is at 0 (04=0) coincides with the x-axis, the center-of-gravity direction is 0. Note that the center-of-gravity distance/h is a distance between the center of the fourth axis J4 and the position of the center of gravity of the workpiece 11 in the x-y coordinate system.

(21) The torque .sub.M acting on the electrical motor for any of the axes J1, J2, and J4 (i.e., axes horizontally rotating) when the robot 2 is actuated is expressed by equation (3) below.

(22) M = ( I + f + G + Frc ) Gear + ( M I d dt + M vis ) Gear + M Frc ( 3 )
where .sub.1 is inertia torque exerted on the motor, M.sub.I is inertial of the motor, .sub.f is centrifugal torque exerted on the motor, M.sub.vis is viscosity of the motor, Gear is a gear ratio of the motor, .sub.G is gravitational torque (i.e., force) which results from the gravity and acts on the motor, M.sub.Frc is friction of the motor, is angular velocity of the motor, Frc is frictional torque which results from friction of parts of the arm and acts on the motor, and d/dt is angular acceleration of the motor.

(23) When the acceleration of each of the axes J1 to J4 is zero, the inertia torque .sub.I will be zero. The motor torque .sub.M4 for the fourth axis J4 (i.e., torque acting on the motor for use in rotating the shaft 8) in a constant-velocity range, as represented in FIG. 11, is, therefore, expressed by equation (4) below.

(24) M 4 = f 4 Gear = FI h sin ( 2 + 4 + h ) Gear ( 4 )

(25) By setting .sub.2 to zero (i.e., .sub.2=0), and determining the motor toque .sub.M4 of the fourth axis J4, the following relation is met.
l.sub.h sin(.sub.4+.sub.h)=.sub.f4Gear/F(5)

(26) The position of the center of gravity of the workpiece 11 is given below in terms of an x-coordinate x.sub.cog and a y-coordinate y.sub.cog.
x.sub.cog=l.sub.h cos .sub.h
y.sub.cog=l.sub.h sin .sub.h(6)

(27) Therefore, the center-of-gravity position: the x-coordinate x.sub.cog and the y-coordinate y.sub.cog are derived by moving the arm of the robot 2 to change the fourth-axis angle .sub.4 two times to determine the motor torque .sub.M4 exerted on the fourth axis J4, and calculating the center-of-gravity distance l.sub.h and the center-of-gravity direction .sub.h.

(28) The operation of this embodiment based on the above principle will be described below with reference to FIGS. 1 to 8. FIGS. 1(a) and 1(b) represent a flowchart of a center-of-gravity position calculating program executed by the controller 3.

(29) After entering the program, the routine proceeds to step S1 wherein the arm of the robot 2 is moved to a first initial position. For instance, the first initial position is, as represented by a solid line in FIG. 2, given below.
(J1,J2,J3,J4)=J(40,40,220,0)
where J1, J2, J3, and J4 are positions of the first axis J1, the second axis J2, the third axis J3, and the fourth axis J4, respectively, and J is the position of the arm of the robot 2. In this embodiment, the positions of the first axis J1, the second axis J2, and the fourth axis J4 are expressed by angular positions thereof when they are 0 when the arms 7 and 8 are aligned with the x-axis. The counterclockwise direction, as illustrated in FIG. 9, is expressed by positive (+), while the clockwise direction is expressed by negative (). The position of the third axis J3 is a vertical position thereof. When the shaft 8 is at a lower reference position (i.e., the origin in the x-y-z coordinate system shown in FIG. 10), the position of the third axis J3 is defined as 0. When the shaft 8 is at an upper limit, the position of the third axis J3 is denoted by 220. Thus, J3=220 represents the vertical position of the third axis J3 (i.e., the shaft 8) when is located at the upper limit thereof.

(30) Next, the routine proceeds to step S2 wherein the arm is actuate or moved to a first calculation position, as represented by a broken line in FIG. 2. The first calculation position is set to, for example, J(40, 40, 220, 0). The fourth axis J4 is kept at the initial position J4=0. The controller 4 samples waveforms of velocities of the first and second axes J1 and J2 and a waveform of torque on the fourth axis J4 within a first action period of time until the arm reaches the first calculation position. FIGS. 3 and 4 show examples of such waveforms.

(31) The routine proceeds to step S4 wherein the controller 3 analyzes the waveforms, as derived in step S3, to determine a constant-velocity range. The routine proceeds to step S5 wherein the controller 3 calculates angular velocities .sub.1 and .sub.2 of the first and second axes J1 and J2 in the constant-velocity range. The operation in step S5 constitutes a first velocity determiner. The routine proceeds to step S6 wherein the controller 3 also analyzes the torque waveform of the fourth axis J4 to determine static torque (also called holding torque) .sub.u4 on the fourth axis J4 and constant-velocity torque .sub.c4 on the fourth axis J4. The operation in step S6 constitutes a first torque determiner. The routine proceeds to step S7 wherein the above parameters are substituted into Eq. (5) to derive l.sub.h sin(.sub.4+.sub.h). The centrifugal torque .sub.f4 is given by a difference between the constant-velocity torque .sub.c4 and the static torque .sub.u4.
l.sub.h sin(.sub.4+.sub.h)=(.sub.c4.sub.u4)Gear/F(7)

(32) Actually, the value of the fourth-axis torque, as demonstrated in FIG. 5, depends upon the static frictional force on the fourth axis J4. The adverse effect of the static torque is, therefore, eliminated, as shown in Eq. (7), by subtracting the static torque on the fourth axis J4 before the arm is actuated from the constant-velocity torque. FIG. 6 demonstrates an example of the fourth-axis torque which contains the adverse effect of the static torque. FIG. 7 demonstrates an example of the fourth-axis torque from which the adverse effects of the static torque is eliminated. In FIGS. 6 and 7, SP is the speed or velocity of the arm of the robot 2. Numeral 100, 90, 80, or 70 represents a percentage of the speed of the arm when 100% is a maximum speed of the arm.

(33) The routine proceeds to step S8 wherein the arm of the robot 2 is moved to a second initial position. The second initial position is a position where only the position of the fourth axis J4 is changed from the first initial position, that is, from .sub.4 to .sub.4. The second initial position of the arm is given by, for example, J(40, 40, 220, 90).

(34) The routine proceeds to step S9 wherein the arm is actuated or moved to a second calculation position. The second calculation position is, as represented by broken line in FIG. 8, a position where only the position of the fourth axis J4 is changed from that when the arm is at the first calculation position to .sub.4 and given by, for example, J(40, 40, 220, 90).

(35) The following steps S10 to S13 are the same in operation as steps S3 to S6 upon movement of the arm from the second initial position to the second calculation position. However, in step S11, constant-angular velocities .sub.1 and .sub.2 are derived. In step S12, the static torque .sub.u4 and the constant-velocity torque .sub.c4 are derived. The operation in step S11 constitutes a second velocity determiner. The operation in step S12 constitutes a second torque determiner. A second action period of time corresponds to the first action period of time.

(36) After step S13, the routine proceeds to step S14 wherein parameters, as derived in steps S10 to S13, are substituted into the following equation (8) to derive l.sub.h sin(.sub.4+.sub.h).
l.sub.h sin(.sub.4+.sub.h)=(.sub.c4.sub.u4)Gear/[m{(2.sub.1+.sub.2).sub.1L.sub.2+.sub.1.sup.2(L.sub.1+L.sub.2)}][8]

(37) The routine proceeds to step S15 wherein it is determined whether the positions .sub.4=0, and the position .sub.4=90.

(38) If a YES answer is obtained in step S15 meaning that .sub.4=0, and .sub.4=90, then the routine proceeds to step S17 wherein Eq. (7) is given by
l.sub.h sin(.sub.4+.sub.h)=l.sub.h sin .sub.h=y.sub.cog(9)
Eq. 8 is also given by
l.sub.h sin(90+.sub.h)=l.sub.h cos .sub.n=x.sub.cog(10)

(39) In the above way, the position of the center of gravity, i.e., the x-coordinate x.sub.cog and the y-coordinate y.sub.cog of the workpiece 11 are derived.

(40) Alternatively, if a NO answer is obtained in step S15 meaning that the condition where .sub.4=0, and .sub.4=90 is not met, then the routine proceeds to step S16 wherein the x-coordinate x.sub.cog and the y-coordinate y.sub.cog are derived according to equations (11) and (12) below.

(41) If T.sub.1=l.sub.h sin(.sub.4+.sub.h), and T.sub.2=l.sub.h sin .sub.4+.sub.h, then Eqs. (11) and (12) are
l.sub.h sin .sub.h=(T.sub.1 sin .sub.4T.sub.2 sin .sub.4)/sin(.sub.4.sub.4)
l.sub.h cos .sub.h=(T.sub.1 cos .sub.4T.sub.2 cos .sub.4)/sin(.sub.4.sub.4)(12)

(42) The operations in step S15 to S17 constitute a center-of-gravity position calculator.

(43) If there is an error or deviation between an actual position of the center of gravity of the workpiece 11 and the position (i.e., the x-coordinate x.sub.cog and the y-coordinate y.sub.cog) of the center of the gravity of the workpiece 11 calculated in the above way, the calculated position may be corrected using a correction factor as a function of the error.

(44) The controller 3 outputs the position of the center of the gravity of the workpiece 11 to the teaching pendant 4. The teaching pendant 4 is equipped with a display and indicates the position of the center of the gravity of the workpiece 11 on the display. For instance, a human operator for the robot 2 visually checks the position of the center of the gravity of the workpiece 11 on the display and determine whether the position of the center of the gravity of the workpiece 11 is in a permissible range or not. If it is in the permissible range, the operator informs the controller 3 of the fact that the workpiece 11 is correctly held by the arm 8. If not, the operator informs the controller 3 of the fact that the fact that the workpiece 11 is incorrectly held by the arm 8. These operations may alternatively automatically achieved by a control device instead of the human operator.

(45) As apparent from the above discussion, the controller 3 is engineered to determine the angular velocities .sub.1 and .sub.2 of the first and second axes J1 and J2 in the constant-velocity range in the first action period of time between when the arm of the horizontal four-axis robot 2 which is holding the workpiece 11 whose mass m is known is at the first initial position and when the first and second axes J1 and J2 are actuated, so that the arm reaches the first calculation position. The controller 3 also determines the static torque .sub.u4 and the constant-velocity torque .sub.uc of the fourth axis J4 in the first action period of time and then uses such parameters to calculate the first parameter T.sub.1.

(46) The controller 3 also determines the angular velocities .sub.1 and .sub.2 of the first and second axes J1 and J2 in the constant-velocity range in the second action period of time between when the arm of the robot 2 is at second initial position and when the arm reaches the second calculation position. The second initial position is a position of the arm where the position of the fourth axis J4 is changed from .sub.4 (i.e., the first initial position) to .sub.4. The controller 3 further determines the static torque .sub.u4 and the constant-velocity torque .sub.uc of the fourth axis J4 in the second action period of time and then uses such parameters to calculate the second parameter T.sub.2. Finally, the controller 3 calculates the position (i.e., the x-coordinate x.sub.cog and the y-coordinate y.sub.cog) of the center of gravity of the workpiece 11 using the first and second parameters T.sub.1 and T.sub.2.

(47) In brief, the controller 3 works to horizontally move the workpiece 11 two times in conditions where the fourth axis J4 is kept at the respective angular positions .sub.4 and .sub.4 and calculate the parameters T.sub.1 and T.sub.2 as a function of torque acting on the fourth axis J4. The controller 3 then uses the parameters T.sub.1 and T.sub.2 to calculate the position (i.e., the x-coordinate x.sub.cog and the y-coordinate y.sub.cog) of the center of gravity of the workpiece 11 in a horizontal plan of the robot 2 equipped with the horizontal four-axis arm. In this way, the first and second axes J1 and J2 are moved to exert a greater degree of centrifugal force or torque on the workpiece 11, thereby enhancing the accuracy in calculating the position of the center of gravity of the workpiece 11 held by the arm of the robot 2.

(48) The controller 3 sets one of the fourth-axis positions (i.e., the positions of the fourth axis J4) .sub.4 and .sub.4 to 0 and the other to 90. This achieves fast and simple calculation of the center-of-gravity positions x.sub.cog and y.sub.cog of the workpiece 11 using the first and second parameters T.sub.1 and T.sub.2.

(49) The above movement of the arm of the robot 2 is, as described above, achieved by keeping the third axis J3 at the upper end (i.e., the upper limit) thereof. This minimizes the mechanical vibration transmitted from the third axis J3 to the workpiece 11 when the arm is moved to the first or second calculation position, thereby enhancing the accuracy in calculating the position of the center of gravity of the workpiece 11.

(50) While the present invention has been disclosed in terms of the preferred embodiment in order to facilitate better understanding thereof, it should be appreciated that the invention can be embodied in various ways without departing from the principle of the invention. Therefore, the invention should be understood to include all possible embodiments and modifications to the shown embodiment which can be embodied without departing from the principle of the invention as set forth in the appended claims.

(51) For example, the first and second initial positions and the first and second calculation positions may be changed as needed.

(52) If a degree of torque great enough to calculate the position of the center of gravity of the workpiece 11 is derived, either one of the first and second axes J1 and J2 may be actuated.

(53) If the adverse effect of the vibration of the workpiece 11 is acceptable, the third axis J3 does not always need to be kept at the upper limit thereof.

(54) The order in which the steps S5 and S6 are executed may be reversed. The order in which the steps S12 and S13 are executed may be reversed.

(55) The robot 2 may be designed to have any three of the axes J1, J2, J3, and J4 which are rotated around them and the remaining one which is moved vertically (i.e., the z-axis direction). For instance, the robot 2 may be engineered to have only the axis J1 to be movable vertically.