Chapter 3 + some notes on counting the number of degrees of freedom Minimum number of independent parameters = Some number of dependent parameters minus the number of relationships (equations) you can find between the dependent parameters
ME752 - M. Srinivasan Non-planar 3R manipulator DH parameters in 3D Defining the Body-fixed frames Transformations between frames The Big end result of this lecture is the solution of the Forward Kinematics Problem 1 3 revolute joints (hence called 3R or RRR) 3 degrees of freedom (not counting gripper) Three link, non-planar manipulator L1 Gripper / End effector Axis 1 Axis 3 L 2 Base Axis 2 Axes 1 and 2 are perpendicular Axes 2 and 3 are parallel Therefore, non-planar (not all axes are parallel) 2
The Z axes are all along the joint axes Three link, non-planar manipulator Gripper / End effector Axis 3 Ẑ 3 Ẑ 1 Axis 1 Base Axis 2 Ẑ 2 3 Another legal Z axes set Ẑ 1 Axis 1 Ẑ 3 Axis 3 Base Axis 2 Ẑ 2 4
The Xi axes are along the common normals from the i th joint axis to the (i+1) th joint axis Common Normals ˆX i Axis 1 Axis 3 ˆX 1 Axis 1 and 2 intersect. The common normal is perpendicular to both axes and passes through the intersection point Axis 2 Axes 2 and 3 are parallel, so the common normal is not unique - a few possibilities are shown here 5 The origin of a frame is where the X axis and the Z axis meet Attach the Z axis to the X axis so that the origin of the frames are fixed Ẑ 1 Axis 3 ˆX 1 Ẑ 2 Axis 2 6
Y axes added Add the Y axes in a manner that X-Y-Z axes form a right-handed system (That is, X = Middle finger, Y = thumb, Z = index finger). Ẑ 1 Axis 3 Ŷ 1 ˆX 1 Ŷ 2 Ẑ 2 Axis 2 7 The rules for defining the frames associated with 1) the base i.e., the base frame or frame {0} 2) the last link i.e., frame {n} are slightly different. Because they are not uniquely defined by the rules we use for the other intermediate links: the convention is to choose them in a manner that makes our lives as simple as possible. 8
Defining Frame {0}: choose it to be identical to frame {1} when! 1 =0 TOP VIEW WHEN! = 0 Ŷ 1 Ŷ 0 ˆX 0 ˆX 1! # Ẑ 1 Axis 3 " ˆX 1 Ŷ 1 Ŷ 2 Ẑ 2 Axis 2 Axis 1 9 TOP VIEW When 1 6=0 ˆX 0! Ŷ 1! Ŷ 0 ˆX 1 Note how frame {1} rotates when! 1 changes, but frame {0} remains fixed Frame {i} is body-fixed to Link {i}! # Ẑ 1 Axis 3 " Ŷ 1 ˆX 1 Ŷ 2 Ẑ 2 Axis 2 10
Picking frame {3} SIDE VIEW when 2 = -90 deg and 3 = 0 deg. ˆX 3 ˆX 3 Ẑ 1 Ŷ 3 Ẑ 3 Axis 3 Ŷ 3 Ŷ 1 ˆX 1 Ŷ 2 Ẑ 2 Axis 2 Ŷ 2 11 Note 2 is the angle between ˆX 1 and, anticlockwise about Ẑ2, so -90 deg. 2 = angle between ˆX 1 and 3 = angle between and ˆX 3 Axes and frames when!" #" $ change Ŷ 3 Ŷ 2 ˆX 3 Ŷ 3 Ŷ " 2 ˆX 1 ˆX 1 # ˆX 3 The frames move with the bodies! # Ẑ 1 Axis 3 " Ŷ 1 ˆX 1 Ŷ 2 Ẑ 2 Axis 2 12
DH parameters Number of rows in table = Number of links, not counting the 0-th link i αi-1 ai-1 di θi???? 1 2 3 We write the table this way because we are usually interested in: αi for i = 0 to n-1 ai for i = 0 to n-1 di for i = 1 to n θi for i = 1 to n 13 αi the angle from Zi to Zi+1, positive if anti-clockwise about Xi L1 ˆX 3 Ẑ 0 Ẑ 1 Ŷ 3 Ẑ 3 Axis 3 L2 ˆX 0 ˆX 1 Ŷ 2 Axis 1 Ŷ 1 Ŷ 0 Note the -90 degrees. because going from Z1 to Z2, ing is a clockwise rotation (hence negative) of 90 degrees about X1. Ẑ 2 Axis 2 i αi-1 ai-1 di θi 1 0 2-90 3 0 14
ai the distance from Zi to Zi+1, measured along Xi L1 ˆX 3 Ẑ 0 Ẑ 1 Ŷ 3 Ẑ 3 Axis 3 L2 ˆX 0 ˆX 1 Ŷ 2 Axis 1 Ŷ 1 Ŷ 0 Ẑ 2 Axis 2 i αi-1 ai-1 di θi 1 0 0 2-90 0 15 3 0 L2 di the distance from Xi-1 to Xi, measured along Zi L1 ˆX 3 Ẑ 0 Ẑ 1 Ŷ 3 Ẑ 3 Axis 3 L2 ˆX 0 ˆX 1 Ŷ 2 Axis 1 Ŷ 1 Ŷ 0 Ẑ 2 Axis 2 i αi-1 ai-1 di θi 1 0 0 0 16 2-90 0 L1 3 0 L2 0
θi is the joint variable the angle from Xi-1 to Xi, positive if anti-clockwise about Zi L1 ˆX 3 Ẑ 0 Ẑ 1 Ŷ 3 Ẑ 3 Axis 3 L2 ˆX 0 ˆX 1 Ŷ 2 Axis 1 Ŷ 1 Ŷ 0 Ẑ 2 Axis 2 i αi-1 ai-1 di θi 1 0 0 0 θ1 17 2-90 0 L1 θ2 3 0 L2 0 θ3 DH parameters i αi-1 ai-1 di θi 1 0 0 0 θ1 2-90 deg 0 L1 θ2 3 0 L2 0 θ3 18
Recall... 19 Transformations between from frame {i-1} to frame {i} i 1 i T = R X ( i 1 ) D X (a i 1 ) R Z ( i ) D Z (d i ) Rotation about Translation along Rotation about Translation along Xi-1 Xi-1 Zi Zi 2 3 1 0 0 0 60 cos i 1 sin i 1 0 7 40 sin i 1 cos i 1 05 0 0 0 1 2 3 1 0 0 a i 1 60 1 0 0 7 40 0 1 0 5 0 0 0 1 2 3 cos i sin i 0 0 6sin i cos i 0 0 7 4 0 0 1 05 0 0 0 1 2 3 1 0 0 0 60 1 0 0 7 40 0 1 d i 5 0 0 0 1 Net transformation = Product of four matrices 20
Aside: Screw transformation Screw = Rotation + translation about the same axis i 1 i T = R X ( i 1 ) D X (a i 1 ) R Z ( i ) D Z (d i ) = Screw(a i 1, i 1) Screw(d i 1, i 1 ) Rotation about and translation along Xi-1 Rotation about and translation along Zi 2 3 2 3 1 0 0 a i 1 cos i sin i 0 0 60 cos i 1 sin i 1 0 7 6sin i cos i 0 0 7 40 sin i 1 cos i 1 0 5 4 0 0 1 d i 5 0 0 0 1 0 0 0 1 21 Transformation from {0} to {n} 0 nt = 0 1T 1 2T 2 3T... n n 1 T Can compute various such transformations if we know all the DH parameters 22
Representation of a point P from {n} to {0} 0 P = 0 nt n P Why do we care about this? Because it is useful in computing the absolute position of various points on the robot. E.g., The position of the end-effector. 23 E.g., position of the gripper Say P is a point on the gripper, as shown below. L 1 L3 ˆX 3 L4 P Ŷ 3 " ˆX 3 Ẑ 1 Ẑ 0 ˆX 0 ˆX 1 Ŷ 2 Axis 1 Ŷ 1 Ŷ 0 Ŷ 3 Ẑ 3 Ẑ 2 Axis 2 Axis 3 L2 Here, it is easy to write down 3 P directly, because 3 P remains a constant as the robot moves, because the point P is attached to link-3 which moves with {3}. 3 P = [L 4 ; 0; L 3 ] 0 P = 0 3T 3 P Ŷ 2! ˆX 1 constant when robot moves changes when robot moves 24 P
i αi-1 ai-1 di θi 1 0 0 0 θ1 2-90 0 L1 θ2 0 1T = R X (0) D X (0) R Z ( 1 ) D Z (0) 1 2T = R X ( 90 deg) D X (0) R Z ( 2 ) D Z (L 1 ) 2 3 0 L2 0 θ3 3T = R X (0) D X (L 2 ) R Z ( 3 ) D Z (0) 2 3 Note that 1 0 0 0 R X (0) = R Z (0) = D X (0) = D Z (0) = I = 60 1 0 0 7 40 0 1 05 0 0 0 1 These are zero rotations and translations, and therefore drop out of the above expressions (its like multiplying by one). Therefore, we have: 0 1T = R Z ( 1 ) 1 2T = R X ( 90 deg)r Z ( 2 )D Z (L 1 ) 2 3T = D X (L 2 )R Z ( 3 ) 25 0 1T = R Z ( 1 ) 1 2T = R X ( 90 deg)r Z ( 2 )D Z (L 1 ) 2 3T = D X (L 2 )R Z ( 3 ) So 0 3T = 0 1T 1 2T 2 3T = R Z ( 1 ) R X ( 90 deg) R Z ( 2 ) D Z (L 1 ) D X (L 2 ) R Z ( 3 ) = some matrix expression in 1, 2, 3,L 1,L 2 3 P = [L 4 ; 0; L 3 ] 0 P = 0 3T 3 P Maybe use symbolic MATLAB for multiplication (see next page) This last expression gives the position of P in {0}, namely 0 P, given 1, 2, 3, even as the robot moves. THIS IS THE FORWARD KINEMATICS PROBLEM 26
% MATLAB program to find an expression for the end point position as a % function of the theta's clear all; close all; syms theta1 theta2 theta3 L1 L2 L3 L4; Rztheta1 = [cos(theta1) -sin(theta1) 0 0; sin(theta1) cos(theta1) 0 0; 0 0 1 0; 0 0 0 1]; Rxalpha1 = [1 0 0 0; 0 cosd(-90) -sind(-90) 0; 0 sind(-90) cosd(-90) 0; 0 0 0 1]; Rztheta2 = [cos(theta2) -sin(theta2) 0 0; sin(theta2) cos(theta2) 0 0; 0 0 1 0; 0 0 0 1]; DzL1 = [1 0 0 0; 0 1 0 0; 0 0 1 L1; 0 0 0 1]; DxL2 = [1 0 0 L2; 0 1 0 0; 0 0 1 0; 0 0 0 1]; Rztheta3 = [cos(theta3) -sin(theta3) 0 0; sin(theta3) cos(theta3) 0 0; 0 0 1 0; 0 0 0 1]; T_0_3 = simplify(rztheta1*rxalpha1*rztheta2*dzl1*dxl2*rztheta3); P_3 = [L4; 0; L3; 1]; P_0 = T_0_3*P_3; Assuming I 0 2 made no mistakes copying the complicated expressions, we have: 3 P = L 2 L 3 c( 1 )c( 2 ) L 3 s( 1 ) L 4 (c( 1 )s( 2 )s( 3 ) c( 1 )c( 2 )c( 3 )) L 1 s( 1 ) 6L 1 c( 1 ) L 4 1 (s( 1 )s( 2 )s( 3 ) c( 2 )c( 3 )s( 1 )) + L 3 L 4 c( 1 )+L 2 c( 2 )s( 1 ) 7 4 L 4 s( 2 + 3 ) L 2 s( 2 ) 5 1 You should probably verify and re-derive the above before using this in the homework solutions! 27 Can drop the one Some terminology 2 1 4 2 3 3 5 Joint vector Joint space : the space of all possible joint vectors, given the joint ranges of motion Given the joint vector, we can find transformations between any two link-fixed frames. 28
Forward kinematics problem - we ve just solved it - Forward kinematics: finding the position (and the orientation if relevant) of the end effector, given the joint vector - the θ s. 3 P = [L 4 ; 0; L 3 ] 0 P = 0 3T 3 P This is the solution to the forward kinematics problem for the non-planar 3R manipulator Forward kinematics: essentially equivalent to solving for 0 nt. 29 Forward kinematics problem - we ve just solved it - The orientation of the last link (often attached to the end e ector) is obtained by pulling out the rotation matrix part of the transformation 0 nt. Here, 0 3T. Forward kinematics: essentially equivalent to solving for 0 nt. 30
What else can we do with this ability to do forward kinematics? Compute reachable workspace if the θ s have some bounds, that is the manipulator has some restricted ranges of motion: As in HW-1, one way to compute the reachable workspace is to plot points 0 P for allowed values of θ. Perform animations of robots as the θ s change in a prescribed manner. Once we have drawn the links in some initial configuration, we simply use the various transformation matrices on every point on the link to obtain the new position and orientation of the link. Do this over and over, and we have an animation. 31 Next up Inverse kinematics (solving the reverse problem) 32
ME7752 - Prof. Manoj Srinivasan Inverse Kinematics In Brief Inverse kinematics Given the position (and perhaps orientation) of the end effector, find the corresponding joint vectors, namely the θ s.
E.g., Non-planar RRR from previous lecture L 1 L3 ˆX 3 L4 P Ŷ 3 3 ˆX 3 Ẑ 1 Ẑ 0 ˆX 0 ˆX 1 Ŷ 2 Axis 1 Ŷ 1 Ŷ 0 Ŷ 3 Axis 3 Ẑ 2 3 L2 Ŷ 2 Axis 2 Ẑ 2 3 P = [ L 3 ; 0; L 4 ] P 0 P = 0 3T 3 P Inverse kinematics: Find 1, 2, 3 given the absolute position 0 P (and 3 P ). Recall... 0 1T = R Z ( 1 ) 1 2T = R X ( /2) D Z (L 1 ) R Z ( 2 ) 2 3T = D X (L 2 ) R Z ( 3 ) i αi-1 ai-1 di θi 1 0 0 0 θ1 2-90 0 L1 θ2 3 0 L2 0 θ3 0 3T = 0 1T 1 2T 2 3T = some matrix expression in 1, 2,L 1,L 2 3 P = [ L 3 ; 0; L 4 ] 0 P = 0 3T 3 P These are 3 nonlinear equations in 3 unknowns, the θ s.
The general inverse kinematics problem usually involves the solution of a set of nonlinear equations in the joint variables. Such nonlinear equations can be solved in special situations. The book discusses some such special cases. We ll skip these and just briefly look at numerical methods to solve nonlinear equations in MATLAB (not in book). These methods are of course very generally applicable (not just for inverse kinematics), and therefore much more useful. Say we wish to solve the following two nonlinear equations in two unknowns:? Move x 1 = x 2 2 +3 x 2 = x 2 1 +5 to MATLAB, do linear equations first and then nonlinear, using fsolve Key MATLAB command / function: fsolve