Introduction to Robotics. Professor T. Asokan. Indian Institute of Technology, Madras. Department of Engineering Design. Lecture 2.6. DH Algorithm. Last class we discussed about the kinematic parameters of industrial robots. And we mentioned that there are 4 parameters. (Refer Slide Time: 0:21) The first one we called as joint parameter. Joint parameters define the relative position and orientation of two successive links. And they are the joint angle and joint distance. These are the two joint parameters. And they are defined as this is the joint distance and the angle at which it has to rotate is known as the joint angle. So, that is defined as the rotation about the z k minus 1 to make axis x k minus 1 parallel with axis x k. So, you have x k and x k minus 1 are the two, k and k minus 1 or the two coordinate frames, so x k and x k minus 1. So, how much you have to rotate x k minus 1. So, how much this has to be rotated to bring it parallel to this is known as the joint angle and that is with respect to the z k minus 1 axis. So, with respect to this axis, so, with respect to this axis, how much you have to rotate this, you are to make it parallel to x k is known as the join angle. And the joint distance is, so how much you have to move with respect to x z k minus 1, how much it has to be moved to make x k minus 1 intersect with x k and that is known as the dk or the joint distance. So, this joint distance and the joint angle completely define the relative position and orientation of these two links. So, that is how it is known as joint parameters that define the position and orientation of two successive links. So if you have any number of links, you can apply the same rule, you will be able to get theta k and dk, that is the joint angle and joint distance. So, this is what we saw in the previous class. And also I mentioned that, if you consider it as a single degree of freedom, either D or theta will be a available. So if theta is a variable, it is a rotary joint. And if D is a variable, then it is a prismatic joint. So one of these will be always constant, the other one will be a variable. So that is what we saw in the previous class about joint parameters. And then we discussed about the link parameters also. (Refer Slide Time: 2:38) So the link parameters basically define the position for position and orientation of two successive joints. So we have two joints here. So how these two joints are relative positioned and oriented is given by the link parameters. So one parameter is the link length, ak, the other one is the link or the twist angle, which we call as alpha k. So, these are the two link parameters, and they define the relative position and orientation of the two successive joints. And link length is the distance. So, link k connects k minus 1 to k and then x k, referred with respect to x k that is the common normal between the axis x k minus 1 and k and the are the parameters of link, link parameters are defined with respect to x k, that is the x axis of kth joint. And that would be normally a common normal between z k minus 1 and z k. So, x k will be always a common normal between z k minus 1 and z k and the parameters are defined with respect to that axis x k. Now how they are defined? The ak, the link length, we call this as the link length is the translation along x k needed to make z k minus 1 into z k. So z k minus 1 and z k, how much it has to translate along the x k. So, if this is the x k along xk how much this has to move and that is a two intersect the zk access and that is known as the link length ak. And twist angle again measured with respect to x k, if this is x k, twist angle will be measured with respect to x k, what is the rotation of z k minus 1. So, how much this k minus 1 which is like this how much it has to be rotated to make it vertical. So, in this case it is vertical, so how much it has to be rotated with respect to x k is basically the twist angle. So, twist angle alpha k is the rotation about x k needed to make z k minus 1 parallel to zk. So that is basically the twist angle alpha k, rotary joint, it is like this, this joint. The other one is this joint, so one is this, other one is this. So, you have a vertical axis, rotational axis and you have a horizontal axis. Now, the question is suppose this is x k, so, how much this has to be rotated to make it like this. So, that is the twist angle and how much this has to travel in order to intersect with this is the distance link length. Yeah. So, these are the four parameters. So, we have now A k alpha k and then we have theta k and dk. So, these are the four kinematic parameters associated with every joint. Pardon? which one? You mean acute in the sense. Now what you meant to say plus or minus or 90? You want you are asking whether it can be 60. See, technically it can be 60 or anything but normally we will make it into 90 degrees. The alpha will be normally multiples of 90 only, because then you can actually have either direction of motion. If you make it 60 or something and be you can still do it, theoretically you can do but your kinematics will be much more complex, because alpha or depending on alpha, you may not be getting the xy another degree of freedom completely. Because then you have a one joint like this and one joint like this and actually moving into a different plane. But if you make it 60 you will not be able to completely move to that different plane. So you may not be getting a full motion in that case. So normally we will make it as 5d or multiples of 90 you can have. No positive or negative depends on from which direction you are looking at. So it is convention is that anti clockwise is always positive. No, no no, I will tell you this is xk. Now you look from here, if you look from this point, x k. Now I am rotating it like this, so it is a clockwise motion. So it will be minus 90 sorry. Yeah, minus ninety, anti clockwise is always positive. So we start, I am looking for x k. And then it has been rotated like this. So it is more a clockwise motion. Therefore, it will be 90, minus 90 degree, anti clockwise is taken as positive. Any questions. Anyway we will be going through this because when you do the forward kinematics multiple of this will come. I did not get your question. No, no we are always saying z k minus 1 to zk. See, we are telling that make axis z k minus 1 parallel with the z k. So we are always rotating zk minus 1 to make it parallel to zk. So these are the four parameters and we saw that theta k or dk one of this will be variable, any one of this, one will be a variable and other will be constant. And this ak and alpha k for a given manipulator. Once you decide to design the manipulator, this will be constant you cannot change this because the robot configuration, whether it is a Cartesian or articulated or whatever the configuration, we will fix this, because the link length everything will be fixed for the design. So, once we have already designed the robots, then ak and alpha k will be constant. So, out of these four parameters, only one parameter will be varying for every joint, so, that can be either theta or d. So, it is a rotary or prismatic joint. So, that parameter only will be varying others will be constant for a given manipulator. So, that is the thing, out of the four, out of these two these are always constant, because they are part of the mechanical design. So, we have already designed it, so, the mechanical design decides what should be the link length and what should be the twist angle. So, basically where do you want the joint. You want a joint like this or like this will be always decided and what should be this length also will be decided by the mechanical design. And therefore, you will see that they are mechanical parameters and that will be always fixed for the given manipulator. And the only thing that you can change is this joint angle. So once you change the joint angle, then only the position varies. So if you want to change the position at this tip, then I can change any one of this angle, I can change this angle or I can change this angle or I can change this angle. Of course, this changes the angle I do not change the position but I change the orientation. So, this way always there will be only one parameter which will be varying, all others will be constant. Out of these four, three will be constant. (Refer Slide Time: 10:37) So, this actually shows an animation but I think I already explained all this to you. I am not sure whether it will work let me check. Somehow it is not working but do not worry. It is working now. So basically it talks about the getting the common normal and the x axis and then finding out the distance travelled in along the z k minus 1. So, this is along the z k minus 1 travel that is the dk and this is along the x k, which is the a k. And the angle between this axis and this axis is alpha, again with respect to measured with respect to this x. So these are sometimes known as DH parameters also, Denavit and Hartenberg parameters, because Denavit and Hartenberg, long ago they came up with their methodology for getting the systematic kinematic analysis of serial linkages. So they are called as DH parameters also. So we will be using these parameters in the forward kinematic analysis. (Refer Slide Time: 11:57) So to summarize, we have theta, d, a and alpha and this will be variable for revolute joint. And if it is a prismatic joint and all others will be fixed. So for an n axis robot. So now we know that for each axis, you will be able to get the four parameters. So when you have a n axis robot, you will be having four n parameters associated with the robots. So, if you have a 6 axis robot, you will be able to see you will be able to get for 24 parameters as part of the kinematic parameters of the robot. For each axis we will be having these four and these parameters will affect the position and orientation of the tool. When you have multiple joints, each parameter will be having its own influence on the final position and orientation. So the question is, how do we actually get the final position or how do you get the kinematic configuration of the robot and that actually will be getting by this. So, these 6 n parameters, sorry 4 n parameters decide the kinematic configuration of the robot. Any question on the parameters, the kinematic parameters? Yes. Numbering in the sense k. Oh yeah, we are coming to that. Now we will be discussing about how do we actually systematically assign the, find out the parameters of a n degree of freedom robot, will discuss that, it is part of the kinematic analysis. (Refer Slide Time: 14:05) So before going to the kinematic analysis, just want to tell you this. So we mentioned about the three angles that we can represent as the orientation, yaw, pitch and roll. So this yaw, pitch and roll basically represented in terms of three angles, but we can actually represent it as a, each one as a vector also. So the configuration of the tool in Cartesian space is normally represented using a 3 by 3 matrix. So the orientation, so we will be having one vector here, another vector here, the vector here. And this one we call as the normal sliding and approach vectors because these YPR, yaw, pitch and roll change the orientation, and the orientation can be represented as a vector, and they are the normal sliding and approach vectors, N S and A. So the approach vector is along the z axis and this is along the y axis and this is along the x axis. So that normally is the x axis, with respect to x axis and this is the y and this is z, so that is the normal sliding and approach vectors. So normally if you want to specify the orientation of a tool in Cartesian space, what we do is we will write it as nx, ny, nz, similarly sx, sy, sz, ax, ay, az. So, this is the orientation that we can specify in Cartesian coordinates. And if they are aligned with the base frame, then you will be getting it as 1 1 1 0 0 0 0 0 0. So, if the tool frame and the base frame are aligned, you will be getting it yes 111, if they are not aligned, you will be getting this kind of a matrix non zero elements here and that depends on how much you have rotated, the coordinate frame is rotated with respect to the axis or yaw, pitch and roll. So you can represent either using the angles or using a vector like this. That is where so most of the time will represent the final orientation that we want the tool to have in terms of these vectors. And then we will try to find out what joint angles will actually give you that kind of motion. So, once you understood this, what we need to do is to go to the, so I already mentioned these things so it is not clear. So approach vector is aligned with the roll axis. And sliding vector is orthogonal to the approach vector and yaw, pitch roll motions or motion rotation about normal sliding and approach vectors. That is what this one says. (Refer Slide Time: 17:00) So we found the, I mean, we saw how to get the configuration of a robot based on the type of joints and the number of joints. And then we saw what are the parameters that actually will define the kinematics of robots. Now, the question is, by knowing these parameters, how do we actually develop the forward kinematic relationship or the kinematic relationship? So, first we talk about forward kinematics and then we go to the inverse kinematics problem. So, as I mentioned in the previous class. (Refer Slide Time: 17:31) So, I already mentioned about this direct or the forward kinematics problem. So, given the joint variables of a robotic manipulator, now we know what is joint variables because we define the parameters and we found that either theta or D can be a variable. So, if you know these joint parameters corresponding to each joint. So, if you have an n axis then you will be n joint variables. And if you know these joint variables how to determine the position and orientation of the tool with respect to a coordinate frame attached to the robot base. So, this is the basic forward kinematics problem or the direct kinematics problem. So, what we know is theta and of course, we need to develop or formulate the kinematic problem in such a way that though the 6 n parameters are involvrd. So, we know that 4 n parameters are involved totally out of these 4 n we have only n parameters varying. So, the other 3 n parameters will be constant. So, if we know these 3 n parameters, we can have a formulation where these parameters can be assigned, then you will get the final relationship for the forward position of the robot. That is what we need to develop. So, how do we do this? So, we need to have a very concise formulation, the general solution to the direct kinematics problem. So, for any robots, what are maybe the configuration of the robot, we should be able to develop this relationship raised on the parameters that we identified. So that is the a concise formulation, which we call as the forward kinematics relationship, or forward kinematics problem or directly kinematics problem. (Refer Slide Time: 19:15) So how do we do this? Suppose we have a robot configuration given to us, first thing, what we need to do is to assign a coordinate frame to the robot. So, the problem is that suppose this is the tool and this is the base of the robots, so I can fix the face somewhere. I want to know for different joint variables of the theta, I call the generalized variable as theta for various values of the theta, what will be the position and orientation of the tool is the problem that we are trying to address or trying to formulate. So, as a first step. So, we call this as the Denavit and Hartenberg representation. So, that is the method we will be following Denavit and Hartenberg or DH representation. So, the first step to do is to assign coordinate frame for all the joints because we know that when this joint is moving all this gets affected, when this joint is moving all this gets affected and with respect to the base the position changes with respect, i mean whenever there is a change in any one of these variables. So, to take care of all the joint variables, what we do? We try to assign coordinate frame at every joint. And finally, we try to find a relationship between this coordinate frame and this coordinate frame using coordinate transformation matrices and get the relationship. So, suppose this is the robot configuration given to us, what we do is we will try to make a simple free body diagram and say that it is a home position of the robot because robot can take any position this angle can be anywhere this can actually change. So, it can be in any position, it can be like this, it can be like this or it can be like this. So we consider home position and then try to assign the coordinate frame. So, what I will do, I will assume that there is a joint here and there is a link here then I know there is a joint here and then there is a joint here and there is a joint and like this and then I finally say, this is the robot configuration. So, I will make a home position, it can be any position does not really matter, you can actually have whatever. If you want put it like this, or you want to put it like this you can have. So, I will have a home position like this and then try to assign coordinate frame for this configuration. So, first one is I will assign a, okay this one i already explained. So this, we call this, we number of the joints from 1 to n, starting with the base and ending with the tool, yaw, pitch and roll in that order. So we say that, this is J 1, this is J 2, J 3, you can write 1, 2, 3, 4 etc. That is the joint and the last joint will be nth joint. So, if you have 6 degrees of freedom you will see that 6th one is the roll axis. So the roll joint is the 6th one or the last one and the 1 to n. So start with J 1, J 2, so this is 1, 2, 3 etc. That is the first step. Now, so I will remove this. Now given the link numbers also. So, we will start with the link 0 and link 1, link 2, link 3, etc. So link 0, 1 and 2 connected by joint 2 like this. Now, see, the robotic researchers follow different styles. Someone put this as link 1 and then put as link 2 also. So, if you are following a particular convention you can keep following that, but if you have followed some other convention then you need to keep following that. Finally, the results will be the same, whatever maybe the link number you are taking the results will be the same. So, for example, if you refer Craig, Craig is the book or you refer Schilling, there will be some difference in the way the coordinate frames are assigned and the numbering is done. So, I follow the Schilling convention that is why I am doing this link 0, 1, 2 etc, but if you follow Craig there may be slight difference, but the formulation, final formulation will be the same. So, but try to follow one of these otherwise, you may find it difficult to mix of the things. Now. So, J 2, J 3 etc., we will have till J 6 whatever it is. Now, first thing to do is to give a base coordinate frame assignment. We need to assign a base coordinate frame based on your convenience, you can have it as whatever way you like, but you need to follow the right hand rule. The right hand rule is that if this is x, then this is y and this is z axis. So, this is known as the right hand rule. So, you always follow the right hand rule for assigning coordinate frame. So, if I put this as x, so, this is x 0, z 0, y 0 will be inverse or it will be. So, you will always follow this rule. So, if I fix this as x, y, z then it will be easy for us to analyze it later also how the rotations take place. So, yeah, this is my x axis, this is the z axis and this is the y axis. So, first thing is, so we will call this as the base coordinate frame and we call it this is l0, there is a base coordinate frame l0. So assign a right handed orthonormal coordinate frame l0 to the robot base, making sure that z0 aligns with the axis of joint 1, that is very important. So, you do see what is the axis of rotation, here you can see the axis of rotation with respect to this the first joint rotates with respect to this axis. And therefore I will align the z axis along that and then x axis, I can take x axis this direction or this direction, any direction. For my convenience I taking towards the opposite to the direction of the robot, just for convenience only, so that I will get it as a positive value for the position. But you can actually decide x0, whatever way you would like to do it, preferably to take it in the positive direction. So, this will become x0 and then y0 indicates you will get. So you know how to get the z axis and then x can be decided based on your convenience, then you get the y axis. I said k is equal to 1, so this is l0, x 0, y 0, z0. That is the base coordinate frame l0. Now, k is equal to 1, we get the coordinate frame l1, so we need to get l 1 as the next coordinate frame. And the next coordinate frame basically represents the joint 2 or with respect to what point the joint 2 rotates. So we are defining a coordinate frame l1. So let me remove this, okay that is z0, x0 and y 0 frame. So the first thing is align the z axis with the joint axis and then get x and y based on the right handed coordinates frame. The next one is align axis with the axis of joint k plus 1. So now find out what is the next z axis or z 1 and align the axis of joint, I mean zk with the joint k plus 1. The joint 2 is 1. So we need to find out what is the joint axis here. What is the joint axis? Inward or outward. You can take any direction you can take outward or inward. So I am taking for the time being I am putting it like this. So I will say this is my z1, that is the z1 axis. Now, we need to find out the origin of the coordinate frame l1. So, this is part of l1, but the origin need not be at the joint. So, there is no need to have the origin of the coordinate frame at the joint, it can be somewhere else also. So, to get the origin, what we do is we try to find out where this z0 and z1 are intersecting, where z0 is intersecting with z1. And that will be the origin of the next coordinate frame. So, locate lk, so now k is equal to 1, so, locate l1 at the intersection of z k and zk minus k. So, z k and z k minus 1 intersect at this point and therefore, your origin of l1 will be that point. So now we got the origin and the z axis, so the next question is you need to get a. In case they are not intersecting find a common normal between z k and k minus 1 and see where z k is intersecting with that common normal. So if they are parallel, we will see that case next case. So if they are parallel, they are not intersecting, that you find a common normal, and then see where zk is intersecting with that common normal that will be the origin of the coordinate frame. Can we have? You mean when can we have such a situation? No, no, see look at this joint. I am coming to that so, I do not want to jump to that. We will see that case where actually they are parallel. So, lk we fix the origin of l1 and we identified the z axis also. Now, we need to find out what is x1, what is the direction of x1. So, x1 should be always normal to, orthogonal to look z0 and z1 that is a requirement. So, xk to be orthogonal to post zk and zk minus 1. So, now, this is one direction, the other one is in this direction, so, it has to be in this direction only, x k should be along this direction. Because it should be orthogonal. So, your z0 is this direction and z 1 is in this direction. So, it has to be x k should be this direction. So, your xk will be this direction and then now you have a xk. So, this is xk yeah, this is xk, this is zk and therefore, your yk on the right handed rule y k will be like this. So, yk will be this. So, your y axis will be like this. So, x1, z1 and y1 you identify the coordinate frame. So, always follow the right hand rule, then you will always get it. Just now your z is like this. So, this is the x is and then y will be downwards. And again they are parallel point xk away from zk minus 1. So, they are parallel, move it out of focus, both will be the same direction if zk and zk minus 1 are in the same direction, then away from this you point it, that is the direction you can take. So, we found that we can follow this algorithm to get the first joint and its coordinate frame and then the second one joint and its coordinates and can you obtain. Now, we can follow the same thing, change k is equal to 2 and you will be again getting that next one. So, you can keep on doing this till you reach the last one, the last one we will do it in a different way. So, till k is equal to, so yk from right-handed coordinate frame lk and then set k is equal to k plus 1 and as long as k is less than n, go to step 2, continue. So now, suppose I want to get l2, l2 is the next coordinate frame, that is at J3 you have l2. I do not know where actually l2 is, but I know coordinate frame is l2. So, I need to find out the coordinate frames associated with the joint 3. So, what will I do? What is the first step? First step is align zk with the axis of joint k plus 1. So, what is the joint axis here? Assume that this is the same kind of joint, so, I will be having z2 here. Yeah, see when you say it is outside basically I am telling it is 180 degrees apart. My z axis is rotated by 180 degrees. I can take this, this direction or this direction it is optional, but normally we try to reduce the rotation in the frame but you can still have it as this direction or you can even assume this direction nothing wrong in assuming this direction. Basically I am telling, here I am telling there is no rotation, if it is this direction I am telling there is a 180 degree rotation, z x, between two z axis, z1 and z 2 180 degrees apart. So, we got the z axis. Now, we have to find the origin of the coordinate frame. How do you get the origin? Intersection of z1 and z2. So, you want to find out the intersection of z1 axis and z2 axis. Where is the intersection? There is no intersection. So what will we do? Because they are parallel. So when they are parallel, what is the strategy, common normal. So, you find a common normal and then see where the common normal intersect z2. So the common normal will be always this and it intersects here and therefore, your origin will be l2. So, that will be the origin l2. Now, you assign x axis, and because x should be away from z1 because they are parallel. So, x should be away from z 1, so we make this as x2 and then do the same as y2. keep on doing this till we reach k is equal to 6. So, if this has 6 degree of freedom so k is equal to 6 we got follow this, tell k is equal to 5 we will be able to do this. So, we will be keep on assigning the coordinate frames like this. And when k is equal to 6 you have to follow a slightly different one, basically that is the tool points coordinate frame. The last one will be the tool point coordinate frame because l0 is the first joint, so l6 will be the last point, it is the tool point coordinate frame. (Refer Slide Time: 36:13) So this is the way how you get it and the last one, set the origin ln, that is the l6 that is the last origin of the coordinate frame, last coordinate frame at the tooltip set the origin at the tooltip. So, I will set the origin l0 or l6 at the tooltip, l6. Align z 6 with the approach vector. So, the approach vector is the roll axis. So, if this is rotating or rolling, then this will be my z axis, that is the z axis. last one, l6 or l5 depending on the number of joints, if there is a 5 degree of freedom, then it will be different 6 degrees of freedom. But n is equal to 5 or 6 depending on there is a 5 or 6 of freedom robot. Then approach vector yn with the sliding vector. So, the sliding vector is this, so the open or close section is known as an sliding and the normal 1. So, based on the xyz, this 2, y and z you will get the x also using the right handed coordinate frame, coordinate rule. So, this way the last coordinate frame will be decided based on approach vector, sliding vector and the normal vector. So, z, y and x will be approach, sliding and normal vector. So, that will be decided based on that other rules. Till then we will follow the rules what we discussed and the last one will be assigned like this. So, finally, you will be getting the point, all the coordinate frames assigned. So we will get to how to coordinate frames assigned like this. That is our first step in getting the DH formulation for forward relationship. Any questions? No, it need not be a unique one. The assignment of coordinate frame need not be unique, but the final formulation will be unique for that particular robot. Whatever you do your alpha, theta d and all will decide how you do. For example, instead of this direction if you have decided in this direction, this alpha will be 180 instead of 0 and that will actually affect your final calculation. So, that way you can have different assignment of coordinate frames and your DH parameters also maybe slightly different because of that, but the final result will be the same. See this is not complete because it is actually a 5 degree of freedom robot, I have just shown only 3 joints here. 2, yeah, yeah. So that is why I am telling if it is 5 degree of freedom then it will be l5 that will be coming at the frame. But assign coordinate frame will be assigned based on this. Whatever maybe the number of degrees of freedom available, which is only 2, but still we need to have a coordinate frame with xyz coordinates. Because the final orientation depends on the way it is oriented with respect to x y z axis. Any other questions? So, now, the final requirement is that we need to find out this position. So assume that this is the tool position we are interested, we need to know how this actually moves with respect to this.
Invieremo le istruzione per resettare la password al tuo indirizzo mail associato. Inserisci il tuo indirizzo mail corrente