Transcript for:
Understanding Forward Kinematics in Robotics

so going to this definition wise forward kinematics given the individual joint displacements displacements in case of prismatic joints and joint angles you already know what are the angles where your motor lies okay so how much is the link to making with respect to link one link three is making with respect to link two and so on so forth okay you know all the relative angles solving for end effector pose using these are known as forward kinematics you solve for both you solve for position where you are and you also solve for orientation how you are how you are oriented with respect to the ground going somewhere doesn't help you because let us say you want to pick up a glass which is there on a table you know your you have to hold it like this you cannot hold it vertically right so you have to orient your grab your palm in such a manner so that you can grasp the glass firmly and easily okay you have to go there first of all that is position and you have to orient it properly so that you can hold it right so that is what is forward kinematics which solves for the both position and orientation what are the inputs inputs are the kinematic structure of the robot itself that means now the link length link parameters how if it is twisted yes that is there okay and the joint angles okay so those are the input parameters so steps for forward kinematics involves links joints and their parameters that you have seen now okay denovate hartenberg representation this is something which is one way of doing it there are many others which are there in the queue okay people use different way like in computer graphics we can directly find out the end effector position by doing forward kinematic transformation transformations you saw i know what is this frame the base frame of the robot you already know this is grounded okay this is grounded and robot is fixed to that ground okay and then you know what is the location of your second link start then you also know where is your third link is starting fourth link fifth link sixth link okay so you know different transformations you know the link length how much you have to translate and then you know the twist of a link how it is twisted okay so that twist angle is also known that means rotation is known so given twist twist will have some different meaning later on okay so we'll just call it rotations of a link or just the angle how much it is twisted okay so that is the rotation which transforms from one frame to the other so a link will start from a frame and end to a frame and there will be a translation between them and there will also be rotation between them if you know the link structure you can directly go from one frame to the other okay initially what is the ground frame ground frame will have a coordinated coordinate given by zero zero zero that is the ground origin and one you know in homogeneous system you write point like this p x p y p z and one okay that is what we have done in transformations also you already know that okay so this is all so this is your first point you know this point now have to transfer to this transfer to this from here it has to be transferred to this and finally to the end effector that means you have multiple translations and rotations using that you can reach there once you reach there you know this point with respect to the ground frame okay so that is what is forward kinematics we can do directly using translation and rotations but yes dynamic hardened work parameter is a four parameter representation of forward kinematics and that is very helpful normally translation or orientation matrix has nine elements minimum okay what are they if you remember your homogeneous transformation matrix a three cross three matrix is there that represents rotations so nine elements are here and then three elements were here one two and three which represented translation and then you had zero zero zero one so you see you need so many parameters to transform from one place to other that means you need at least this 9 and this 312 12 parameters so ds parameter reduces that to just four parameter representation to do this this transformation okay which is very very easy to handle so that is the reason dh comes into picture computer graphics people they are happy with doing things using this okay they have very good gpus to do the things gaming pcs are there gamers they use this okay mobile devices at times they also use this sometimes they also use dh parameters for represent we will see as it comes okay i hope you are convinced that a transformation can also take your ground coordinate to the end effector coordinate provided you know the structure of your link and joint angles if you know those angles series of transformation going from ground to the next frame next frame next frame till the end effector if you know that you can do it but yes we won't be using that okay knowing dh parameters we'll try to figure out how our forward kinematic equation will shape like okay we'll see that and we'll finally do forward kinematics to find out the end effector position so this is how we'll move okay going next okay very very important how a link frames are placed okay link has a frame on which link itself is placed this is frame i minus 1 why this is i minus 1 this frame is located this frame is located at the end of the link which comes prior to this okay there are series of links first link second link both are connected together and you can move like this okay so so this is the joint so this frame i minus one frame is placed at the link which is i minus 1 at the end of that it is there okay so link itself will have its own frame which is over here and this is ith frame link ith frame is placed to the ith link okay so there are different parameters which are there first parameter is the distance between a first thing that you should note yes is the z-axis z-axis is always let us start with the rotation axis if this is the axis of rotation okay where next link rotates with this link link i rotates with link i minus 1 about this axis so this is where you measure something which is known as joint angle this is theta i which is given here okay and the distance between two different z-axis there is also an axis here distance between these two minimum distance between these two which is perpendicular to both of them okay it is perpendicular to both of them this distance is the link length so if you have a link you have a link it starts with a joint ends with a joint both the axises are always z-axis both the axises are always z-axis okay distance between those two z-axis is known as link length noted here as a and then theta i is the joint angle that is link i rotates with link i minus 1 by an angle which is given by theta i okay so link length joint angle and then there is something which is known as joint offset that means let me clear a bit over here okay joint offset what it is basically this link it has its frame okay oh so okay so what you see it has its own x axis what is the x-axis x-axis is taken perpendicular to both the z-axis one z-axis is here another one is here so perpendicular to both of them is x-axis and distance measured along x-axis is the link length okay so this has its own x-axis then this frame will also have its own x-axis the distance between that these two x-axis is known as joint offset both the joints are collocated by some distance which is known as joint offset we'll see directly in by an example in one of the robot that we'll see okay so what all parameters that make up dh parameters first is link length ai okay joint offset di joint angle theta i and angle between those two z axis that means your link is not straight it is twisted it is assumed it is twisted okay so that is the angle alpha i this is twist angle okay this is known as twist angle so you have four parameters to define the structure and position of a link a link with respect to the previous link also what all things which are associated to a link and that is not going to change first the joint if it is offset it will remain that offset throughout okay so this is the offset which is not going to change link length is not going to change okay if link is twisted it will remain twisted forever okay so that twist angle is also not going to change so what will change here is joint angle if it is a revolute joint joint angle will change but if it is a prismatic joint d will change in case of prismatic joint d will change okay so this d can also change that is in case of prismatic showing okay so you have four parameters those are d theta a alpha d is the offset theta is the joint angle these two are joint variables depending on prismatic or revolute joint a and alpha link length and link twist link length and twisted links cannot change with time that defines the structure of the robot so let us see summarize this d i is the distance of origin of i minus 1 coordinate frame to the intersection of z i axis with x i along z i minus x axis let us draw once again to make it make things much more clearer you have a joint a link is there a link is there you have another joint okay you may be having a link which is here okay this has its own structure okay so this link comes like this okay because this is the revolute joint so this becomes a z axis if this is i minus 1 ethylene this frame will be i minus 1 frame okay i show it like this this is i minus 1 is frame okay and rotation axis becomes said i minus 1 okay zi minus 1 got it so this is your zi okay now let us put let us say there is another link that follows this okay so this link this link is ith link this link is ith link this will end with a frame ith frame okay and it will have its own z axis on which i plus 1 link is placed i plus 1 at link is placed okay so this is what this is ith frame okay so it is zi so say it very clear i minus 1 link is there on which ith link is placed okay i minus 1 ends with a frame which is i minus 1 at frame it has its axis which is zi minus 1 okay about which the link i rotates about which this link rotates okay so this is theta i this is theta i and then this link will also connect to another link i plus 1 you have another frame zi minus 1 and you have some link relative link angle if it is look from the top it may be visible like this and there is an angle which is theta i plus 1 okay so this is ith frame placed at the ith link end okay ayat link is placed at the ith link end i minus one frame is placed at the i minus one at length and okay link i makes an angle theta i with i minus 1 frame okay now where are different parameters so this the link of straight line perpendicular to z i minus 1 and z i okay this will give you x i axis okay so this is basically x i minus 1 okay so x i axis sorry this will be x i axis this will give you x i axis okay so it goes from i minus from one frame to ith frame okay x i and it can be given as x i because this was ith frame so this is x i this is z i and perpendicular to x i and z i will be y i okay so you have to make it like this so y i is not very important what is important is x i x i is a common perpendicular to z i minus 1 okay common perpendicular to z i minus 1 and z i okay so that is x i got it this is ith frame and zi is given p giving pivot to the next link which is coming connected to ith link okay so what is this so this axis will be x i minus 1 got it this is x i minus 1 this is z i minus 1 perpendicular to x and z will be y i minus 1 okay so now what are offsets d i d i is the distance measured along z axis between i minus 1 and i okay i minus 1 and i so this is d i d i is the distance measured from the origin of the i minus 1 coordinate frame this one okay to the intersection of z-i axis okay so if you take a x-i axis so this distance is d i okay so what is this distance this is d i plus 1 d i plus 1 so this is what this is distance measured along i plus 1 frame okay along z axis d i okay along z i so this is d i plus 1 so anyway we'll see as it comes don't worry don't be in a hurry so what all things which are there and one parameter that i have left angle between z i and z i plus 1 sorry over here it is z i and z i minus 1 will be alpha i that will be given as alpha i that is the link if it is twisted so that twist is taken care of by this so z i minus 1 and z i that defines the structure of the link i given by angle twist angle alpha i so you have theta i you have d i you have alpha i and you have a i that is the link length link length is the distance between these two z-axis so that is this one okay so link length link twist that is not going to change with time what is going to change with time is theta i and d i d i if it is prismatic theta i if it is rotary joint okay i hope this is clear we'll see again uh when it comes to one of the robot that will cover okay so let us move ahead by practice you will come to know so these are different parameters that i have explained just now these are the four theta i this is in syntax in sentence the same thing is written theta i is angle measured from x i minus 1 axis to x i as you have seen here ok as you have seen here x i this is your x i 2 x i minus 1 okay so if you see from the time top x i and x i minus 1 this is i minus 1 this is i so this becomes theta i okay so that that you can see and then a i is the distance between z i minus 1 and z i okay this is distance measured along x axis along x axis so that is the link length and then twist alpha i is angle measured between zi minus 1 and zi both the link axises are twisted with respect to each other and angle alpha is measured about x i axis okay so we'll see uh as it comes again these are the four important parameters which are known as dh parameters okay so these are the four transformation also okay so as you see a i and alpha i is not going to change okay this distance determines the structure of the link what is going to change is d i and theta i that defines the relative position with respect to the neighboring link okay theta i is the angle d i is the displacement d i is the displacement okay so these are the two important pairs which are very very important and these are the four transformations which are happening sequentially one after the other let's see how it happens okay so matrix method for doing this will be a systematic establishment of link coordinate system we have seen we have already established two coordinate systems i minus 1 and ith frame okay and this link going from the starting frame to the ending frame will be represented by a 4 cross 4 homogenous transformation matrix that relates ith link frame to the i minus 1 coordinate frame okay that relates a link transformation that means if a link starts from a frame i minus 1 goes till i so there is a transformation matrix i that basically takes a point from here takes your frame from here to the end point okay that is a 4 cross 4 homogeneous transformation matrix which takes you from this location to this location so if you can do one transformation if links are fitted one after the other okay so you just take product of those so that you can go from this to this this to this this to this and so on so forth till you reach to the end effector frame okay so thus the end effector may be expressed with respect to the base o okay when joint actuator activates i i will move with respect to i minus 1 okay ith coordinate system with respect moves with respect to the coordinate system i minus 1 okay that is the link i moves okay zi okay so so this is how it works we'll see what all four transformation in terms of matrices now okay once dh parameters are assigned to a robot will assign it will show you one by one starting from one link two length three link four link right up to the six degrees of freedom robot don't worry that is the four example five examples that i was talking about okay those examples will do things will be very very clear one by one okay so don't worry now once dh parameters are assigned you have to assign different frames to link all the links okay once that is then done you find out the homogeneous transformation matrix okay one by one for each of the link multiply them together so that you get till the end effector okay so first is rotation first transformation is the rotation transformation what it does it rotates it rotates the link with respect to zi minus 1 by an angle theta i okay so your frame x i rotates with respect to frame x i minus 1 looking from the top this was your frame okay z i minus 1 okay connected a link it has its own frame zi okay and this is your link i minus 1 this is your link i okay link i minus 1 and this is your link i this is your zi minus 1 about which link i is going to rotate and it ends with a another frame that maybe it is connected with the next link forget about that so now this is the angle this is the first angle which is known as theta i so this is the first transformation that is happening okay that is rotation about z i minus 1 rotation about z i minus 1 by an angle theta i that rotates this link i with respect to i minus 1 this is first transformation going to the next transformation now okay now translation is there what it does it translates by a distance d i along what along an axis about which link i is fitted that is zi minus 1. so now i'll draw the links like this okay this is your zi minus 1 this is your zi minus 1 you have another link which is connected like this okay that ends with the another axis z i okay zi is the frame which is attached to ith link i minus 1 at link is here so this is z i minus 1 just now we saw the top view of this so you have an x axis like this this is x i as i have said this will form x i distance measured between these two will be linked length that is here forget about that so now there must be an axis which is like this okay this is x i minus 1 x i minus 1 so now distance between x i minus 1 and x i measured along z i minus 1 so this distance is d i so this is the next transformation this is translation along z-axis okay so first thing was looking from the top as you have seen is rotation okay now looking from front you can notice there is a distance between these two x i axis x i axis is attached to the link axis okay link along the link okay that so distance between those two is d i okay this d i okay so their links are connected like this that is moving like this so this is d i this is second transformation now third thing will come in okay translate x i to a i by a distance a i to bring it to the next axis that means as you can see from here you have to first transformation was rotation transformation that is theta i which is rotation about this axis next transformation was d i that takes you from this point to this point okay next transformation is you have to move from this point to this point this is translation along x axis this is translation along x i axis by a distance that is equal to length length okay that is equal to link length so you move like this you go till this point okay now you have reached to this point okay what was that this is a translation along x i axis by a distance a i to bring the two origin as well as the x axis to coincidence okay so x axis that moves to the end to next frame okay so this is nothing but translation along x axis so first was rotation by an angle theta i about z axis next is displacement about z i minus 1 by a distance d i this is offset known as offset this is joint angle okay this is joint angle okay okay next parameter which is again very important is the last one okay what it does basically you had two axis zi minus 1 connected to next axis zi okay now these two axises are not parallel okay they have some twist that means this link is not straight now okay this link is twisted that means because this was x i so it is twisted about x i axis if you take it like this you have to rotate like this so this is your angle given by alpha i okay this is basically the twist angle of the link twist angle this link is twisted so both the z axis will be twisted by an angle alpha i about x i so that is the final d h parameter so you got all the four i think first is d axis okay first is this joint angle okay what is that that is theta is okay the first axis is theta i that is axis of rotation okay next is d i that is the translation about zi minus 1 next is displacement about the link length along the link length that is about x i axis final one is the twist that is rotation along the linked line that is x i axis so four translate two rotations are there two translations are there that will happen one after the other so first is this d i u c okay that is d i about this next is theta i about same z i minus 1 z zi so you see translation about zi will come here translation along x translation along y translation along z okay there is no rotation so translation along that y d i will be denoted like this this is rotation about an angle theta i okay rotation about an angle theta i this is z i minus 1 so z i rotation about z i by angle theta i so it is theta i okay next is displacement along the link length by a distance a i about x i so there is no rotation only translation along x axis by a distance a i so it is given by this final transformation is the twist axis final transformation is twist axis so what is that this is twist by an angle alpha i twist by an angle alpha i about x axis okay about x axis so cos minus sine sine cos about x axis so this is the rotation so sequentially first operation second operation third operation and the fourth one okay so these are the four operations which are there okay and because all these are happening about global frames okay that is the fixed frame so how will do it will be post multiplied so it is pre-multiplied okay so this is first transformation second one third one and the fourth one post multiplication because all the next axis is placed on the previous one okay so this is the first one this is the second one this is the third one fourth one finally if you multiply them together okay you get what this is the link transformation what it does it takes you from this frame to this frame then it takes you from this frame to this frame straight away okay so if it is i minus 1 so this is i frame okay so this is the transformation matrix i given with respect to i minus 1 and this is it so this is what four parameters can do you have nothing but four parameters from now and on you don't need to mug up anything else the steps how we reached here only this is important what all things it has it has link length it has joint offset it has linked twist and the joint angle okay in case of rotary joint only variable that is there is theta i okay in case of prismatic joint only variable which will be there is d i okay that will be the joint variable left everything will form the structure of the system of your particular link that means if you go from here to here if next link is there in sequence okay you go from here to here again you will have another transformation matrix let if this is a 1 this is a2 so there is some joint variable in between it may be a theta i in between or theta i plus 1 okay so whatever it is so this is your connection that is the variable and these two are the translation or transformation matrix okay this one will take you from here to here next one will take you from here to here got it so this is how it works we'll see again how it works using one of the example next okay these are some of the notes if you have link placed one after the other whatever you can do is you can simply take product of all those okay first link is placed at the ground okay next link will be placed on top of this next link will come like this third link will come like this so ground frame is zero this frame is one this frame is two this frame is three this frame is four and so on so forth so what will happen first transformation will take you from this to this next transformation will take you from this to this next transformation will take you from this to this finally you will have a final transformation that takes you from this to the end effector if at all it is just a four link way if it is more you keep on multiplying you reach to the end effector so that is how it is done if it is just a prismatic joint link length is 0 and this term becomes 0 and you are left with just di okay as in case of this if a i is 0 this is there okay so that is in case of prismatic joint there is no link length one link slides over the another link okay and then there is this is the first axis next axis is like this so there is no distance between two z-axis okay i minus one and z-i there is no distance between two that is a i is equal to zero because this and this are along same axis coaxial okay so the distance between those two that is a i becomes equal to zero so this becomes equal to zero and d i is the only thing that is going to change d i becomes variable okay both the z slides over one another so that is what is given like this so this is your link transformation matrix okay now that you know this you can reach anywhere you can reach anywhere got it so what we'll do now we'll simply stop here in next class we'll continue for