Automatc Robotc arm calbraton usng parameter optmzaton technques Project by: Chetan Kalyan Introducton: Robotc manpulaton tasks need accurate calbraton between sensors (eyes) and arms. Standard manual methods of calbraton requre recordng 3D coordnates of the end effector and n the arm and eye frames. We propose to perform ths calbraton usng optmzaton technques on the parameters of the robotc arm: There are a few parameters n the arm whch are assured to be accurate, such as the jon angles of each lnk n the arm and the length of some of the lnks n the arm. However, the length of the last lnk can vary due to wear and tear or due to the user addng add-ons at the tps of the arm. The state-of-the-art s to manually measure the length of these lnks and feed them to the arm. Ths s unrelable as manual measurements are prone to errors. The scope of ths project s thus to reduce the calbraton error of the arm to a neglgble level. Ths nvolves optmzaton over the lengths of the lnks of the arm, usng as few parameters as possble. Ths wll allow us to use the arm wthout havng to perform tme-ntensve manual measurements. Normally, such an optmzaton over a large number of varables s a farly complcated process, snce t nvolves fndng gradents and hessans of all the parameters nvolved n order to optmze. For our purposes, snce the optmzaton s prmarly over numerc data, we opted to choose the Levenberg-Marquardt algorthm, whch performs numerc mnmzaton over repeated teratons of the algorthm. Ths suted our purposes, snce the functons governng the knematcs of the arm are suffcently complcated to prevent easy calculaton of gradents. Optmzng the lengths of all the lnks as well as the rotaton and translaton matrces returned the best results. Ths shows that the transformaton of co-ordnates from the arm frame to the sensor frame s also prone to errors and can be optmzed. In subsequent sectons, we descrbe the settng up of the optmzaton problem, the expermental set-up and the results that we obtaned.
Fundamentals: Fgure 1 Schematc of arm parameters We make the assumpton that, even though the lengths of the lnks are not entrely accurate, the errors n θ 1 to θ n are small and can be used to tran our model effectvely. Let JЄR s be the vector of the 5 jon angles of the arm. The measurements of J are assumed to be accurate. In order to predct the length of θ 0, we need to frst fnd the poston of the arm n a 3D space. Ths means that we need to be able to accurately say what the (x,y,z) co-ordnates of the end-effector are. We have 2 frames of reference n ths problem- the frame of the robotc arm R and the frame of the on-board sensor S: Let X S be the value of (x,y,z) returned by the sensor for the th tranng sample; X R be the co-ordnates of the arm n the robot space. We need to fnd X R n terms of X S, and match the two, n order to fnd the correct (x,y,z) for computaton of θ 0. How do we do ths? We know the value of J, the jon angles of the th tranng sample of the data set. We also know θ, the vector of lnk lengths. We can hence fnd X R as a functon of J and θ as: x r = cos(j(1)) * [ θ(1)*sn(j(2)) + θ(2)*sn(j(3)) + (θ(3)+θ(4))*sn(j(4)) ]; y r = sn(j(1)) * [ θ(1)*sn(j(2)) + θ(2)*sn(j(3)) + (θ(3)+θ(4))*sn(j(4)) ]; z r = θ(1)*cos(j(2)) + θ(2)*cos(j(3)) + (θ(3)+θ(4)) * cos(j(4)); We can use the rotaton matrx R Є R 3x3 and the translaton vector T Є R 3 to transform the robot space to the sensor space, and thus match our robot and sensor co-ordnates: R s= R * X r + T
Optmzng ths reduces to a least squares problem, and once the optmal soluton has been found, we can proceed to use R,T and J to fnd the optmzed value of θ,as : Mn R,T,θ [ k*(actual dst. between 2 pts on the board) + ( R S (X r ) X s ) 2 ] Here, k s a scalng factor whch mposes a constrant on the optmzaton and ensures that the matrces are not changed too much. We measure the dstance between any 2 ponts on the board and use ths dstance to constran the optmzer to fnd the length of the lnks satsfyng the dstance equaton. In ths optmzaton, we cannot fnd the gradent or the hessan effcently, snce the functon governng X R s complex. So, we use the Levenberg-Marquardt algorthm to fnd local optma wthout fndng gradent or hessans. We terate over ths step tll we reach the global optmum. Expermental Set-up: Procedure for executon of project: Data Collecton Transform coordnates to requred frames of reference Optmze the varables usng ths data Verfy aganst orgnally measured calbraton error Data collecton. Collect jon angles of the arm at varous postons, n order to fnd J. o On a board, draw some crosses, representng the X S s. These wll be used as the ponts for data collecton. o Scan the board wth the laser and record the postons of each data pont. Ths gves us the coordnates n the sensor frame.
o Move the arm to each of the crosses and record jon angles and pose at that poston. Ths gves us the parameters of the robot frame. Transform co-ordnates from robot space to sensor space. The transformaton to sensor frame of reference allows us to compare the values from the arm and the sensor values. Optmze the transformaton, usng Levenberg-Marquardt algorthm, n Matlab. We ran the Levenberg-Marquardt algorthm on the collected data for 1000 teratons, ntalzng each of the 3 optmzaton parameters (R,T, theta) to some default values, not assured to be accurate. We found that the algorthm stablzed somewhere around 800 teratons. Test the optmzed parameters n calbraton and fnd change n calbraton error. The output of the optmzaton was the 3 parameters- (R,T, theta). We used ths output to re-calbrate the robot and check the calbraton error aganst the orgnal error. Results: We collected 87 dstnct data ponts. We ran the Levenberg-Marquardt algorthm on ths dataset wth default ntalzatons and performed 1000 teratons on the optmzer. We then gave faulty ntalzatons to the optmzer and checked for convergence to the correct values. We found that the length of the last lnk was optmzed to an error of less than 1mm and the rotaton and translaton matrces were also optmzed to get better results. Calbraton error = mean error between the predcted co-ordnates and actual co-ordnates of each sample n the sensor frame Knematcs error= mean error between the predcted co-ordnates and actual co-ordnates of each sample n the arm frame Intal Optmzed Intal Optmzed Length of last lnk 134.3 135.3 167 135.2011 Rotaton matrx change 0.4410 0.4357 Translaton vector change 0.0120 0.0173 Calbraton error 7.552966 mm 0.079319 mm 7.552966 mm 0.752 mm
Knematcs error 0 0.816763 mm 1.0693 mm 0.87 mm Concluson and further work: Thus, Parameter optmzaton of robotc arm parameters s much more relable and effcent than manual confguratons. In the future, we plan to expand the optmzaton technque to help n calbratng most, f not all, parameters of the arm, thus reducng tme and effort n calbraton. We also plan to devse more sophstcated ways of measurng calbraton errors n a more vared envronment. Acknowledgements: I would lke to thank Mr. Quoc Vet Le for hs patence and hs counsel throughout the project. I would also lke to thank everyone at the Robot learnng lab for ther support, encouragement and help durng my work. References: 1. The Levenberg-Marquardt algorthm: Implementaton and theory, Jorge J.More, Sprnger Berln / Hedelberg, 1978. 2. Ng, Andrew, Least squares method, Parameter optmzaton, CS 229: Machne Learnng Course Notes (2008 Aut), Avalable at http://www.stanford.edu/class/cs229/materals.html