Fundamentals of Robotics Study of a Robot - Chapter 2 and 3 Sergi Valverde u1068016@correu.udg.edu Daniel Martínez u1068321@correu.udg.edu June 9, 2011 1 Introduction This report introduces the second and the third chapter of the Study of the ABB IRB 6620 robot. In the second chapter, the forward kinematic is computed and the MATLAB model is done. In the third one, the inverse kinematics using the robotic toolbox is computed and also we program the robot in order to follow a straight line. As it has been introduced in the first chapter, the ABB IRB 6620 robot is able to move with 6 degrees of freedom. All these movements are rotations and they are shown in Figure 1 (a). On the other hand, Figure 1(b) is showing a drawing of the skeleton of the robot with all the distances in between the links. 2 Denavit-Hartenberg Using the information from Figure 1, the Denavit-Hartenberg algorithm can be applied in order to get the transformation matrices between the axis ( i 1 A i ). Figure 2 shows the different coordinate systems and the respective table with all the values of θ, d, a and α. Then, multiplying all these matrices, the matrix 0 A 6 is obtained which to estimate the position of an object in the hand referenced from the base of the robot. These are used matrices: 1
(a) IRB 6620 (b) Links and distances Figure 1: IRB 6620 Robot (a) dh Figure 2: DH of the IRB 6620 Robot cos(0) cos(π/2) sin(0) sin(π/2) sin(0) 320 cos(0) 0 A 1 = sin(0) cos(π/2) cos(0) sin(π/2) cos(0) 320 sin(0) 0 sin(π/2) cos(π/2) 680 cos(π/2) cos(0) sin(π/2) sin(0) sin(π/2) 975 cos(π/2) 1 A 2 = sin(π/2) cos(0) cos(π/2) sin(0) cos(π/2) 975 sin(π/2) 0 sin(0) cos(0) 0 2
cos(0) cos(π/2) sin(0) sin(π/2) sin(0) 200 cos(0) 2 A 3 = sin(0) cos(π/2) cos(0) sin(π/2) cos(0) 200 sin(0) 0 sin(π/2) cos(π/2) 0 cos(0) cos( π/2) sin(0) sin( π/2) sin(0) 0 cos(0) 3 A 4 = sin(0) cos( π/2) cos(0) sin( π/2) cos(0) 0 sin(0) 0 sin( π/2) cos( π/2) 887 cos(0) cos(π/2) sin(0) sin(π/2) sin(0) 0 cos(0) 4 A 5 = sin(0) cos(π/2) cos(0) sin(π/2) cos(0) 0 sin(0) 0 sin(π/2) cos(π/2) 0 cos(0) cos(0) sin(0) sin(0) sin(0) 0 cos(0) 5 A 6 = sin(0) cos(0) cos(0) sin(0) cos(0) 0 sin(0) 0 sin(0) cos(0) 300 And after multiplying all together, the matrix R T H that we will use to model the robot in MATLAB is obtained: 0 A 6 = 0 0 1 1507 0 1 0 0 1 0 0 1855 3 Model in MATLAB In this section the Robot toolbox of MATLAB is used [2]. The aim consists in modelling the ABB IRB 6620 robot using this toolbox in order to have the robot simulated in the MATLAB interface. The main used functions are the following ones: 1. link (α, a, θ, d, sigma): Defines the link with the obtained parameters in the Denavit-Hartenberg table. The sigma value is equal to 0 if the 3
link is a rotation, and 1 if it is a translation. Here, we also have taken into account the limit in degrees that each link has (as in Table 1 from the first chapter of the study). 2. robot(links, name,...): Creates the robot with the previous link specifications. 3. drivebot(robot): Interface that allows to move the robot to different positions. 4. fkine(robot, position): Computing the forward kinematic of the robot in a specified position. Figure 3 shows different positions of the robot model. After computing the forward kinematic in the home position using the fkine() function and comparing it with the R T H matrix from the previous section, we can say that the model has been properly designed because both matrices contains the same values (check the MATLAB code and run the results). 4
(a) Home position (b) Specified position Figure 3: Different Movements 4 Follow a straight line In order to follow a straight line we will use the ikine function from MATLAB. Given x,y and z coordinates of a point, this function computes which is the configuration or the degrees of the different joints of the robot to reach this position. The first step consists in defining a straight line. In our case we want to go from position p1=(x=-900, y=845, z=1200) to position p2=(x=900, y=50, z=900). This line is shown in green in Figure 4 5
Figure 4: Line that the robot has to follow This is the piece of code that allows us to solve this problem: % INVERSE KINEMATICS: DEFINING A STRAIGHT LINE : % Defining the two p o i n t s o f the l i n e and the number % o f p o i n t s between them. T0 = t r a n s l ( [ 900, 845, 1200] ) ; T1 = t r a n s l ( [ 9 0 0, 50, 9 00] ) ; i t = 2 5 ; % d i f i n e the number o f p o i n t s in the l i n e. % Compute the j o i n t space t r a j e c t o r y r j o i n t s = j t r a j ( 0, 1, i t ) ; % Compute the Cartesian t r a j e c t o r y between the two p o i n t s. t r a j e c t o r y = c t r a j (T0, T1, r j o i n t s ) ; %Show the o r i g i n a l l i n e that the robot has to f o l l o w. f i g u r e ( 2 ) ; hold on ; l i n e ([ 900 9 0 0 ], [845 5 0 ], [1200 9 0 0 ], Color, g, LineWidth, 2 ) ; % Compute the t r a j e c t o r y f o r i = 1 : s i z e ( t r a j e c t o r y, 3 ) % Compute the v a l u e s o f the j o i n t s. Save i t i n t o Q vect Q vect = i k i n e (ABB, t r a j e c t o r y ( :, :, i ) ) ; % Compute the forward kinematics with t h i s c o n f i g u r a t i o n s % v e c t o r and check wether the s t r a i g h t l i n e i s f o l l o w e d. T = f k i n e (ABB, Q vect ) ; v a l u e s = [T( 1 : 3, 4 ) ;T( 1 : 3, 3 ) ] ; f i g u r e ( 2 ) ; hold on ; p l o t 3 ( v a l u e s ( 1 ), v a l u e s ( 2 ), v a l u e s ( 3 ), bo ) ; 6
end p l o t (ABB, Q vect ) ; In this code we are using different functions from the MATLAB robotic s toolbox. 1. T=transl (x, y, z): Return an homogeneous transformation representing a translation expressed as threes scalar x,y and z. 2. TC = ctraj(t0, T1, m): ctraj returns a Cartesian trajectory (straight line motion) TC from the point represented by homogeneous transform T0 to T1. The number of points along the path is m. 3. q = ikine(robot, T): ikine returns the joint coordinates for the manipulator described by the object robot whose endeffector homogeneous transform is given by T. In the last part of the code what we are doing is computing the joint coordinates for the manipulator in each point of the line and moving the robot to each one of the positions. The result is shown in 5, where we have the behaviour of the robot while following the straight line. The final result is shown in Figure 6 (a) Point number 1 (b) Point number 5 (c) Point number 10 (d) Point number 15 (e) Point number 20 (f) Point number 25 Figure 5: Straight line behaviour 7
Figure 6: Final result References [1] ABB Robotics IRB 6620 s Datasheet. 2010 [2] Robotic Toolbox for MATLAB: http://www.petercorke.com/rtb/signin2.php Accessed on 20th April 2011 8