Lecture 06

IIT Kanpur July 201
20 followers
Oct 23, 2023
Hello, and welcome to lecture number 6 in the course Advanced Robotics. Today, we will
be continuing with our discussion of the Puma robot. We will see how to assign the axis
to the various joints of the Puma robot, then make the DH parameter table, and then proceed
to make the various transformation matrices that will relate the end effector position
orientation with respect to the base frame. After that, we will move on to forward kinematics
and see that when you are given the link parameters and the joint angles, how we can get the position
and orientation of the end effector with respect to the base frame.
Okay, so we are continuing with our discussion of the Puma robot and just to very quickly
revise what we are doing when we are given a robot manipulator is that, for example,
when we are given a robot manipulator having 3 degrees of freedom like this, the first
thing that we do is we assign our z-axis and then the x-axis. So I assign my z-axis.
So this is going to be my z0, z1. This is my z2, z3 axis, then assign my x-axis. In
this particular case, it is x0, x1, x2, and x3. Please look at the rules, which I discussed
a couple of classes back. Then we make the DH parameter table. In this particular case,
I make A, alpha, D, and theta. We make the DH table and assign the various, the link
parameters, the link lengths, the link twist, the offset, and the joint angle. So in this
particular case, it is 0, 0, 0, theta1, L1, 0, 0, theta2, and it is L2, 0, 0, theta3.
This is my link lengths L1 and L2. Then what we do is we take each of the rows and put
it into the generalized matrix. So this is my generalized matrix, which relates the next
frame to that of the previous frame. So I take the first one, then I get my matrix 0
to 1. Then I take the second one, put it in here, I get 1 to 2. I take the third one,
put it in here, I get 2 to 3. Then I multiply all of them out and I get my final matrix,
which is 0 to 3 in this case.
Now we also saw the example of, we started off with the example of the Puma robot. So
I will very quickly go through the Puma robot example again. And we did not complete in
the last class, so we will complete it in this class. So the first thing that we do
is to assign our axis. Now how do we assign our axis? The first axis is the, so this is
a 6 degree of freedom manipulator. So the first thing that we do is to assign the first
axis, which is the waste axis. And this is my z0 and my z1. So this is z0 and z1 there.
That is my first axis. The second axis is assigned here, which is my z2. So this is
my z2 axis. Then the third axis is assigned here, which is my z3 axis. That is my z3 axis.
Then at the wrist we say this is my roll axis, which is my z4. And then we look at the wrist
part in more detail and we see that this is my z4. z5 is in that direction, z5. And z6
is back here in this direction. In the last class also I explained why z4 and z5 are in
the same direction, because z6 is actually that side. But if you do it this way, the
three axis z4, z5, z6 are orthogonal, but you will not be able to assign your x6 axis,
because there is a problem in the DH parameter notations.
So to avoid that what we do, we rotate this and make it in this direction. So z4 and z6
are along the same direction. Please refer to the previous class notes, which explains
why it is done that way. So this is my z3, z4, z5 and z6 are along that direction.
The next thing that we do is, this is also called the roll pitch your kind of wrist.
The next thing that we do is we assign our x axis. Now, please note that z0, z1 are in the
same direction, z2 is the one which is orthogonal to z1. So z2 and z1 axis are intersecting at a
point and they are having 90 degrees between them. So this means that for intersecting z axis,
the x axis has to be out of plane, out of the plane containing the zs. So this is my x2.
If this is my x2, I can also say this is my x1 and sorry x0. So this can be my x0, x1 and x2
in that direction. x3 is in this direction. That is my x3. And my x4 is in this direction.
So if I go back, go here, then x3 is this side. Now, please note that z3 and z4
are orthogonal to each other. Their directions are orthogonal to each other. So my x4 is going
to be perpendicular to this. So my x4 will come there. And similarly, x5, z5 is here. So I put
z, x5 and x6 here. So the problem I was talking about is if your z6 is here, if z6 is there,
then what happens is because z5 is orthogonal to z6, z6 and z5 are orthogonal, then you cannot
assign your x5 such that you can rotate z5 to make it z6. So that is what is the problem.
So to avoid that, we put z6 down and now x4, x5 and x6 are here.
So now look at the distances between the various origins of the frames.
So your origin of frame, please note this very carefully. This is something to note. This is
the origin of frame 0, 1 and 2. I could have taken the origin of frame 2 here also. That I could have
done. But just for simplicity, I am making it here. So that is my z2 axis. This is my z2 axis.
Now the origins of 0, 1 and 2 are the same point. Origin of 3 is here. So that is frame 3. 4, 5,
6 is here. 4, 5 and 6 are there. Now y-axis are not required. So we need not draw the y-axis.
Now look at the distances. We are going to write our DH parameter table.
So let us call it alpha, a, alpha, a, d and theta. So this is my DH parameter table which
I am writing. There are 6 axis. So there will be 1, 2, 3, 4, 5 and 6. Now let us look at
the first 0 and 1. The z's are the same axis. Origins are the same. So what will happen is
this will be 0, 0, 0, theta 1. That is very simple because it is the same axis. So this
is my same axis. So it will be 0, 0, 0 and that is theta 1. That means if an axis 1 rotates,
what happens the angle between x0 and x1 will change. So it will come this side or it will
come that side on that plane. Now the second one, let us look at the second axis. Now the
origins of the second axis is the same, but there is a 90 degree angle there. So there is a rotation
of clockwise 90 degrees about the x-axis. So z2, so z1 rotates 90 degrees and becomes z2
clockwise. So this is a minus 90 clockwise is taken as minus 90. This is 0, 0 and it is theta
2. Origins are same. So a and d are 0. Now let us take the third one. Please note that third
axis is here. Now the third axis or the origin of the third axis which is there. Now the origin of
the second axis, you can imagine this has traveled like this on that plane.
So there is a distance of d3 there plus there is then it goes forward like this
and then it becomes that axis. Let me draw it with some other color. So how is third axis going
there? If you look at the third axis, it has traveled in this direction to that plane and
then along the plane it has gone there. So there is a distance d3 and there is a distance here,
which is my a2. So what is the angle between the z2 and z3? There is no angle. So it is,
they are parallel. So it is 0. Now what is the distance between the z-axis? It is an a2.
And then what is the distance between the x-axis? There is a distance of d3
and this is my theta 3. Now let us go to the fourth one. Now fourth axis, the third axis,
now let us go to the close-up view. So this is my third axis, 4, 5, 6 are here,
4, 5 and 6 are there. So the third axis has moved up and then traveled like this.
So it has moved up by a3, so it is my a3 and traveled by d4. So it is moving up by a3 and
then going on the right by distance d4. So now if you look at the dh table, what will happen is
your fourth axis is in this direction. So there is z3 has been rotated clockwise.
So it is a minus 90 about x3 and it has become z4. Now a3, what are the distances here? So the
distance between the z-axis, z3 and z4, there is an a3. So that is my link length a. And then there
is d, which is the offset distance between the x3 and the x4. So that is my d4. So what will happen
to this table? So it will be a3 here, d4 and theta4 is the angle. Now if you look at subsequent
frames, 4, 5, 6, the origins are there. That means there is no shift in the origin.
This is a very, very important point to note because when we come to inverse kinematics,
this actually enables a solution to exist. So please note. So if the origins are the same,
what happens? There is no change in a and d parameters. Why? Because the a and the d
will become equal to 0 if the origins are same. So the offset distance and the link length will
become 0 because the origins are at the same point. Now so at 5, it becomes 90. So z5 is that
side. Now where is z5? It is rotation anticlockwise about the x4 axis by 90 degrees. That is how z4
becomes z5. So there is a 90 degree shift here. So there is 90 degree shift here. Now it is
anticlockwise, so it is plus. Origins are same. So this is 0, 0, this is theta5.
Now again, z5 is that side. It rotates clockwise about the, so it rotates like this now. This is
clockwise about the x4 axis and z5 becomes, about z5 and z5 becomes z6. So what happens here is,
so what happens here? The last will become, because it is a rotation clockwise, so it is
minus 90, 0, 0, theta6. So this is our DH parameter table. As I was saying in my last class,
please do this by yourself. Assign the axis by yourself. Write down the DH parameter table and
this should be clear because most of the robots we will be talking about would be 6 degrees of
freedom. So to do forward kinematics, inverse kinematics, this should be clear. How did this
table come and how are we going to proceed from there? So next what do we do? We have to take
each column of this. Let me go forward. Now next what do we do? I need to find the matrix T0 to 6
and how do I find that? I multiply this, I multiply all the matrices T0 to 1 into T1 to 2,
2 to 3, T4, 4 to 5 and 5 to 6. I multiply all of this. So I need to find each of the individual
matrices T0 to 1. This will be my T0 to 1, T1 to 2, T2 to 3, T3 to 4, T4 to 5 and T5 to 6.
And how do I do that? I take one row at a time. So I take this the joint number,
so I take this 4 parameters, A, alpha, D and theta and put it into this generalized matrix.
I get the first transformation matrix which will relate frame 1 to frame 0.
Then I take the second one, put it in there, then third, fourth, fifth, sixth like that. So
there will be 6 of them. Now let us see further. So when I do that, the first transformation matrix
is this one. Now please note that the origins are the same. So if you look at the matrix here,
the origins are same. So that is 0, 0, 0. There is no shift of origin. There is a rotation of
about z axis by an angle theta 1. So this is my rotation matrix. So this is what the matrix is.
Okay. The second matrix is given here. The second transformation matrix relating frame 2 and frame
1. Here also if you note that the origins are the same. So this is 0, 0, 0. But it has been rotated,
z2 has gone in that direction. Okay. So that is accounted for here now. So the z2 has been
rotated, has an angle of 90 degrees with respect to z1 and z0. Okay. So this is transformation 2.
Transformation 3 is here again. Now transformation 3, this is my z2 and this is my z3.
And that is my z3 axis. That means z3 is a rotation about z axis again. So this is a
rotation about z axis. This is the role by theta 3. And the origins are shifted by a distance of
a2 in the x direction. Okay. So for the 0 frame, this is my x direction. So it is shifted by a2
which is coming here. And it is shifted by, in the y direction it is 0 and it is shifted in the
z direction by, by how much distance? It is shifted by d3. Okay. So where is d3? d3 is here.
Okay. So x, y and z directions, it is shifted. So it is a2, 0 and d3. The second to the third.
Okay. Now what about the fourth one? The fourth one also, there is a rotation.
The fourth axis, the z3 and the z4 are orthogonal. So if you look at it,
the structure will become like this. So it is similar to this. If you look at the structure
there. And there is a shift of, the link length is a3 and this is d4. Okay. So that is my,
the fourth rotation matrix, which is between the fourth frame, which is here and the third
frame, which is here now. Okay. So now we have got four of them. Let us look at,
in the previous one, we got four matrices, right? 1, 2, 3, 4. We need 4, 5, 4 to 5 to 4
and 5 to 6. Exactly the same way, there is a shift in the z direction. So
there is no change here and here and here because the origins are the same.
Only the, there is a rotation about the z axis and the z axis has been shifted by 90 degrees.
Similarly here and similarly here. So these are the six rotation matrices that we have got.
Now I want to find the total rotation matrix. So I want to find the total rotation matrix 0 to 6,
which becomes equal to 0 to 1, t1 to 2, t2 to 3, then t3 to 4, 4 to 5 and t5 to 6. Okay. 1 to 2,
2, 3, 3, 4, 4, 5, 4. These are all multiplications. Okay. So that is, we have just found the four,
five, sorry, the six matrices. Now we multiply them out to get. Now as you can see that in the
previous case, when we talked about a three degree of freedom system, it was pretty simple.
Now, well, it is still simple, but the expressions become very long and there is a very high chance
of making a mistake. So very often to do forward kinematics, inverse kinematics, we use a computer
program. Now, please note that we will do the multiplication in a particular sequence and it
will become clear as we go along. Why do we use that particular sequence? Okay. So instead of
multiplying straight away, like what I mean is in the case of 0 to 3, what I did, I simply multiplied
0 to 1, 1 to 2, 2 to 3. I multiplied in this order. Now I will multiply in the other order.
So I will multiply 4 to 6 first. So these two I will multiply first. Okay. So this is 4 to 6,
that is 4, 5, 5, 6. These two transformation matrices, I get this. Okay. Then I will multiply
3 to 4. So first multiplication is this one. Then the second one is this one. I am not changing the
order of the matrices. So it does not matter. Then I am going to multiply 3 to 4. So I get 3 to 6
as this matrix. So we are getting 3 to 6 matrix as this one. That means relationship between the
sixth frame to the third frame, which we have got by multiplying this much now. These three matrices
we multiplied. Then what I do, I multiply this one, third. So what I do is I multiply,
so I am multiplying these two. Okay. So what we do get is 1 to 3. I multiply these two matrices
and I get this. Then I multiply 1 to 3 into 3 to 6. Okay. So what do I get? I get 1 to 6.
Then I get 1 to 6. I multiply this, 1 to 3 I am getting here and 3 to 6 I got previously.
So I multiply those two matrices, I get 1 to 6. Now the expressions become very long,
as you can see. So we are just writing this down by 1 to 6 matrix is written this way R111.
Okay. So this is my first term, second term, third term. So the way it has written R
from matrix 1, 2, 1, 1 means row number 1, column number 1. R12 means row number 1,
column number 2. Okay. R13 means, Px means the distance in the del x. So the distance between
the origins of the first frame to the sixth frame in the x direction. That is the meaning of Px.
That is what I was trying to explain here. Okay. So if you look at the terms, this term
is actually this one. So 1 R11 is equal to cos 2 3, cos 4, cos 5, cos 6 minus sin 4, sin 6,
bracket close minus sin 2 3, sin 5, sin 6. Okay. So if I open it and write this will basically
mean cos theta 2 plus theta 3. Okay. Then we have cos theta 4, cos theta 5, cos theta 6,
okay minus like that. Okay. I hope you understand, then minus this term here. Okay.
So what you can see is that the expressions are pretty long and they appear in all kinds of
combinations, cos theta 2 plus theta 3 into this full bracket term, which has some more
cos and sin terms. Okay. So this is, we are doing it like this, it will become clear why
when we go to inverse kinematics. Okay. Basically you cannot solve the inverse
kinematics unless you do it this way and this has a particular property. Okay.
Now we have got T 0, sorry 1 to 6 only. Okay. Now I want T 0 to 6. So what will I do? I will
simply multiply this with 0 to 1. Okay. Then it will become 0 to 6. So with this matrix,
I multiply 0 to 1, the first, the first transformation matrix and I get my full
matrix, which is going from T 0 to T 6. Now, if you look at the expressions,
R 11, R 12, R 13, R 11 is this one. So you can see that it has become a very, very long expression.
So it is cos theta 1 bracket cos theta 2 plus cos, sorry, cos theta 2 plus theta 3 again bracket
cos 4, cos 5, cos 6 minus this. So you can see that the expressions become very, very long.
Okay. Now, if you have a 10 degree of freedom system, you are trying to do 0 to 10,
you can imagine how long the expression will start becoming. So this is basically to show that
there are sin and cos terms and they appear in all kinds of combinations.
So what does this give? This gives us the total rotation. Okay. And what is this? This is the
distance between the origins. Okay. Origins. Which origins? 0 to 6 distance in the del x,
this is the distance in the del x, del y and del z between the two or between the origins
of the frame 6 and the frame 0. Okay. So this is in the x direction, the y direction, z direction.
Okay. Now, this is how we do the inverse kinematics of a 6 degree of freedom system.
And this is how we do the relationship between the end effector coordinate and the
0 frame of n degree of freedom system. In this case, it is 6. In the previous case,
we had done for 3, we have also done for 4. Now, let us move on to the second part of our
discussion, in which we will talk about the forward kinematics of a system. So we will talk
about forward kinematics. What does this mean? So we will talk about forward kinematics. Now,
before we go there, let me try and explain that, how does a robot actually work?
So we have a manipulator like this. Okay. Now, at every joint, there is a motor,
there is an encoder or a position sensor at the back and there is a gear in front.
And this way of controlling robot is basically called independent joint control.
So independent joint control means that there is, we are controlling every joint independently
of the other joint. Okay. And each joint is actuated. So each joint is actuated
by a motor, by an actuator. So in this case, it is a motor, electric motor, most commonly actuator,
there is a sensor, position sensor, which is an encoder and there is a gear set.
So each of these joints will be having a gear here, there is a motor and there is an encoder
at the back. How is the motor actuated? The motor is actuated by giving it some voltage.
Okay. So when I give some voltage to the motor, the motor rotates.
So my input is voltage and the motor to, voltage to motor, the motor rotates. So motor
rotates and this rotation will cause change in, change in joint angle. So voltage V,
motor rotates, change in joint angle theta. And when there is a change in, this is my theta 1,
this is my theta 1, this is my theta 2, this is my theta 3. So when there is a change in my
joint angle, what will happen? The, the end effector coordinate will change. Okay. So my
end effector coordinate, this one here, if I say this is my x, y and z, then that x, y and z will
change. We can also assign another frame here like this. Okay. That also I can do. So the origin,
the coordinates of the end effector in this case, let us say frame 3 is going to change.
So we have given a voltage, the motor has rotated, the motor rotation is causing a change
in joint angle and the change in joint angle is causing a change in the end effector coordinates.
Now, please note that the spaces are different. What do I mean? So this is what we call the
actuator space. So this is my actuator space, okay, where we are giving a voltage and the
voltage is driving the motor. Then we are having the joint space, which is my theta.
Okay. And then when the joint space, there is a change in the theta, what happens? The end
effector space changes. So end effector, end effector position changes and that is my end
effector space. So we have an actuator space, it goes like that. The joint space, something changes,
the joint changes, it goes to the end effector and end effector space, the position of the
end effector changes. Okay. So it is forward and backward like that. Now, here is my voltage
in my actuator space. Joint space is in degrees or radians. And here, this is end effector space
is in Cartesian coordinates. Okay. So please note that this is volts, then this is in degrees
or radians, this is in Cartesian coordinates, which is x and y. So all the spaces are actually
different and they are connected in some way. Okay. So basically, what we are interested in
is if I give some joint angle, if I change the joint angle, how is the end effector going to
change? That is what is basically called the forward kinematics. So if I give input theta,
then x, y will change at the end effector. Okay. But the inverse of that is if I
want a particular x, y in the end effector or the last frame, then what is the corresponding
joint angle that I need? That is the inverse problem. Okay. So let us look at define it this
way. I draw my 3 degree of freedom manipulator again. So this is a 3 degree of freedom manipulator.
Okay. Now let us assign our axis. I am going to assign my axis z0, z1, z2, z3. My x0 is here,
x1, x2 and x3 is here. Then what do we do? What is, this is my theta 1 angle.
This is my theta 1 angle. Okay. So theta 1 angle is the angle between
x1 and x0. This is my theta 2 angle, that one. And theta 3 is this one. That is the 3 angles.
Now, what did we, how did we proceed? We made our, we assigned the z-axis, we assigned the x-axis,
then we make DH table, then we make transformation matrices. Okay. i minus 1 to i.
Then we find the final 0 to n transformation matrix. That is what we were doing.
So if you look at this, and I make the transformation matrices, which I made,
I think the last to last class, please refer back to that note. I made my transformation matrices
T0 to 3, which was equal to T0 to 1, T0 to 1 into T1 to 2 into T2 to 3. And the matrix came out to
be of the form cos 1 2 3 minus sin 1 2 3. And this is 0 0 1, this is sin 1 2 3 cos 1 2 3, 0 0 1.
This is L1 cos 1 plus L2 cos 1 2, L1 sin 1 plus L2 sin 1 2, that is 0, that is 0 0 0, that is 1.
Now, this is my final T0 to 3, this is my link lengths L1, L2. Okay. Now, this part
is the rotation part. So here, this is my rotation, that is my translation. Now,
what is the meaning of this matrix? This is a homogeneous transformation matrix,
and it is very important for us to understand. Now, this is basically giving me the distance
del x, del y and del z between the origins of the third frame and the 0 frame. That is,
that is the amount of distance it has moved. So, if this is the coordinate of this point,
x, y and z, this is planar 2D. Okay. So, there is only x and y, there is no z,
because this cannot come out of plane. Okay. This is, this has to move on the plane,
it is a planar manipulator. So, it is 2D, so there is only x and y. Okay.
Now, what is the value of this x here in the end effector? So, x will be equal to this one,
y is equal to that, z is equal to that which is 0. So, x is equal to L1 cos 1 plus L2 cos 1 2.
What is y equal to? y is equal to L1 sin 1 plus L2 sin 1 2. Okay. So, we have got 2 equations.
Okay. Now, what about the total angle? So, my total angle is this one. So, if I say cos phi,
if phi is the total angle, then cos phi is equal to cos 1 2 3. Okay. And sin phi,
similarly sin phi is equal to sin 1 2 3. Okay. So, that is, that is where it is coming from.
So, the total angle, if I say my total angle here, so if this is my total angle,
if that is the total angle phi, then phi is equal to, is equal to theta 1 plus theta 2
plus theta 3. Because this is a planar manipulator. So, we have how many unknowns
here and how many knowns? So, in terms of x and y, you have theta 1, theta 2 and theta 3,
are 3 unknowns. And you have 3 equations, the first equation is here, second equation is here
and the third equation is there. You can combine these two and get that. So, we have 3 unknowns
and you have 3 equations. So, you can solve and get the values. What I mean, if I give you L1 and
L2 are the link lengths, so they are fixed. If I give you theta 1, theta 2 and theta 3,
you can tell me what is x, y and phi. So, here if I give, if I give you theta 1,
theta 2 and theta 3, you can tell me what is x, y and phi. And this is basically called my
forward kinematics problem. Okay. So, in forward kinematics, I give you the joint angles and you
tell me what is the position orientation of the end effector. Now, inverse of that problem is the
inverse kinematics problem, which is more useful actually. So, in the inverse kinematics problem,
what do we need? We need basically the position orientation, the joint angles which correspond to
a particular position orientation. Suppose I want to go and pick up an object now.
So, this is my object, this is my manipulator. I want to go and catch this object. I want to go to
this point P1, which has coordinates x, y and there is some orientation phi. This is kept on a
table, let us say. So, I want to go to this point and catch it like that. This is what I want to do.
Okay. Now, to be able to do that, I am going to give you x, y and phi. Now, you tell me what is
theta 1, theta 2 and theta 3. This is called the inverse kinematics problem, the inverse of that.
This is of course more useful, because when a robot has to move in space, we are interested
in the position orientation of the end effector. Okay. Now, let us define it this way. So,
this is my forward kinematics. This is called forward kinematics. So, what I am going to give,
I am going to give the link angles. So, in this case, I am going to give thetas.
What is the output? The position orientation plus orientation of end effector. So,
position orientation means x, y and phi of the end effector. Now, so this is called the forward
kinematics. Now, if I do the reverse of this, so if I do the reverse of that, the reverse of this
is, suppose I give this as input, this is my inverse kinematics now. Okay. So, if I take this
and put it here, I will get my thetas. So, if I give input x, y and phi, you should be able to
tell me what is the thetas, right? That is inverse kinematics problem. I hope you understand the
meaning of forward kinematics, inverse kinematics. We will talk about the, the concept of
solvability, that when can you solve and when can you not solve? Okay. So, the question of
solvability is there. When can you solve this problem? And when can you not solve this problem?
Okay. Now, here, how many variables are there? There are 3 variables. And how many equations
are there? 3 equations are there. So, it is solvable. But what I would like you to note
is that if your equations are like this, okay, in the case of the Puma robot, the x, y, z and
alpha, beta, gamma of the end effector, there is 6, is a function of 6 variables, 6 thetas.
Okay. But these thetas appear in all kind of combinations like this. Okay. So, it is not
guaranteed that you will be able to solve all the time. So, please note this, that I hope you can
understand and you can appreciate this, that these equations are having sin and cos in all
kind of combinations. Okay. And this is what makes it very difficult to solve. And you may not be
able to solve. There are manipulators where solutions do not exist, closed form solutions
do not exist. Okay. So, that is first thing we need to know is that when we are saying
how many equations are there and how many unknowns are there, just because the number
of equations and number of unknowns are equal does not mean that you can solve.
Okay. That is the first point. The second is we need to understand that this x, y is a function
of theta 1 and theta 2. Okay. And if I want theta 2, theta 1 and theta 2, then basically I need to
take the inverse of that of x, y here. So, this is my forward kinematics and that is my inverse
kinematics. Now, let us look at an example, the same example, let us look here. So, we have this
3 degree of freedom manipulator. Now, let me draw the 3 degree of freedom manipulator again.
Okay. Now, how do we proceed to do the forward kinematics? First you write your,
assign the axis z0, z1, z2, z3. I have done this a lot of times, then x0,
x1, x2 and x3. And these are the link lengths l1, l2 is given. Right. Now, we just derived
the equations. Just the last slide we have derived x is equal to l1 cos 1 plus l2 cos 1 2,
y is equal to l1 sin 1 plus l2 sin 1 2 and phi, the total angle is equal to
theta 1 plus theta 2 plus theta 3. Okay. So, 3 unknowns. So, x, y and phi are a function of
theta 1, theta 2 and there are 3 equations, 3 unknowns here now.
Now, in the forward kinematics problem, forward kinematics, suppose I give you given
numerical value. So, theta 1 is equal to theta 2 is equal to theta 3 is equal to 30 degrees,
just for example. Okay. Now, the link lengths are also equal, l1 is equal to l2 is equal to 1 unit.
Now, I want you to find what is the position orientation of the end effector.
Okay. So, this is question number 1. What you are supposed to find? Find position
and orientation of end effector. So, we are given you all the joint variables. Now,
you find what is the position orientation of the end effector. In this case is the frame 3.
How do we do that? That is very, very simple. Take these equations, equation 1, equation 2
and equation 3. So, put the values in equation 1 and equation 2. So, x is going to become equal to
l1 is equal to 1. So, it is cos, cos 30 plus cos 60. So, 30 plus 30 is 60. So, that is cos 30 plus
30. So, which is equal to cos 30 plus cos 60, which is equal to you can very easily calculate
that 1.36. l is given as 1. What is y? y is equal to sin 30 plus sin 30 plus 30,
which is equal to sin 30 plus sin 60, which is again equal to 1.36.
So, what is the coordinate of this point x, y? So, the coordinate of this point is 1.36,
1.36 that we have got from forward kinematics. Okay. With respect to which frame? With respect
to the 0 frame, this is my z 0, this is my y 0. Okay. This is my x 0. Okay. So,
with respect to the base frame, this we are getting with respect to base frame now,
0 frame. What is phi now? Phi is equal to theta 1 30 plus 30 plus 30, which is equal to 90 degrees.
Okay. So, it will look something like this. This is 90 degrees. So, it should be here,
there. So, now we are seeing that I have, this is my forward kinematics. I have given the values
of thetas, I have put in the values of thetas and I am getting the values of the position
orientation of the, of the third frame. Please note this, this is position orientation of frame,
although we are saying find position orientation of end effector, here it means frame 3.
Okay. Now, suppose I want this point, let me put it here now. So, let me put another,
I want this point now. Let me call this x dash to y dash. Then I need to put another frame there
and say this is my frame z 4, this is my x 4. Okay. Now, x 3 and x 4 are in the same direction.
So, your phi will still remain the same, only this fellow will shift. So, what will happen is,
this L 3 will get added on there. And what will happen is, you will get one more term here.
So, it will become L 3 cos 1 2 3 plus this will become L 2 sin 1 2 3. I hope you understand.
And okay, so that is what will give you the coordinate of that point. Okay.
So, now, in this particular case, we have found the position orientation of frame 3
with respect to frame 0. That is what we have done here. So, you can actually find the last
frame or the tooltip also, this tip also by assigning one more frame. That is not a problem.
Exactly one more term will get added on there. Now, so, this is basically what we call the
forward kinematics. And this is giving me the position orientation of the third frame
with respect to the 0 frame. So, third frame with respect to 0 frame.
Now, if you want to find the case for the Puma robot, well, we can do for the Puma robot also.
So, let us go back and very quickly look at it. The Puma robot has 6 degrees of freedom.
So, basically, we have to give the 6 variables, you give the 6 thetas and all the joint parameters
like A and D which are there, and then proceed. Now, as you can note that this is going to become,
it is not very difficult, but there are so many terms. So, it will be difficult to do by hand.
If you do by hand, then there is a chance of a mistake. That is the only downside of this.
Now, let us look at the Puma robot very quickly. So, the Puma robot, this is what we got. So,
this is my, so, in the case of the Puma robot, let us just go back and look at that once.
Let me just come to the figure. So, we have got the figure. So, here we have 6 thetas.
What I am trying to say is, suppose I want the position and orientation of the last frame,
I want my x, y, z plus I want alpha, beta, gamma. So, there are 6, because this is a 6 DIOS system.
So, there are 6 thetas. And there are these joint variables, which is A2 is there,
A2 is one joint variable here. Then there is a D3. Then what else is there? D3 is there.
And on the front side, what we noticed is we have D4, and we have A3, A3 and D4.
So, we have A3 and D4. So, we have A3 and D4. These have numerical values, these are link lengths
and offsets. So, they are fixed. So, this is fixed. Now, suppose I give you the 6 thetas,
and I say you find out the position orientation of the end effector, find out the x, y, z and
alpha, beta, gamma. I will give you the 6 thetas. So, what you can do is, what we need to do is,
we need to write this equation, the final equation that comes out in this form.
So, this is my x, that is my y, and this is my z. So, simply take the values just for example,
if I say theta 1 is equal to theta 2 is equal to theta 3, theta 4, theta 5, theta 6, they are all
equal to 10 degrees, just for example, then you take all this. So, this is cos 10 plus A2,
I give the values A2, D3, A4 is equal to 1 unit. So, I just give these values that the values of
A2, D3, A3 and D4, A3 and D4, A3 and D4, these are all equal to 1.
Then you put in the values of cos, sin, A2, D, A and D parameters and you will get your
x, y and z. Similarly, after you get your x, y, z, you have to figure out what is the total
orientation. So, we can use the orientation. So, this will give you the total orientation,
each one of this is going to give you the total orientation matrix is this one,
that will give the orientation of the end effector. So, this is my orientation,
this is the position. So, this is how we do the forward kinematics of a robotic system.
So, today we looked at the forward kinematics of the robotic system. I took a very,
we looked at the Puma robot. So, we completed the Puma robot as we started in the last class,
then I looked at the forward kinematics of a 3 degree of freedom,
planar manipulator system. And we saw that there are 3 equations and there are 3 unknowns.
So, we can solve. However, keep in mind that your thetas come in all combinations,
multiplications and additions, so theta 1 plus theta 2 in that order. So, it is not always
guaranteed that you can solve. There are manipulators which do not have solutions.
For example, the human arm does not have a closed form solution. So, today we finished
off with the talked about the forward kinematics. In the next class, we will move on to the inverse
kinematics and see that how do we proceed with the inverse kinematics. So, we will stop here today.
So, thank you.
