With forward kinematics, we have seen how we can get and affect our position and orientation given
the joint variables.
In order to do that, we have utilized homogeneous transformation mattresses under composition.
However, generally we are more interested with finding specific joint variables that will give us desired
and affect their position and orientation.
For example, during point, the point trajectory following we will use inverse kinematics in order
to follow the given trajectory.
So as the name suggests, we need to find inverse kinematics, which is the opposite of forward kinematics
in this formula is the desired and the factor polls and Q is the joint variables.
However, we have to know some realities about inverse kinematics.
First of all, generally, the equations that we have to solve for inverse kinematics are generally
nonlinear and complex, so it's not always possible to find cause form solution for every robot.
Secondly, while the forward kinematics have one solution, the inverse kinematics can have more unique
multiple or infinite solutions, depending on the robot and the desired position, position and orientation,
surely.
Namely, in forward kinematics, you give joint variables and you can get only unique and the vector
position in the orientation.
While in terms of inverse kinematics, in order to reach design and the vector polls, you can have
multiple joint configurations.
Look at the functioning of your arm.
You can take a cop or an object by twisting your arm in multiple ways.
However, in all cases, you reach the desired pose, namely the pause for grabbing the cop or an object.
Anyway, let's continue.
Also, as the number of non-zero the parameters are increasing, the number of admissible solutions
are increasing.
This will be obvious for you in a minute.
And finally, while we can have multiple or infinite solutions, not all of these solutions are achievable
because of physical limits in the robot manipulators such as the joint limits link collisions with each
other and so on.
So after all of these bad news, we have to anyway think about how we can solve this -- problem.
We have two methods in our hands.
Firstly, we can utilize closed form solution to solve our problem, which include geometric and algebraic
manipulations.
Secondly, numerical solution, which includes optimization methods to achieve the solutions.
Both of these solutions have their own advantages and disadvantages, and we will see them during explaining
the.
Let's start with a closed form solution.
First, let's sink what we have in our hands in order to solve India's climatiques problem.
We have the parameters of a robot manipulator that we have seen before.
How to calculate.
And we also have the design and effector position and orientation, which can be represented by rotation
matrix, though let's see how we can use that information to solve our problem.
We can use the parameters in order to find in the vector position and orientation with respect the base
frame in terms of joint variables.
This is just the foreign kinematics problem and we have seen how to do that.
We have to just multiply in the video homogeneous transformation mattresses after we have calculated
forward kinematics of our robot manipulator.
And also we note these are then the vector orientation and position.
We can equalize Eq. 1.0 and Eq. one point one to get joint angles that will give us these are in the
vector pose.
The number of equations has to be 14 normally.
Excuse me, 16.
Normally because homogeneous transformation matrix has 16 entries four by four Matrix.
However, as the last row of the homogeneous matrix is just consist of zeroes and one, we don't need
to take them into consideration.
If you couldn't visualize the solution, don't worry, we will do it in MATLAB in a minute and it will
be clearer for you.
However, we have a big problem with that solution.
As you can notice, as the number of joint variables will increase or degree of freedom will increase.
We will have extremely complex problem to solve.
So this is the downside of this solution or as an advantage, we can get all of our admissible solutions
by this method.
While this method become extremely difficult to use for robot manipulator with more than six degrees
of freedom.
We can find easier application of these for the robots with six degrees of freedom and spherical wrist.
This method is called cinematic decoupling.
I will not give its deep explanation to you because it is not important to know.
But if you are interested, you can find it from standard robotics textbooks.
And based on this method, we divide our robot into two parts.
Namely, the first three joints are responsible for the position of the robot in the vector only so
we can use position inverse kinematics here.
The last three joints are responsible for the orientation of the end effector, and we can utilize orientation
inverse kinematics in this case.
This will simplify the calculations.
However, let me repeat this is valid for robots with six degrees of freedom and spherical wrist.
So after all, these are your ethical issues.
Let's switch to MATLAB and try to apply all of these.
OK, let's not try to apply in mock, but what we have learned.
Let's first clear variables.
Clear the screen.
OK, let's first start.
Um, see the application of inverse kinematics in 2D plugin or manipulator because it will make our
understanding, you know, it will make us understand the problem easier.
OK.
And let's first import e t S2.
And what the star means to mean import all the things.
OK.
This is just standard library from the petrol corpus.
OK.
As you know, we are working with Politico.com's library.
We here define the link lengths.
OK.
And here we define our robot.
OK.
This is our robot manipulator model.
And you can visualize it by doing E dot plot.
Zero zero.
OK.
No, no positions.
Because our robot is.
Let's just write it here to two degree of freedom.
Robot.
OK?
And clutter.
OK.
Planner two degree of freedom robot.
Let's visualize it in our joint, but I are zero zero.
OK, let's press f nine.
And you can see that it's nothing but a planet, a robot.
As you can see, the red ones are red circles are our joints, and they are, as you can see, a rotating
about z axis.
OK, because we have defined it like that z Q1 and Q2 or Q1 and Q2 are our joint variables.
And this is rotating joined by robots and our translation about A1 and translation about A2.
OK.
These are translation about A1.
Excuse me, a translation of A1.
About X and translation of it, about X, OK?
As you can see, one and one VE created a simple plan or two degrees of freedom robot manipulator anyway.
Let's not try to create some symbolic variables.
Q1 and Q2 are our joint variables X and Y.
What is X and Y, X and Y as our robots manipulator will move?
Let me show you again, OK, our robot manipulator will move.
As you can see, its X and Y coordinates will change.
OK, X and Y represents this one because we want our what we are doing is inverse kinematic.
So we are given some end effector position and orientation, and we try to find joint variables that
will give us that end effector post, OK.
For example, if our robot manipulators pose is at this position, OK, for example, x of one and y
of one, then we will try to find what will be our Q1 and Q2 that will give us that end effector position,
OK.
So X and Y represent this one, and they are real numbers.
So what we are doing here, we are finding first forward kinematics, OK in symbolic weight.
OK, let's see.
What do I mean by symbolic weight?
Let's run this one.
And as you can see it, this is the forward kinematics of our robot.
OK, so this is the end effectors position with this position and orientation.
OK, with respect to what?
With respect to base frame?
OK, so what's our translation part?
Because we need translation Part X and Y.
The translation part, as you know, is the last OK column of our homogeneous transformation matrix.
OK?
So this is our X, OK and this is our Y.
So what we are doing here, we are defining here that our X here, we just define Eq..
OK?
This double equality means that this is an equation.
So this is an equation of X equals two blah blah blah blah or this one and y equals two blah blah blah.
Or this one, OK?
This is our X, this is our Y, and we are making e one.
This is our first equation, and this is our second equation.
We will use this E one and E two in order to solve our equations.
So our equations are e one and E two.
We will solve them with respect to what Q1 and Q2 because we want Q1 and Q2, variety solutions are
to have to be Q1 and Q2.
That will give us the desired and the vector post, OK.
And this is our solution as one and as to let's try to run all of these press F9 again.
OK, no need to see this one.
And then now let's check out OK.
As you can see now, as calculated S1 and as two, OK, let's look at the lengths of as one.
OK.
And let look the lengths of S2.
As you can see, we have two solutions for S1.
And as to the first one S1, one corresponds to S2 one.
And as one two corresponds to S2 two.
OK.
Like that?
So we have two solutions, as you can see if we have multiple solutions here, not a unique solution
that we have said before.
Both of these solutions, OK meets our criterion, so give us the desired the and the vector position.
OK.
As you can see, this is the inverse kinematics, but in in a closed form.
But it will be very, very difficult if we applied these robots with more than six degrees of freedom
or also in six degrees of freedom.
If we don't separated into, you know, if it doesn't have spherical Reese and B doesn't do kinematic
decoupling as a homework, I will give you in order to apply this the same, you can do that and you
can see that it's really very difficult to do that.
You can do this method.
Apply this method to promote 560.
So as you know, in human five six, this is really at, um, pivotal caucus library.
So you can take this.
You can calculate forward kinematics, find the end effector pause, OK?
And after you can find for re kinematics, you can take desired pause.
For example, let's take you can find the desired in the vector position that is um p five six the dot
f kinematics.
Okay.
Just for nominal polls, okay.
This is your desired in the factor position and orientation.
You can equalize.
You will have 12 equations and you have to solve equations and you will see that.
I don't know whether you can do that or not.
I mean, not as surely you can do that, but in terms of MATLAB, I mean, you have to try this.
You can try and see that it will be very difficult to do and think about that.
What will happen when we do that with the redundant robots?
OK, more than six degrees of freedom robots, it will be impossible to solve.
Almost impossible to solve.
OK.
As you can see, here we are using now.
We came to three degrees of freedom.
Excuse me, six degrees of freedom.
Robot, OK, in 3-D workspace.
Hmm.
OK, let's clear everything.
Clear and cool everything.
If there is anything, OK, now what we are doing, we will first import our in the output of our 60
and we will use.
OK, now we will first find the desert and the vector orientation, and we want this out in the vector
position.
And when our joints are at nominal or position, OK or configuration.
Q And is this one?
So our first joint, this is our second, third, fourth, fifth and sixth.
When our joints in this position are in the vector will be in that or postdoc position and orientation.
So we want to find inverse kinematic of this one.
Let's find inverse kinematic of this by I kinematics six as power.
Be careful this is for spherical robots.
OK.
The robot with six degrees of freedom and spherical wrist, as we have see.
Then we can apply what kinematic decoupling and solve our English climatiques easily.
What this function does is the same as kinematic decoupling.
Forget this is for all this vertical wrists and six degrees of freedom robots.
You cannot apply this to redundant robots or robots without, um, spherical wrist.
OK?
As you can see now, let's be calculated the inverse kinematics and get our desired joints.
As you can see, our design joints are very, very different from Dan from that our original one.
OK.
Why?
Because we have seen that our robot with during in the market, we can have multiple or even infinite
solutions, OK?
As you can see, this is one of the multiple solutions which is different from CU end.
So when you give that joined the values to your robot manipulator, you will get this in and the picture
orientation.
And in the same way, if you applied these joint variables, you will get again the same joint, excuse
me, and the vector pose.
Let's check whether it's correct or not.
Let's find again forward kinematics of our robot manipulator AQI.
If Q and Q and do give the same and the vector pose, then the answer of this will have be have to be
equals to T.
OK, let's calculate press f nine.
Oh, excuse me, but do it in this way and press f nine.
OK, now let's see our t.
As you can see, they are almost the same.
OK?
They are almost the same.
What does it mean?
This means that two AI and Q n while they are very different joint variables.
OK, as you can see, Q and I are very different.
However, when they are applied to our robot manipulator, they give the same end effector pause.
OK, now let's try to visualize Visualize.
OK, now you can see that here our robot manipulator have different configurations and they're, you
know, different solutions will give different configurations to our robot, OK, in order to reach
the same.
And the factor, for example, what does it mean?
Are you, for example, our robot manipulator can have, um, right side and arm up, OK, elbow up
or lift or lift and elbow up or right elbow down or lift.
Elbow down.
OK, let's try to visualize this one.
For example, you will see what I mean, and let's try to p 562 dot plot three d July one.
As you can see now, you can see that it is right, OK?
As you can see, this is right and the elbow up.
As you can see, the elbow is up.
Let's see.
Now let's.
And elbow up, what does it mean?
Okay, try to visualize this one.
Oh, excuse me, this is one, but we want Q I too cute.
I too.
As you can see, now it is left it.
Can you see the difference?
Let me just do this is the same the problematic side with the competitive cookies library that if I
do again, plot 3-D, it will update us on this one.
So you have to watch it separately, but be careful.
You can see that it is the left side, OK and elbow up.
As you can see, there are two completely different configuration.
But and for Q1, as you can see, this is right side of the robot.
There are two different configurations, but end effector is the same pose.
OK, we achieve the same pose.
This me, this is what does it mean?
Inverse kinetics have multiple solutions.
OK, you can also have elbow down configuration.
Let's check what will be elbow tone.
OK.
As you can see now, our elbow down.
Yeah, you can see right and elbow down.
Now let's check for the left and elbow down.
You can see that all of these gave the scene and the orientation now, as you can see, this is don
elbow down, OK and left side.
You can also check with wrist rotated or wrist not rotated like that.
OK.
As you can see, for one and the victor pause in order to get one in the fact we can have multiple joint
configurations.
So this is what inverse that means that in the kinetics have multiple or infinite solutions.
What if we do this one?
Because there are some cases that are we can want our in the vector to achieve, but our robot's physical
limits don't allow that.
OK?
For example, if you try to reach something that's very far from you, your arm cannot reach it.
OK, so your inverse kinematics will give an error.
OK, your hands in the schematics will give an error or your brain because your brain calculates inverse
kinematics.
For example, if some object is very far from you and you want to grab it, hold your arm in length
is not sufficient, so your brain will see to you that you cannot reach it.
OK, because there is a problem, there is no solution for your innermost kinematics.
The same way if we give, for example, translation on X X is three units.
Our robot manipulator will not reach three metres.
OK, our robot, the manipulator cannot reach at the end.
The fact that we have not, we will not be able to reach to that end effector position.
OK, so our English schematics will return.
None.
OK.
As you can see, turning point not reachable.
This can happen when during the robot reaches two singularities or in the singularities or even our
links are, you know, colliding with each other.
So that's why sometimes the inverse kinematics have no solution.
Or it can also happen that the solutions that are formed by inverse schematic, some of them are not
applicable because of, as you know, the physical limits of our robot manipulator, because during
inward schematics, we don't take into account account the internal collisions of links or, uh, you
know, the length of the robots manipulators.
The physical limits of our robotic manipulator in terms of length.
So that's why our inverse clematis can also don't find any solution to our end effector posent orientation.