Loading

Alison's New App is now available on iOS and Android! Download Now

Study Reminders
Support
Text Version

Set your study reminders

We will email you at these times to remind you to study.
  • Monday

    -

    7am

    +

    Tuesday

    -

    7am

    +

    Wednesday

    -

    7am

    +

    Thursday

    -

    7am

    +

    Friday

    -

    7am

    +

    Saturday

    -

    7am

    +

    Sunday

    -

    7am

    +

Introduction to Robotics Professor T. Asokan Department of Engineering Design Indian Institute of Technology, Madras Lecture 2.10 Inverse Kinematics Good morning, welcome back. So, we will start the discussion on Inverse Kinematics today. In the last few classes we talked about the forward kinematics, starting from the coordinate transformation matrix and how do we go to identify the DH parameters and then using DH parameters how do we get the transformation matrix and then use it for forward kinematics analysis. And we saw few examples in the last few classes and see how to use the forward kinematics for getting the position and orientation of a manipulator that can be expressed as a function of the manipulators parameters, the joint parameters as well as the link parameters that is what we discussed. So, today we will start the inverse kinematics problem by briefly explain to you what is inverse kinematics problem. So, we will see the details of this problem and how that can be solved for manipulators. (Refer Slide Time: 01:16) So, what we are going to cover in this is basically the problem definition, so we will try to define what is the inverse kinematics problem all about. And then we will see something called solvability, so it is not that necessary that always the inverse problem can be solved, so it can be solved under certain conditions only. So, we will see the existence of solutions and then the problem of having multiple solution, so some cases there would not be any solution and some cases there will be multiple solutions, so we need to see what is that solvability. And then we look at the solution strategies, there are different strategies to solve this, so we look at the closed form solutions, either algebraic or geometric solution and then we look into the, I mean then there is another method called numerical solution, we will not go into the details of numerical solution just for to tell you that that also is a method for solving inverse kinematics, but we will be talking only about the closed form solution. And then we go into the velocity relationship, of course that is not the inverse kinematics part, so we look into the velocity relationship, that is the relationship between the joint velocities and the tip velocities, there we discuss about the Jacobian and the singularity. And finally, we will talk about the statics also, so the force relationship under static condition. So, that is going to be the discussion for the next few classes. (Refer Slide Time: 02:50) Now, we already mentioned about the inverse problem, what is the manipulator inverse problem. As you know the manipulator tasks are normally formulated in terms of the desired position and orientation, so as I told you, so I have an object here, I have an object here, this is an object, now I have a coordinate frame assigned to this object, so that I know the relative position and orientation of the object with respect to the base of the robots. Now interest is to see how can I use this robot to pick this object from here and you to pick this object from here and place it somewhere here, I want to place it somewhere here and I know this position also, so I can define this position where I want to place. So, I have this object in this position and I want to pick up this using this robots, so if I had to bring this tool to this position, what should be my joint angles is the problem in inverse kinematics. So, that is the way normally are the manipulator problems are formulated. So, we knowing the joint angle and get where to where will it reach the forward kinematics is useful but not in the practical scenarios like this. Here we are interested to know, what should be the joint angles to reach here and similarly what should be the joint angles for the tool tip to reach here to drop this point object here. So, that is what is the requirement in the practical application. So, that is the what says that they are normally formulate in terms of the desired position orientation. So, we have a desired position and orientation for the tool and we want to know how can I reach the how can we reach that position and orientation using the joints. And that is the inverse problem that is of interest to us. So, we have something from here to pick and then somewhere else, so how to reach these positions are the interest to us. (Refer Slide Time: 05:03) And a systematic closed form solution applicable to robots in general is not available, that is this problem cannot be generalized, because each robot will be having its own way of reaching that position. And solving that position or getting the joint positions to correspond to that position cannot be generalized because of the robot configurations, we will see why the what the problem is later, but there is a problem here, it cannot be generalized and unique solutions are rare and multiple solution exist. So, many times we will be having multiple solutions, that mainly because suppose you have a point here or assume that this object is here and you want to reach this point, so you can actually reach from here, you can actually reach from here and reach here, or you can actually reach like this also. So, it can actually have an elbow-up or elbow-down kind of a solution. So, this kind of multiple solutions are very common in inverse. And because of all these you have this inverse problem as a very difficult then the forward problem. So, forward problem was very generalized for any set robots configuration we can have a general solution and therefore we are not able to we are able to get a generalized solution. But in the case of inverse, this is not possible, because of a various reason which we will see later and unique solutions are not there, so all this actually leads to the inverse problem as a complex one compared to the forward problem. (Refer Slide Time: 06:57) So, now if you want to solve this inverse problem, so we can look at what is happening in the forward relationship, so we have this arm matrix, which we discussed in the forward relationship, which represents the position p and orientation of the tool in base coordinate frame as a function of joint variables q. So, now when we do a forward kinematics where q is the joint variable here, so q the q the set of joint variable, then we can actually represent the position p, so this position vector p and it's orientation, orientation of this tool frame can be represented using this rotation matrix and the position vector Rq and pq rotation matrix and the position vector can be used to represent this. Now, what is this p? p is basically the position of this point, position of this point p and represented, in terms of Px, Py and Pz, so we represent it as Px, Py, Pz and then we have a relationship Px is something, py is something, this is what we get in the forward relationship and this will be a function of the q. So, we know that it is a function of q depending on the type of robot, it will may be a function of q1 to qn. And this also is a function of q1 to qn. Similarly, R also we have this as a vector, I mean three by three matrix, so you have the normal approach and sliding vectors, so you can call it as nx, ny, nz like that. And each one also we saw that this also is a function of joint variables, so nx is equal to function of joint variables, ny is a function of joint variables like that. So, we have these equations available us, now the question is, how can we actually use Px? Suppose we know Px, how can I find q1 q2 q3? So, we have to start from the forward relationship and then solve this relation to find out the q. So, that is the requirement in inverse kinematics. (Refer Slide Time: 09:13) So, given the desired position p and orientation R of the tool, find values for the joint variables q which satisfy the arm equation? So, now if suppose this p is given to you, now you want this p to be reached here, you say that okay this is the p which I want to reach and I have an orientation like this, if this is known, if this p and this Rq is known, how can I find this q corresponding to this p and R? That is the inverse problem. So, given a desired position p and orientation R for the tool find values for the joint variables q which satisfy the arm equation? So, this is the inverse kinematics problem. (Refer Slide Time: 10:01) So, if I to represent this relationship between the direct and inverse kinematics, you can see that if you have the joint space parameters q, if you know this q1 to qn that is we called as joint space, joint variables. Now, we use the kinematics or the forward kinematics to get the tool configuration space Rn, which actually is the p and R, that is the position vector and the rotation matrix can be obtain. So, for any value of q, you will be able to get the position and orientation using the forward kinematics we called it as a tool configuration space. Now, if you apply this inverse kinematics to this suppose you have, do you know p and R then you apply inverse kinematics and you get the joint space variables. So, use this tool configuration space information using inverse kinematics, then get the joint space is the inverse problem. So, you can see that if we want to solve the inverse kinematics, we need to have a direct kinematics relationship, because that direct kinematics relationship is the one which is used to solve the inverse kinematics problem or we need to know the forward relationship of the manipulator to solve the inverse kinematics, the arm matrix should be known to us. (Refer Slide Time: 11:31) So, now look at the solubility of this relationship, so as we know if p and R are known then we in use some method to solve for q, so that is the inverse requirement. Now, see how the p and R are represented, suppose we have this relationship for the arm matrix, it says that px, py, pz and nx, ny, nz and sx, sy the normal sliding and approach vectors normal sliding and approach vector and the position vector is the one which is given to us, because we assume that we know this or this is known to us. And we want to solve for the joint variables which corresponds to that one. Now, in the case of normal case of forward kinematics, how is it represented? This Px, Py, Pz will be represented like this, for example I taken one robot configuration and for that robot we will see that Px is equal to this one and Py is equal to this one and pz is equal to this one. So, we can see that there are can be three relationship three equations can be written for that particular manipulator we have a relationship at Px is equal to C1 multiplied by something, Py is S1 multiplied by something and Pz is 215 minus something something, so that is the three equations that you can have. Now, similarly we can write ax is equal to minus C1 S234, ay is equal to minus S1 S234, az is equal to minus C234. So, like this we will see that we can actually get 9 equations from here and 3 equations from here, so we have totally 9 plus 3, 12 equations from this matrix relationship, so arm matrix is given, so for Px is equal to this, Py is equal to this, like this we have 9 plus 3, 12 equations. And using this 9 plus 3, 12 equations, we need to find the joint variables q1 to qn, so you have q1 to qn to be found out you, because if Px is given suppose I have Px is equal to 170 and py is equal to 50 and Pz is equal to 50, now I have to write 170 is equal to this, 50 is equal to this and 50 is equal to this and solve it to find out what will be the values of theta 1, theta 2 etcetera which satisfy this condition. (Refer Slide Time: 14:07) So, that is the way how we need to look at this. So, we have 9 plus 3, 12 equations and n unknowns, n maybe 6 or 5 or whatever it is. So, we will see that there are 12 equations and you have n unknowns to solve. So, things seems to be simple because we have 12 equations and we have only n unknown, this n will be normally 6 or 5 or whatever it is. So, that seems to be easy problem to solve. But if you look at closely this one you will see that there are 12 equations and n unknowns, n is equal to 6 for 6 axis robots. But if you look at closely this, this three equation against a Px, Py, Pz they are independent because you can actually place the robot in the position the end effector can be placed anywhere in the x y z plane within the work space, so that it can be independent, so px, py pz there is no relationship directly as long as where you want to place it you can place. So, you can actually get these 3 equations are independent, they have 3 independent equations here, but these 9 equations, they are not independent, the reason is that this actually represents three vectors, so this actually represents the normal vector, sliding vector and approach vector and they are orthogonal and of course they are independent vectors. But these three, out of this nx, ny, nz they are not independent, there is a relationship between nx, ny and nz to satisfy this condition of the vector. So, nx square plus ny square plus nz square is equal to 1, similarly sx square plus sy square plus sz square is equal to 1, nx square plus ny square plus nz square is equal to 1. So, that is the unit vector the three orthogonal directions. So, these three equations that you are seeing here, this three equations are not really independent and similarly these three equations are not independent, these three are not independent. So, effectively we have only one equation from here, which is independence and this is only one equation from here and this one equation here. So, we can have only three independent equations from the rotation parts, this rotation matrix gives you three independent equations, though we have nine equation since they are not independent, what we can see is only three independent equations. So, these three independent equations from this part and then three independent equations from the positioning part give you totally 6 equations, so you can actually get 6 independent equations from the arm matrix. So, using the arm matrix you will be able to get 6 independent equations to solve for the n variables. So, 6 equations now we have n variables, so if the n is equal to 6 or less than 6 we can solve the problem. But when you see n is equal to 7 you would not be able to solve because you have only 6 equations and 7 unknowns cannot be solved. So, you need to choose one of these you have to select and then you have to get other 6, so that actually leads to multiple solutions depending on the values of the first assumption. So, effectively we have only 3 independent equations and 6 independent equations and n unknowns and nonlinear they are nonlinear equations and then difficult to solve. So, 6 independent equations and n unknowns and nonlinear equation, we need to solve them in order to get find out the joint variables, but they are not that easy to solve because they are nonlinear equations and n is more than 6, again you will have difficulty. So, that is the difficulty with the inverse kinematics, but that actually tells you the solvability aspect of the inverse problem, we have 6 independent equations and n unknowns and the relationships what you are seeing here are the nonlinear equations and not that easy to solve. Now, we have to see how to address this problem for manipulators. (Refer Slide Time: 18:26) So, first thing we look at this, is there a solution existing or not? So, we know that there are 6 equations and 6 unknowns, suppose if 6, n is equal to 6, so we have 6 equations and 6 unknowns, so we can actually solve the equations that is possible, but if there is a solution existing or not? If there is a solution existing then only we can solve it, so if we have to solve using the 6 equation first thing we need to ensure is that, yes there is a solution existing for it and therefore start solving it. And how do we ensure that there is a solution exists? So, we look at this a manipulator is solvable if all the sets of joint variables can be found corresponding to a given end-effector location. So, a location is given to you and if you can find the all the joint angles corresponding to that location, then we call it as a solvable one, that means we need to get all the sets of joint variables which can actually reach to that position and orientation. So, then if we can find it then we call this solvable. Now, there are few conditions under which we can say this is possible, so not all positions are solvable and there are some position which cannot be solved also. So, first we look at, what is the necessary condition to have a solution? That is if you want to have a solution, what is the minimum condition to be satisfied? What is the necessary condition to be satisfied? The first point is that suppose you have a robot like this, suppose this is the robot, i will say it's workspace is something like this, just roughly mentioning, this is the workspace that the robot has. Now, it is a program and I may not be knowing that what is the workspace it can reach or what is the all the points I may not be knowing, suppose I give a position here may be it may be possible to solve, but if I say that I want to reach this position then it is definitely not possible to reach this position because it is beyond the workspace of the manipulator. So, the necessary condition to have a solution is that it should be within the workspace that is without that condition you cannot never can never solve the problem. So, first condition is that the tool point within the workspace. So, the tool point what you want to solve should be within the workspace, that is the first condition. Now, we know that if I want to reach this position, I will be able to reach this position and if I want to get a particular orientation also, so I need to have orientation desired orientation and desired position, then I know that there should be 3 degree of freedom for positioning and I need to have another 3 degree of freedom for orienting, that means I can get any orientation and any position within the workspace using these 3 plus 3 degree of freedom that is 6 degree freedom. Suppose I have only 5 degree of freedom, suppose I do not have I mean you have only 5 degree of freedom, then it is clear that I would not be able to reach the orientation needed, I can use the first 3 degree of freedom to reach the position, but then I have only now left with only 2 degree of freedom, out of 5, 3 used for positioning, so I have only 2 degree of freedom for orientation, that means I would not be able to get all the orientations I can control 2 orientation and the third one will be depending on the other 2. So, I cannot really say all the three orientations I want and then only have only 5 degrees of freedom, it is not possible, then you would not be able to solve. So, that is the condition, if n is greater than or all 6 to have any arbitrary orientation, so if I had to have any arbitrary orientation of the tool, I need to have minimum 6 degrees of freedom or more than 6 degrees of freedom. So, if n is equal to 6 or more, then I can have all the arbitrary orientation. And if I have only 5 degrees of freedom, then I say that I need to get all the orientations, it is not possible, that means I would not be able to solve for any arbitrary orientation if there is a there is only 5 degrees of freedom or number of degrees of freedom is less than the less than 6. So, that is the second condition necessary condition to have the solution. So, first condition is that the tool point should be within the workspace. The second condition is that end should be 6 if I want all the orientations achieved. (Refer Slide Time: 23:13) Now, another condition is that the tool orientation is such that none of the joint limitations are violated, so all the physical all the robots will be having some physical limitations in joint movement. So, there your wrist will be having roll pitch and yaw axis and each one will be having some joint limits, so maybe roll can have all the 360 degree, but pitch and yaw cannot have a 360 degree rotation because of the physical limitations. Now, if your orientation says the orientation what you want actually can be achieved if the joint limitations are violated or will be a getting a solution, but if you say that the joint has limits then you would not be able to get the all the desired orientation. So, we need to ensure that the tool orientation such that none of the joint limitations are violated. So, in these three conditions, these three necessary conditions to be satisfied, if you want to get a solution, or you to have a to make the manipulator solvable. Now, that is the necessary condition, so there are two kinds of solutions, so if you know that this these necessary condition is satisfied, then we can actually solve for this, we can solve for the solutions. And the two methods of solutions are one is known as closed form solution, the other one is numerical solution. So, closed form solution is that you can use the algebraic expression or the analytical expression that you already developed using forward kinematics, so you can use these analytical expressions and solve for it, that is basically known as the closed form solution. So, the analytical method can be used to get a solution then we call it as a closed form solution. So, analytical method can be either this equations or you can have a geometry method also, so two methods are there either you directly solve this algebraic equations or you go for a geometrical approach and then find out the possible joint angles which will provide the position and orientation. So, that is the closed form solution and the other one is known as the numerical solution where you do an iterative you search and then find out the solution. So, you start with some value for each joint angle and then search all other joint angles which can actually lead to the desired position and orientation. And if you do a search and at some point you will find that this meets the requirement. So, that is the numerical methods which is an iterative and timeconsuming methods. So, whenever the closed form solution is not possible we have to go for time-consuming method of numerical solution. Similarly, when you have large number of degrees of freedom you have multiple solutions then also you may have to go for a numerical solution to get most feasible solution. So, how do we know that there is a closed form solution existing or not? That is the second question, so the first question was that whether it can be solved or not. Now, if it can be solved, which method to be used whether go for a closed form solution or a numerical solution. And to get this closed form solution we call there is a sufficiency condition, we say that there is a sufficiency condition to get a closed form solution. So, any manipulator can be solved for its inverse using closed form methods if it’s satisfy the conditions given here, that is known as the sufficiency condition. Sufficiency condition says that, if three adjacent joined axes are intersecting or three adjacent joint axes are parallel to one another, then we will be able to solved the inverse kinematics using the closed form methods. And if this condition is not satisfied then you would not be able to solve it using closed form method you need to go for a numerical method, that is the situation or that is the condition that says sufficiency condition where you can solve this using closed form methods. And what does it say? So, suppose you have this axes, like this, you have one axes here, one axes here and one axes joint here and all axes are parallel then all the adjacent joint axes, so all the adjacent axes all the three adjacent joint axes are parallel then you can have a closed form solution. Otherwise if the three adjacent joint axes, suppose you have one axes here and then one axes like this and one axes at this point which actually again intersect the this three, suppose you have one axes and another axes here which actually like this, than these three axes are intersecting, if the three adjacent axes are intersecting then you will be having a closed from solution. So, this is the necessary sufficiency condition to get a closed form solution. So, whenever you get a manipulator to be solve for inverse kinematics first thing you need to check is whether the closed form solution existing or not, the closed form solution is not existing then you would not be able to solved it using algebraic or geometric methods you have to go for numerical method only. And form where this condition comes you can actually see later when we try to solve, so probably if you remember the forward kinematics relationship, if there are three adjacent joint axes, you might have seen that it actually comes like theta 2 plus theta 3 plus theta 4 format or we write it as theta 2, 3, 4. So, that is the form it was coming in the arm matrix or the arm equation and that is the reason why we need to have this kind of parallel axes, so that you will be getting it this format, so it can actually be solved. They are not this way then you will be getting 2, 3 and then theta 4 as another one then you have to solve for 2, 3 and 4 separately that actually leads to problem in the solution. So, this will be more clear when we try to solve the equations, but the relationship comes from is this condition comes from that relationship develop or it actually happens in the forward kinematics. Similar, is the case with the intersection also intersecting the joint axes, so these are the necessary and sufficiency condition for getting the solution. So, necessary condition for existence of solution and sufficiency condition for existence of closed form solution. (Refer Slide Time: 30:13) And as I mention there will be a multiple solutions, so when it is a redundant robots, so when you have n is equal to 7 or more then we called it as a redundant robots, because what we need in space is 6 degree of freedom and if you have more 7 degrees of freedom or 8 degrees of freedom, controllability of freedom then it becomes a redundant robot. So, whenever the robot is redundant then you have multiple solutions, because you can 6 only use can solve, so 7, 8 and all you need to make assumptions and then for each value of theta 7 or theta 8 you have to find for theta 1 to theta 6, so that actually leads to large number of multiple solutions. And another one is the elbow-up and elbow-down solution which I already mention so you have an elder elbow-up solution like this so you can actually reach this position form here or you can actually reach the position form here, this is the elbow-up or elbow-down solution, that also leads to multiple solution. So, always there is no unique solution you will be most of the time you will be having multiple solution for the inverse problem, that talk about the basic requirement for the system to be solvable. (Refer Slide Time: 31:35) Now, as I told you in the closed form solution algebraic and geometric approach is there, so the algebraic approach is, obtain the equations from the matrix, so the 12 equations that we already mentioned, so obtain the matrix equations the scalar equation from the matrix and then try to solve them that is the algebraic approach. And in this geometric approach we will not be discussing because geometric approach normally is more of a graphical approach so you know the position and orientation to be reached and you know the link length and other orientation, other parameters, so you try to geometrically construct the manipulator position and orientation to see what position of this joints this will actually reach the required position. And then find out the joint angles corresponding to that. So, we will not be going to that part we will be looking only at the algebraic approach. So, here we do this by getting the scalar equation from the matrix form, so as I mention there will be 12 equations, so we can actually write down 12 equations using the matrix that is the arm matrix. Now, these 12 equations always in the I mean there are nonlinear equations and consist of trigonometric identities parameters and therefore we need to use some tricks to solve them. So, they cannot be solved very easily, there are a lot of difficulties in solving these 12 equations, so we use some trigonometric identities to combine two equations, first square them and then add them eliminate certain variables. So, there are different tricks to be used for example, you have something like a cos theta plus b sin theta and then we can solve a1 b1 like this and then probably you can actually when you add them cos square theta plus sine squared theta will come and then we will be able to eliminate some of this parameter that is what actually says. (Refer Slide Time: 33:44) So, such as first square them and add them and eliminate certain variables, so the trigonometric identities are like sin square theta plus cos square theta is equal to 1. So, such trigonometric identities can be used and we can actually get them by combining equations, so you square them add and you will get this and then you can eliminate some of the variables that is the trick one we can use. And then the trick to be used is that you use the substitution, so you can substitute for this trigonometric variables with some other and then convert them into polynomials. So, the trigonometric equations can be converted to a polynomial and then solve the polynomial that is another way to solving. So, for example, you substitute u is equal to tan theta by 2, then cos theta can be written as 1 minus u square by 1 plus u square and sin theta can be written as 2u by 1 plus u square. And then whenever the cos theta sin theta is coming you substitute these parameters these values and then convert that into a polynomial equation and then solve the polynomial and then get the theta. So, finally we need to get th