3 Points Calibration Method of Part Coordinates for Arc Welding Robot Wenzeng Zhang1, Xiande Ma1, Leqin Cui2, and Qiang Chen1 1
Key Laboratory for Advanced Materials Processing Technology, Ministry of Education, Dept. of Mechanical Engineering, Tsinghua Univ, Beijing 100084, China 2 Dept. of Precision Instruments and Mechanology, Tsinghua Univ, Beijing 100084, China
[email protected]
Abstract. The part coordinates are always calibrated before the welding robot carries out some tasks. Traditional methods are using expensive and complicated devices for measuring. A novel method for quick calibration is presented based on a 3 points operation, which only uses the internal encoder data of robot and coordinates transform calculation to get the coordinates transform matrix between the part coordinate system and the basic coordinate system of robot. It is convenient to operate and its calibration result is precise. The method is imbedded in the self-developed offline programming software for MOTOMAN SK6 arc-welding robot. Robot writing is realized based on the algorithm and offline programming. Experimental results show the validity of the calibration method. Keywords: industrial robot, part coordinate system, calibration, offline programming.
1 Introduction Calibration is an important task during the use of a robot, whose precision directly affects the precision of task execution. Much research work has been done for robot calibration [1, 2]. According to the calibrated object, the robot calibration can be classified as: (1) calibration of the relationship between the member coordinate system of the robot’s main body and the basic coordinate system; (2) calibration of the relationship between the robot and other equipments (such as welding positioner, other robots and so on); (3) calibration in the operating task of the robot (such as tool parameter calibration, wokpiece parameter calibration) [3]. Traditional robot calibration technology requires expensive and complicated equipments, thus some calibration methods have been developed that only adopt internal encoder data of robot. Ikits introduces the planar constraint condition, based on which brings forward a nonlinear least-square-method optimization. This method extends and realizes close-loop calibration [4]. Piao Y J et al. put forward calibration method for the tool parameters, which only requires to find the origin location of the tool coordinate framework(TCF) in somewhere of the executor, without any restriction and constraint of the shape and dimension of the terminal executor or tool[5]. Song Y E et al. bring forward an entire method of the calibration module in the C. Xiong et al. (Eds.): ICIRA 2008, Part I, LNAI 5314, pp. 216–224, 2008. © Springer-Verlag Berlin Heidelberg 2008
3 Points Calibration Method of Part Coordinates for Arc Welding Robot
217
robotic offline programing system, including robot calibration, workpiece calibration and path calibration and so on, and give out 3 methods available for workpiece calibration, resolving mainly the correction problem in the matching between the workpiece in simulation and that in practical environment [3]. In the use of the arc-welding robot, commonly a workpiece coordinate system is built fixed with the workpiece to facilitate welding, on which most operation tasks are defined; while in the programming of the robot, the operation tasks are required to be defined in the basic coordinate system or the terminal coordinate system [6]. The relationship between the two requires to be calibrated beforehand, which is called workpiece calibration. The building and use of the workpiece coordinate system can facilitate a lot the robot programming, including online and offline programming. The calibration of the workpiece coordinate system is a part of the workpiece parameters calibration. When the workpiece is changed or the location/gesture of the wokpiece is changed, generally the workpiece coordinate system needs to be rebuilt and recalibrated to better express the operation tasks. Thus, the workpiece coordinate system is often calibrated and recalibrated. This calibration needs to be fast to improve efficiency. This paper presents a fast calibration method for workpiece coordinate system, using the internal encoder data of the robot and the coordinate transformation relationships.
2 Part Coordinate System The coordinate systems of the robot is shown in fig.1, including the world coordinate systems{W}, the basic coordinate systems{R}, the extremity coordinate system{E}, the tool coordinate system{T}, the workpiece coordinate system{U}, in which {R} can be equal to {W}. {U} can be built arbitrarily in one surface of the workpiece, and fixed with the workpiece.
R
E
TE
TT
{T }
{E} U
TT
{U } R
{W } = {R}
TU
Fig. 1. Robot coordinates system
Let the homogeneous coordinate transformation matrix of {E} relative to {R} be TE, which changes with the movement of the terminal of the robot. Given the forward kinematics equations and analytical solution of the inverse kinematics, and the homogeneous coordinate transformation matrix of {T} relative to {E} be ETT, which is known and independent to robot movements. The homogeneous coordinate
R
218
W. Zhang et al.
transformation matrix of {U} relative to {R} is RTU, which is unknown and independent to robot movements, and to be solved by calibration experiments and calculations. The homogeneous coordinate transformation matrix of {T} relative to {U} is UTT, which changes with the movement of the terminal of the robot. The homogeneous coordinates of some point is Pr=[xr, yr, zr, 1]T in the basic coordinate system, Pe=[xe, ye, ze, 1] in the terminal executor coordinate system, and Pt=[xt, yt, zt, 1] in the tool coordinate system. According to the relationship of the coordinate transformation,
JJG R JJG R E JG Pr = TE Pe = TE TT Pt
(1)
Let the pulse values of the encoders in the robot be ni, i=1, 2, …, 6, the rotational angles αi i=1, 2, …, 6, respectively for each axis. Given the coefficient of proportionality ki i=1, 2, …, 6, then
, ,
α i = ni / ki
( i = 1, 2,..., 6 )
(2)
3 Calibration Operations Move the terminal tool of the robot in the teaching status, let the terminal of the tool touch orderly the origin M1, a point M2 in the positive xu axis, and a point M3 in the first quartile of the xuyu plane, in the coordinate system {U}, and record the pulse numbers ni, i=1, 2, …, 6 of each axis when the robot reaches the 3 points, respectively. The location of the 3 points in {U} is shown in Fig.2. Manipulation of the robot to let the tool terminal touch some point is shown in Fig.3.
yu
zu
M3
{U }
M1
M2
xu
Fig. 2. Three points in part coordinate system
R
TE
{E}
E
TT
{R} R
TU
Fig. 3. Tool in robot end contacts part
3 Points Calibration Method of Part Coordinates for Arc Welding Robot
219
To prevent collision between the robot and the workpiece in touching process, a piece of paper is placed between the workpiece and the tool terminal, and let the robot approach the workpiece in the lowest speed, i.e, only a single pulse once, until the paper is just clipped and cannot move. Record the pulse values of all the axes of the robot at this time.
4 Calibration Calculation The aim of the calibration of the workpiece coordinate system is to solve the homogeneous coordinate transformation matrix RTUof the workpiece coordinate system relative to the basic coordinate system {R}, including 6 independent variables. Express gesture of the coordinate system in the Roll-Pitch-Yall style, and let the 6 variables be px, py, pz, ϕ, θ, ψ, then ⎡c φ cθ
c φ s θ s ψ − s φ cψ
c φ s θ cψ + s φ s ψ
⎢ − sθ ⎢ ⎣⎢ 0
c θ sψ 0
c θ cψ 0
TU = ⎢⎢ s φ c θ s φ s θ sψ + c φ cψ s φ s θ cψ − c φ sψ
R
px ⎤ p y ⎥⎥ pz ⎥ ⎥ 1⎦
(3)
In which c represents cos and s represents sin for short. Substitute the pulse number of the axes to (2), the driving angle of the axes αi, i=1, 2, …, 6 can be figured out. Substitute the angles to the forward kinematics equation R TE=f(α1 , α2 , α3 , …, α6 ), the corresponding RTE1, RTE2 and RTE3 can be figured out. When the tool terminal touches points M1, M2 and M3, the homogeneous coordinates of these points in the tool coordinate system are the same: JJG JJG JJG (4) Pt1 = Pt 2 = Pt 3 = [0 0 0 1]T The coordinates of the points M1, M2 and M3 in {R} is obtained by (1):
JJG R E JJG Pri = TEi TT Pti = [ xri
yri
zri 1]T
( i = 1, 2,3 ).
(5)
While the coordinates of these 3 points in {U} are
JJG Pu1 = [0 0 0 1]T
(6)
JJJG Pu 2 = [ xu 2
0 0 1]T
(7)
JJG Pu 3 = [ xu 3
yu 3
0 1]T
(8)
The relationship between {U} and {R} yields
JJG R JJG Pri = TU Pui
( i = 1, 2,3 ).
(9)
Substitute (3), (5) and (6) to (9):
px = xr1 , p y = yr1 , pz = zr1 .
(10)
220
W. Zhang et al.
Substitute (3), (5) and (7) to (9):
⎧ xu 2 cos φ cos θ + px = xr 2 ⎪ ⎨ xu 2 sin φ cos θ + p y = yr 2 . ⎪ − x sin θ + p = z u2 z r2 ⎩
(11)
φ = atan2( yr 2 − p y , xr 2 − px ) ,
(12)
( y − p y) θ = atan2( p z − zr 2 , r 2 ). sin φ
(13)
Solve (11):
Substitute (3), (5) and (8) to (9):
⎧ xu 3 c φ c θ + yu 3 (c φ s θ sψ − s φ cψ ) + px = xr 3 ⎪ . ⎨ xu 3 s φ c θ + yu 3 (s φ s θ sψ + c φ cψ ) + p y = yr 3 ⎪ − xu 3 s θ + yu 3 c θ sψ + pz = zr 3 ⎩
(14)
In which “c” represents “cos” and “s” represents “sin” for short. Solve (14), we get
ψ = atan2( M S , M C ) . In which,
S1 − M C cos φ , F1 F2 S1 − F1 S 2 MC = F2 cos φ + F1 sin φ
(15)
MS =
,
F1 = cos 2 θ + sin φ sin θ ,
F2 = cos φ / sin θ ,
S1 = yr 3 − cosθ ⋅ pz + zr 3 − p y , S2 = xr 3 − cos φ cotθ ( pz + zr 3 ) − px .
( )
Substitute (10), (12), 13 to (3) to solve RTU, then the calibration of the workpiece coordinate system is finished. In the offline programming of the robot, RTU can be figured out by just inputting 3 pulse number for corresponding 3 points in software according to the algorithm above. Higher calibration precision can be attained by multiple calibrations and least square method.
5 Calibration Results Usage After the workpiece coordinate system is built and calibrated, programming can be made using this workpiece coordinate system. In the offline programming, the pulse
3 Points Calibration Method of Part Coordinates for Arc Welding Robot
221
values are needed in the operation command of the robot, thus the calibration results can be used in a way presented below. Given RTU and UTT, to get RTE, Fig. 1 yields coordinate transformation relationship:
TE ETT = RTU U TT
(16)
TE = RTU U TT ETT−1
(17)
R
So, R
Furthermore, by inverse kinematics, 6 joint angles can be figured out, and 6 pulse values can be obtained by these angles substituted to (2).
6 Experiments and Error Analysis The experimental equipments are shown in Fig.4 and Fig.5. The independently developed offline programming software RobotOffline for arc-welding robots includes the calibration and usage algorithms presented above. By this software, the calibration and usage experiments for the workpiece coordinate system are carried out in MOTOMAN SK6 arc-welding robot. It should be mensioned that a writing tool is installed in the robot terminal, as shown in Fig.5, and the tool is not calibrated yet. Thus the coordinate transformation
1-Robot body; 2-Robot control box; 3-Teaching programming box; 4-Connecting cable; 5-Workbench; 6-Emersion box; 7-Writing pen and clamp holder Fig. 4. Experimental equipments
Fig. 5. Writing pen and clamp holder
222
W. Zhang et al. Table 1. Pulse values of robot in calibration of part coordinates
M1 M2 M3
n1
n2
n3
n4
n5
n6
-8629
153139
-104333
-8133
13902
16438
-8629
162267
-95165
-8133
13902
16438
-4694
152787
-104157
-8133
13902
16438
Table 2. Calibration result of part coordinates
px /mm
p y /mm
pz /mm
φ /D
θ /D
ψ /D
1020.9
-72.684
-603.67
-4.8538
-0.45392
3.2893
(a) RobotOffline software interface
(b) Writing pre-plan programming
(c) Real writing result
Fig. 6. Robot’s handwriting based on off-line programming
of {T} relative to {E} is omitted in the calculation process, i.e. let ETT =I. As a result, the gained workpiece coordinate system is not the actual one, but a translated version. However, this does not affect the writing. The key data of the experiments is shown in Table 1 and Table 2. By calculation, we get
3 Points Calibration Method of Part Coordinates for Arc Welding Robot
223
⎡ 0.99639 0.083959 −0.012665 1020.9 ⎤ ⎢ −0.084545 0.99482 −0.056521 −72.684 ⎥ R ⎥ TU = ⎢ ⎢ 0.0078539 0.057388 0.99832 −603.67 ⎥ ⎢ ⎥ 0 0 0 1 ⎦ ⎣
Given the above RTU, and the homogeneous coordinates of some point in {U} is Pu=[20, 20, 20, 1]T, the pulse numbers of the robot are can be figured out, (-8629, 153138, -104334, -8136, 13904, 16436). Using this software to carry out the offline programming for the robot writing experiments, the software interface, the virtual writing path and pratical writing result are shown in Fig.6 (a), (b) and (c), respectively. To verify the precision of this calibrating method, a high precision flat is used. Place several high precision objects to be calibrated, and build multiple workpiece coordinate system {Ui} related to UjTUi1. UjTUi1 is used as measured values, in which i=1, 2, …, n j=1, 2, …, n i≠j (the same below). The relationship UjTUi1 between these tool coordinate systems is solved by the method presented in this paper, as calculated values. Comparing the measured values and the calculated values, the error range is obtained. By averaging multiple experiments, the translating error of the transformation matrices between the workpiece coordinate system is