During lesser lessons, we have learned forward kinematics where we try to establish a relation between
joint variables and end effector position and orientation.
Namely, how and the factors, position and orientation changes with respect to base frame.
When we change variables, this is very useful tool, but we also want to know how the and the factors
linear and rotational velocity changes when the joint velocities are changed.
This knowledge is very useful in many robotics applications, including control of robot manipulators
and also the applications like painting robots, manipulators, manipulators that cooperate with humans
or manipulators that handle some objects and so on.
For example, you would not like the robot and the factor move very fast while handling some fragile
object or while cooperating with human because it can hurt person when it accidentally crash with him.
So, all in all, in this lesson, we will try to establish a relation between joint velocities and
end effector velocity.
As you know, the purpose of forward kinematics that have seen that we have seen less time was to establish
a relation between joint variables and affect their position and orientation.
We can denote forward kinematics as key, which is a function of joint variables.
So what about the relation between the and the vectors velocity and joint velocities?
How can we establish such a relation?
It has to have such a structure, namely it relates joint velocities Q1 to Q2 Dot up to Q and Dot with
end effector velocities both linear x y z tot and angular omega x, omega y and omega.
That here too are joint variables and they are angled tita if John is rolled or distance t if John is
prismatic and is the number of joints, the matrix that we are interested is called Jacobean Matrix.
This is the solution of our problem, so let's try to investigate and understand it.
First of all, let's determine the dimension of in matrix.
The size of the Jacobean vector or the size of the vector on the left side is one by six by one, while
on the right side is n by one, which is the number of joints.
So from linear algebra, we know that your carbon matrix has to have a dimension of six by end, you
know, to have valid matrix multiplication.
Now let's try to find how we construct Jacobean matrix.
This table summarizes how we construct Jacobean matrix.
As you can see from the table, the way we get linear and angular velocity Jacobins for real and prismatic
joints is different, and this is because of the difference in the kinematics of Prismatic Andrew,
all the joints.
So let's go to the club and first try to understand what Jacobean means, and then we will construct
Jacobean of our robot manipulator that we have worked on last several lessons.
OK, let's try to see the functionality of Jacobean Matrix.
So I will use a robot model from Petr Caucus' Library Robotics Toolbox.
We will use MDL or Puma five model in order to illustrate Jacobean.
So first, we clear the command window the variables and close all the figures.
Then we define some symbolic variables.
These are six joint variables, but their derivative.
OK, so derivative of joint variables.
Because what's our purpose?
Our purpose is to relate joint derivative of joint variables or velocity of joins with velocity of end
effector.
OK.
As you can see exactly why this is translational velocity of end effector or linear.
And this is a rotational omega x omega y omega site.
Excuse me or angular velocity.
OK, angular velocity of our in the that.
So the import MDL Puma 560, so Puma five six, the manipulator model.
Then we find it's Jacobean in Q and OK, what's q n?
Let me show you let me run this one again off line.
OK.
It's one in the queue, and as you can see, Queue MN is one by six victor.
This is joint variables in Rajan's.
OK.
This is the first joy.
Q1 is zero radians.
This is zero point seven eight five four radians and so on and so forth.
OK, so at this position, we will calculate at this instant.
We will calculated Giacobbe in our remote manipulator and we will get the um, our um, the relation
between our, uh, derivative or joint variables and between the derivative of joint variables.
And um, what and the factor velocities.
OK, here a result in result variable.
I, uh, save my and the factors velocity.
So namely result is nothing but this vector, OK?
X divided city, which contains linear velocity omega x omega omega z, which contains angular velocity.
OK, let's and here what I am doing.
Let me ride help.
VPA AVP is a MATLAB command, namely its variable precision arithmetic it in order element just without.
I cannot explain you in this way, but I can show you in this way.
Let's see result.
As you can see, this is very ugly, you know, ugly representation of our and the vector velocity y
because our we have used the symbolic variables.
The, you know, arithmetic operations on variables are done in arithmetic ways, so they are not bound
completely.
That's why we are using a common and we are defining resolution or the digit until two point decimal
digit.
OK.
Precision.
Let's run this way.
OK.
As you can see, now we have really clear and the vector velocity.
So what does it mean here?
As you can see now, you can see this is excellent.
This is why dot this is.
Is it not OK?
These are linear velocity of and the vector and this is omega X. Omega Y and omega zit.
Namely, these last three rows are angular velocity of of a robot manipulator.
So what does this mean?
Let's.
Let me show you in this way, let's use this command.
Um, Puma five six did teach.
So this is nothing but as you can see before, as you have seen before, and they are just changing.
You know that we can change in the video, the joint variables and see what its effect.
OK.
Let's do that.
Let me just make it in this way.
Let me zoom.
OK.
Here it is.
Oh oh my gosh, it's not good.
I'm just doing this.
OK.
No limits.
Try to understand.
Let me just the always on top.
And let's try to understand what does this mean?
What does this mean?
OK?
As you can see, these are Q1 d.
Let's start with X.
What does this mean?
This means the linear velocity of our robot manipulators end effector in X direction, OK?
And what?
It is affected by only two one dot, two two dot and Q3 dot.
It's interesting.
Let's see if this correct or not.
As you can see, when we change our Q1, really, we change our x dot or linear velocity of our.
And the vector.
What in X?
OK?
Not only in X, but also in other directions.
But we will see how it affects the linear velocity of the vector in x direction.
Let's check for cued to also.
Let me just make it in this way.
OK, let's check Q2, whether it fits or not.
As you can see, it also affects the end effector.
Yeah.
Let me remind you that the X Y Z, this is our end effector.
As you can see, this frame is our and the vector here.
You can see this are in the vector frame.
OK?
As you can see, we can affect its velocity linear velocity in extortion by changing.
Dot or the above by changing the velocity of um.
By changing the.
Joint that I bought you two and it's, uh, velocity affects directly to our end effector.
For example, if we move it slowly, it changes, and the vector linear velocity in its storage is slowly
but fast.
It will change fast.
OK, perfect.
Let's try.
Cue three, because from Jacobean, it shows us that, uh, Q3 also affects the robots and the vectors
linear velocity in its direction.
And if you change Q3, you will see that yes, it's also affect.
However, we cannot see Q4, KQ 40 to 50 and 60 inside our export.
What does this mean?
This means that to 4.2 to five and to 6.0 does not effect the linear velocity of end the factor of frame
in X direction.
Is it correct or not?
Let's see.
Okay, let's try to change now.
Q4 and Q3, Q4 Q4, I think, is, as you can see, Q4 not changes the linear velocity in X direction,
but angular velocity in extortion.
You can you see it only rotates, so it only changes.
Angle did not linear realize that the same is for Q4 because Q4 Q5 q6 constructs.
You know, the only reason, OK, it's very good would restore our robots.
So what is the purpose of spherical wrist as physical risk purpose is only to change the orientation
of the end effector, not linearly change?
It's not translational, OK?
It only changes orientation of the vector.
So that's why they are not inside X thought you will see that they are not also inside Q of Y Dot and
Z Todd.
OK?
It's very interesting.
But however it is initiative.
OK, this is not something -- or nothing.
Not understandable.
OK.
As you can see, they are X and Y Z told X Y and Z Tot are the same.
They are all affected by Q1 de Q2 and Q3, the Q1 de Q2 Q3.
However, it's interesting that in that direction, Q1 doesn't affect.
OK, let's check why.
As you can see, it only rotates x y plane.
Can you see that it all rotates the end?
The vector, excuse me, changes the position and orientation of the vector in x y plane.
See, it only changes in x y plane.
Be careful in the vector is frame is x y z.
It doesn't change up and down, like in Q2.
OK, can you see here it changes up and down.
Also in Q3, it changes up and down.
So that's why it they also they affect that direction.
However true one does doesn't affect in that direction velocity because it only changes the position
and orientation of our onboard manipulator in x y plane.
Perfect.
Let's talk about now the angular velocity, as you can see in terms of angular velocity.
True for Q2, q3, Q1.
Q five to six almost.
Let me just first, second, third, fourth, fifth, sixth.
All the joint variables o.
The joint velocities affect the velocity of end effector in angular velocity of end effector OK in x
direction.
The same is, as you can see, is applicable or in the same is valid for ohmygod wide angle velocity
in y direction.
And by manipulating, you can see that because Q1, Q2, Q3 not only changes angular velocity, but
also linear velocity.
How our spherical wrist changes only orientations saw on angular velocity and in terms of z direction.
Q1, Q2, Q3, Q4, Q5 Q6.
OK.
However, let me just remind you something.
As you can see, we have here 1.2 e minus 32.
It is almost zero.
So effect of Q2.
Q2 doesn't have effect on angular velocity in X direction.
Let's see why, because as you can see, Q2 only changes the frame orientation not.
In this direction, OK?
So that's why it doesn't have effect here.
Be careful about that.
These are small numbers, OK?
Nearly zero e minus 32 e or minus 32.
This does mean 1.2 times 10 or minus 32, which is almost zero.
But this is because of the precision of these numbers.
Precision of MATLAB.
OK.
The same is for the Q three.
Q three also doesn't affect the linear angular velocity in X direction.
OK.
The same also applicable for Q one, d and Q 50.
However, Q for D and Q six, the affix the omega or angular velocity of and the vector in X are it's
not about x axis the same.
You can analyze the Y and you can analyze the Z.
So by manipulating or by playing with this tool, you can easily understand what does Jacobean means
and what it will.
What is its purpose?
So now let's try to find let's try to find what will be.
Let's try to find the Jacobean of our robot manipulator that we have worked on last several days.
OK.
If you, as you know, our robot manipulator was six degree of freedom.
We have, uh, six joints.
OK, so our Jacobean matrix will be very big and very complicated because the um so the end effector
will be in a complicated way.
It will depend on our joint velocities in a complicated way.
OK.
So that's why it would be very difficult to calculate its effect and also the Jacobean by hand.
So that's why I wrote a program, OK, or, um, a script.
Uh, yeah, this is because script script to calculate the Jacobean.
So let me just show how I did that first.
As you can see, if you clear the command, OK, I don't need to talk about these clear deliverables
and close all the figures.
Then we define some variables.
What are these?
This is number of joints.
We have six joints because our robot six degrees of freedom.
These are some symbolic variables.
We will need this T to want it off for three to five to six.
OK?
These are for real joint variables and D to these three.
These are two prismatic joint variables because as you remember, our robot have fought very well a
joint to prismatic joints.
OK, let's continue.
What is that?
This is our homogeneous transformation matrix because in order to find the let me show you in order
to find this, are I minus one zero?
As you can see, these rotation mattresses are relative relate the frame width base frame.
OK, so we will need homogeneous transformation mattresses in order to find R and D with respect to
base frames.
So this this is in order to find that homogeneous transformation mattresses.
OK.
This is for in order to save the rotation mattresses these are for in order to save the translational
mattresses and or the vector.
And this is for our Jacobean here.
Are use multidimensional?
OK.
Um, multidimensional matrix.
Or let me just it's not a correctly three dimensional vector matrix.
Excuse me, because we have six degree of freedom for each of the joints I.
For each of the joint I made in the video, h r the and J.
Um mattresses.
Now these are link lengths of our robot.
You have seen this last time I have done this.
Uh, you know, they created this randomly, you know, not randomly.
But you know, there is nothing mechanical calculation or some thinking on them.
So I have just written some numbers for them.
OK.
And also, we don't need for now to make them correct way or.
To calculate them mechanically, OK, in a construction will be because this is not our purpose.
And the here are just right, our type of each joint robot joint, OK?
First remote, the second prismatic, the sort prismatic.
Our fourth joint is rotational.
Also the fifth and sixth, because we will need that, we will need that in order to calculate Jacobean
for linear and rotational, the Jacoby's for prismatic.
They will have joints because they are different.
And when we calculate this linear and rotational jacquard means we need whether we are working with
the prismatic joint or able to join.
So that's why I specified them here.
OK.
Let's continue with defined parameters.
These are nothing we have done last time we calculated the parameters are just right.
I mean, T, R, I, R and D here what I'm doing.
Yeah, I'm doing.
I'm calculating individual homogeneous transformation mattresses, OK?
As you can see, I'm doing nothing but for I'm looping my for loop.
I'm looping for six times for each of the joints and calculate the homogeneous transformation matrix
for each of the joints.
There is nothing complicated here.
You know the formula?
You can do the same.
OK, then here what I'm doing.
OK, let's hear.
Just extract rotational and translational transformation mattresses from homogeneous transformation
matrix.
OK, I'm extracting these words OK, or I'm minus one zero r i minus one zero d and zero d.
I'm minus one zero.
Excuse me, not d in zero, just I minus one zero I minus one zero and minus one zero.
So it's only in, you know, here I just calculate.
Let me just show you when they calculate this homogeneous transformation method, as you know, this
is let me just remind you that this rotation matrix illustrates the H i h II, which is nothing but
a homogeneous transformation mattress from frame I to frame I mind this one.
OK, but we don't want I to a minus one.
What we want is from AI to zero I two zero.
We want AI to zero b.
We need homogeneous transformation matrix with respect to Frame B's frame.
Not the last frame.
OK, not the excuse me, not last frame, but not the frame one that is before.
OK.
As here.
So what we are doing there is nothing complicated here.
We just, for example, what we try to find.
We want to find h one zero.
OK.
So a homogeneous transformation from one to zero.
What we are doing, we are doing just h.
We are h one zero will be h one zero.
There is nothing, uh, complicated here.
OK, so we are doing nothing with that.
But H two zero will be different.
OK, how we'll calculated the evil multiply h one zero with h.
What two one.
We have these mattresses homogeneous transformation mattresses for subsequent frames.
Here we calculated them.
Now we want to calculate by multiplying them each of the joints homogeneous transformation matrix with
respect to base frames.
So let's do four page for each three zero.
Oh OK.
I think you grab the concept.
Well, because we have seen this last time, what we will do, we will move h one zero with H two one
and multiply it with H three two.
OK.
What will, uh, what it will give to us?
It will give us h three zero and we will.
By this way, we will find H four zero eight five zero eight six zero and from here, Leesville T,
as you can see, we are doing it here.
What we are doing.
We are for each and we are looping inside for loop.
This is EJ cumulated.
Namely, I just, uh, calculated for each of the homogeneous transformation matrix for each of the
joint these homogeneous transformation mattresses.
These are cumulative homogeneous transformation mattresses.
I first start with, uh, one identity matrix.
OK, then I multiply it.
Each of the subsequent homogeneous transformation mattresses until that joint, OK?
For example, for the second joint, I don't multiply all of them, but the one until age two one four
third joint, I will do until four eight three two.
OK.
So that's why I create another loop loop from one to I.
For example, if I will be two, then I will take first and second homogeneous transformation matrix.
If I will be, I will be three.
Then I will take first, second and third homogeneous transformation mattress and I will multiply them
in four loops.
Or I will get this cumulative homogeneous transformation mattresses and I will extract in each case.
Ah, I zero.
OK.
Ah, zero.
Namely this one.
This is I minus one zero, but I extract are zero in order to calculate ah i minus one zero next time.
OK.
In further loans, we will explain this.
So here let me just comment that this is R zero.
OK.
So the rotation of for each of the joints, the rotation from this joint.
The rotation matrix of this joint or orientation of this joint with respect to B's free market.
And here I calculate the I zero.
So what does this mean?
The center of the frame?
I.
OK.
From a base frame.
No, I have everything to calculate Jacobean.
Now here I just check, first of all, if I equals to one.
If I equals to one from formula, what I will have, if I equals one, I will have ah, zero two zero
or.
OK.
Here are zero two zero.
Also what I will have the zero two zero, however, are zero two zero is nothing but identity matrix.
OK.
Because the now how can I say the orientation of a frame with respect to itself is nothing but identity
matrix.
OK, also, the distance between the centers of the same frame OK, is nothing but zero.
So forty four we will.
If I equals to one, we will make D current as zeros and our current as identity matrix.
OK.
Otherwise, we will just extract and we will take R minus one and d i minus one.
As you can see, in order to find R I minus one and the I minus one in order to use our algorithm,
then what we are doing, we are checking if our joint is revalued or prismatic because the formulas
are different.
If our joint is revealed in first three indices of Jacobean matrix because the first three of Jacobean
Matrix is four linear velocity.
What we are doing, we are just calculating this.
We first multiply our rotation or R I minus one.
As you can see, if our joint is developed and we are calculating linear what we are doing, we are
multiplying.
Are I minus one vs zero zero one?
OK.
We are multiplying our R Iman's one zero zero one.
OK.
And then we find its cross product with what we are finding its cross product with the and zero minus
T i one zero.
As you can see, this is the end zero.
OK.
So the less frames distance from B's frame and v minus we subtract the current from it and we find its
cross product.
So namely, we just applied this excuse me, these formula.
OK, two here, because we are in regular joint and we are calculating linear velocity for rotational
velocity, we will do nothing, but we will multiply R II minus one zero zero zero one and we are doing
here in the last three in the sense of the Jacobean matrix.
We are calculating Angela, the velocity of the end, the vector.
So what we are doing, we are multiplying by R minus one v zero zero one.
Or if our money
excuse me, if our um was a joint, OK, joint type is prismatic.
What we are doing, we are first calculating.
Let's see for this formula.
If our joint is prismatic, we will calculate linear velocity with that form and rotational velocity
by just zero zero zero.
Because this is prismatic tour and it doesn't do any rotation, it is just changing the linear velocity.
OK?
So for the first?
Three.
These are linear velocities, we just are minus we calculate our own minus one times zero zero one vector
and then for the last three ones, what we are doing, we are just doing, we are just assigning zero
zero zero based on our formula.
So here until here, I get our Jacobean.
OK, let's run this.
OK?
It drove successfully, sure, because I wrote it before, and there is no limit to the artistic words.
OK?
And here I just defined some symbolic variables.
What are these symbolic?
What I love?
These symbolic variables are derivative of our joint variables for these fourth one, these four joint
variables to each one, for one, d for D for these 64.
And the two d these three d for PS Matic.
What we are doing here, we are doing essentially this thing.
OK?
There is nothing different or care.
Let's go p from here and let me paste here in order to find in the fact the linear and angular velocities.
OK.
Namely, this one, we take Jacobean and multiply it with our joint variables.
OK, here I calculate J.
Total this is nothing, but because our G is here, J, I define J.
As you can see three dimension matrix.
And this contains the Jacobean for each of the joints.
So I just, you know, some them, not some them, collect them in one matrix and I create one.
Let me just show you one, J Total.
OK, namely one Jacobean.
OK, as you can see, this is our Jacobean, and let's check size of our Jacobean in order to see whether
we are correct way or not.
J Portal As you can see, it's six by six.
It's correct.
It's three four linear velocities to be four and a little velocity and six joints.
OK, we are correct, and then we just multiply them here and get our resultant result and the factor
velocity.
Let's let's run it and you will see how come in a complex way the joint variables are related with and
the factor velocity is OK.
As you can see, here is our result.
It is very, very complex.
I know, but remember that these are nothing but zero.
If you want to analyze, you can analyze, but there's no need to analyze.
This was this is better in order to analyze, you know this Puma is better.
However, here I just wanted to show how we can calculate Jacobean in a systematic way with an algorithm
without doing, you know, some taking paper and a pen and calculate it manually.
OK.
I think that now you know what's Jakobsson and C and its functionality?
So see you on the next lesson.