This content introduces inverse and differential kinematics for robot arms, building upon forward kinematics. It emphasizes the importance of understanding a robot's workspace before tackling inverse kinematics and explains how to analyze robot workspace, solve inverse kinematics problems using algebraic, geometric, and numerical methods, and delves into differential kinematics, including Jacobian matrices and singularities.
Mind Map
Click to expand
Click to explore the full interactive mind map
All right, welcome to the class today.
Today we are going to introduce inverse
and differential kinematics. And this
would be assuming that you are already
familiar with forward kinematics. If you
need a refreshing, please uh review the
materials we have on the forward
kinematics. So uh long story short,
inverse kinematics is trying to answer
the question that if we have a desired
end factor location and orientation, how
can we find the the joint rotations or
joint translations that can achieve the
target or desired any factor poles? And
differential kinematics is trying to
answer the question on finding the
relationship between the the joint
velocities and and any factor angular
But before we move on to uh inverse and
differential kinematics, let's take a
quick look on what is the workspace of
the robot arm first. This is because
inverse kinematics solving inverse
kinematics can sometimes be complicated
and sometimes it can be computationally
expensive. So before we move on to solve
inverse kinematics, we want to make sure
that first the desired manufacturer
location is within the robot workspace.
So we have a solution for inverse
kinematics and then it will worth our
time and effort to move on to solve it.
So we should first look at the robot
workspace first. We should check if the
target location we want to uh we want
any factor to go is actually within the
robot workspace.
So robot workspace is actually is
defined as a um it can be a a space in
3D uh it can be a 3D space it can also
be a um a space in a in a planner uh
view. So it can be 2D, it can be 3D um
depending on how we define the uh the
working environment of our robot. And
there are uh typically two types of the
um of the workspace. The first one is uh
is dextterious workspace which uh means
that uh inside inside that workspace we
we can have our robot uh any factor to
reach the a target location with all
possible orientations
which means that if I reach a certain
location I can actually reach this
location in various angle and and in all orientations
orientations
And another one is of course the
reachable workspace which means that we
can we can still reach
um any points in this workspace but we
might not be able to reach a certain
Let's look look at a quick example here
that let's assume we have a very uh
simple planner robot that we have two
joints and two links. So we have join
one here which is set theta 1 and we
have join two here set theta 2 and we
have two links one is 10 cm and one is 8 cm
cm
and if we assume that uh we have no
joint limits which means that all the
joints they can rotate for uh 360°
and then if we draw out the workspace
it's actually um pretty straightforward
that We will we will have a workspace
that the uh the
the furthest that the the robot can go
is to reach as far as 18 cm. It will be
10 uh cm plus 8 cm which means that we
have our robot arm to be fully uh stretching
stretching
and the closest point that we can reach
is 2 cm. We cannot reach anywhere
within two centimeter because even if we
fully folded back the second um even if
we fully folded back joint two this will
be the e uh this will be the uh the
closest point that we can reach and we
can we can no longer reach uh anywhere
closer within two centimeter.
And we can also see that for this um
workspace all the points inside this uh
yellow workspace they are reachable um
they are reachable workspace because uh
if we want to go to a certain point for
example the point here
it either it will be either we can uh go
through this uh we can have orientation
of this or orientation of this one. It
is not we are not able to uh reach this
certain point with all possible orientations.
And if we further take a small
modification to our robot, now the two
links they are no longer eight and 10.
Instead they are all 9 cm.
And then what we can find is that the
robot workspace now
becomes a full circle that we can reach
all the point all the points inside this
circle and the diameter would still the
the radius would still be uh 18 cm. But
now we can we can reach the center of
the circle at this point.
And we should also pay attention to that
for all the other points for example for
the points
except for the center of the circle
these points they are still reachable
workspace but for this
center of the
circle that specific point is is
dexterious workspace because we can
actually fully folding the robot arm
like this
to reach the center of the circle. And
we can actually rotate
this configuration all the round so that
we can actually reach the center of the
uh center of the circle within with all
And furthermore, if we make another
modification that we uh we now have the
the two links um change back to 10 cm
and 8 cm, but now we've add a new joint
joint three right at the end factor.
That would immediately change the entire
workspace into dexterious workspace
because we can use join one and join two
to reach any point in the robot
workspace and then we can use join three
to change the orientation of the end
factor with all possible orientations.
So adding a join three uh here
immediately change all the robot
workspace into dexterious robot workspace.
And now let's consider joint limits
because for most of the um most of the
robot arms in in real world we might not
be able to have joints that can rotate
for 360°. We might have some joint
limits. For example, let's consider this um
um
2D planer robot. We have similarly we
have two join. We have two joints and
two links.
But this time
instead of being able to rotate for 360°,
360°,
we can we have joint one that can only
rotate from zero to
to
180 degree. And the SATA SATA 2 the
joint two can only rotate from 90
negative 90° to 180°
180°
which means that we can have uh joint one
one
to rotate from zero all the way to
180 and we have
join two that can rotate from negative
90. So we will we will often consider
this as zero uh rotation for joint two.
So negative 90 would be here and then it
can rotate all the way to 180° which
means that it can actually rotate to be
fully folded back in this way.
So this is roughly the u the mechanism
of the robot arm. And then let's take a
look on how we can find the robot
workspace of this robot arm.
So this is um the this is how we can uh
solve for it. Uh
there are a bunch of colors uh we should
pay attention to. So if it is labeled as
as blue, it means that um at this moment
this this link or this link is uh is
resulted by we have a we have the joint
uh to be at its minimum um rotation and
similarly if it's showing red it is
maximum rotation and we will we will use
orange color to describe if the robot
arm or if if this joint is actually
fully stretching the next link to be
with the previous link. For example,
um we can see here that um at this point
this blue bar means that we have joined
one to be at its minimum which is zero degree.
degree.
And this blue bar means that we have
drawing two to be at minimum rotation.
And similarly um we have here you can
see at this location joint two is still
in its minimum while joint one
showing red which means that it's as it
it is at its maximum rotation.
And the orange color here it is showing
that um at this moment we have drawing
two to rotate to be rotating as such as
such that the robot arm is fully
stretching. It's is it is reaching the
longest distance it can reach and the
green color shows fully folded which
means that we have the we have drawing
two to fully folded folding the next
link back to the previous link. So
that's how we label it here because
these are these would be very important
situations that we need to consider once
we are uh analyzing
the u the robot arm workspace.
So first we should look at um if we have
joined one to be at minimum and to be at
maximum. Which means that we have joined
one have that that has been minimum or maximum
maximum
and then um
at this moment we will consider we have
draw two rotating. So we can see that if
we have if we if we have the uh joint
one to be at the minimum
position and then we can rotate joint
two. So join two can rotate from
positive
180 degrees. So this is what we can do
the uh for the the range of rotation
that um that joint two can do. So this
will give us the arc that I marked as
red here. And then similarly once we
have the
once we have the uh joint one to be at
its maximum then we can similarly also
rotate joint two from its minimum 90 all
the way to
180. So these two arcs they are resulted
by we have joint one to be at minimum uh
or maximum
and then we rotate join um then we
rotate joint two. Now we can further
consider joint one can also rotate.
Joint one can rotate from here
from zero all the way to
180. And that can result in we are
actually using this
we are actually using this arc to
kind of a scan and paint this space. So
eventually that will result in the two
And eventually we also need to consider
that if we have
joint one at minimum which is here and
join two also
also
at minimum which is here. And then
if we fix joint two to be at its minimum
which is 90 negative 90° and then we rotate
rotate
joint one. So which means that we are
actually rotating this line and it will
draw the arc here.
This red arc will be uh generated by if
we rotate this
this line and with the with a with this
um with this radiance. So you can then
find out that this
is actually the the closest
uh distance that we can reach under this
configuration. And we can actually we
can reach these this area but we cannot
So furthermore, if we uh if we combine
all the previous um arcs that we draw
from the u from from from rotating the
joints then we can the these are all the
arcs that we draw and we can clearly
find out that um
this arc is actually within the uh the
workspace so we don't need it and also
this arc is also So within the workspace
that we don't need it. So furthermore if
we u remove all the unnecessary arcs
this closed shape would eventually be
the workspace of the robot arm that we
uh described before.
Um this is not a this is a even if we
have a clear pipeline on how to draw the
robot workspace. This is definitely not
a trivial task and it actually requires
um a number of practice to be familiar
and to to master uh how do we find the
robot workspace.
But even if we practice a lot, the the
ability that human can uh can just
manually draw the robot workspace is
still very limited. We are not we can we
can we might be able to do it well if
the robot arm is uh is is work is
working in a planer space. But assuming
that we have a huge number of drawings
that and the robot arm can work in 3D
space, this can actually be very very
complicated because we are then not
drawing a a shape on 2D plane. Instead,
we will draw a volume in 3D space which
can be very complicated.
So this conventional way may not be a
very very good uh approach if we are
really working with for example an
industrial robot arm with six joints and
that can it has a pretty large and
complicated shape of of workspace in 3D space.
space.
Um so this would be um this would be the
uh the pipeline and the procedure that
we can uh we can draw the robot
workspace manually.
we need to carefully follow these steps
to u to draw the robot robot uh robot
workspace accurately and correctly. However,
However,
in real practice u as we mentioned for many
many
industrial robot nowadays industrial
robot arms nowadays
it might be very difficult to apply
these methods. Instead a more feasible
way is to use Monte Carlo visualization
or Monte Carlo simulation of the robot workspace.
workspace.
Um by using this method what we
eventually can get will be the point
clause that can represent the workspace
of the robot arm. So this is uh for the
WAM robot arm um that researchers have u
have performed the Monte Carlo uh
visualization of the robot workspace.
And this is what I did for the Raven 2
surgical robot on the robot workspace.
And uh furthermore, I've I've used some
special colors to kind of represent the
the edges of the robot workspace to just
to provide a better visualization.
Um I I did this where uh when we have no
um AI for coding nowadays I believe it's
not difficult that we can ask uh
language model to generate code that can
give us a very good Monte Carlo
visualization of the robot workspace. Um
so this is overall what we can get from
Monte Carlo visualization but how we can
do it and why what is mont monteardo visualization.
visualization.
So overall the idea is not difficult. It
is it is from forward kinematics.
From last week we've learned forward
kinematics and once we've we get the
forward kinematics of the robot arm
it will mean that we get this function.
Basically forward kinematics give us
this function f that we can simply just
input all the um we can input all the
joint positions and then we will get any factor
factor
if uh position and orientation.
So what then what we can do to generate
that point cloud is fairly
straightforward that
we first need to get all the joint
limits. Similar as before that for
example we have the joint we have joint
one that can rotate from zero to 180
degrees and then we have joint two that
can rotate from one angle to another
angle and so on and so forth. And then
we can randomly sample
the joint positions within the joint
limits. For example, uh I can have
hundreds of examples, hundreds of
samples that uh I have joined one equal
to one degree, two degrees, three
degree, so on and so forth. It can be
random. It can also be with a fixed
interval. um it uh as long as we have a
a large enough numbers we we should be
be able to get a a good point cloud. So
we just need to randomly sample a bunch
of point points that we have uh
different uh joint positions and then
we we simply have all of these uh
to get the target um to get the factor
uh position and orientation.
And then
we just need to plot all of these um all
of the any factor positions in the 3D
space and that will give us a point
cloud. For example, if I have 1 million
um random uh random joint positions and
we plug plug in all of these uh 1
million joint positions into forward
kinematics and then we get 1 million 1
million antifactor poles and then we
just need to draw the antifactor poles
in the 3D space and eventually what we
get will be a point cloud like this. Uh
as far as I remember this is more than
one meter. There's probably um a couple
of meters um of points that give us a
very uh solid uh representation of what
the Raven 2 surgical robot workspace
would look like.
And once we have this point cloud, it is
also not difficult to use it to check if
one certain point is within
the robot space or not. For example, if
I have one point here, then I can easily
check this point uh if it's within the
workspace and then we if we have another
point that is outside the work
workspace, we can also easily check it.
Uh one of the simple method that that
can be uh we just need to find some
closer points the closest points of the
um of the workspace point point cloud
the the the target point that we want to check.
check.
For example, here if the point is
outside the workspace, we can see that
all of these uh vectors they will have
similar uh orientations. Well, if
the point is inside the workspace, we
might be able to find out that these
vectors they kind of point in in all of
Now we've uh we've introduced how do we
find the robot workspace and then we can
move on to work on inverse kinematics.
We've learned forward kinematics before
in the previous week and eventually what
forward kinematics give us is the
function or the relationship that we we can
can
input all the joint positions and get
the any factor poles.
So inverse kinematics literally is
inversing the function so that the input
will this time be
the factor pose and the output will be
the joint positions that can achieve
But for forward kinematics what we often
have is is a standard pipeline that um
as as we mentioned in the previous
lecture we just uh we need to perform
link frame assignment and then
uh and then we perform uh then we find
the DH parameters and then we find the
transformations uh for each each row in
the DH parameter table and eventually we
combine the the transformations from
drawing uh from from frame zero to one
one to two so on so forth and get to the
any factor. So you can see uh even if
it's even if there's a a bunch of work
that we need to do it's kind of a a
pretty fixed pipeline that to to do it.
But for inverse kinematics there's um
there is unfortunately unfortunately
unfortunately no um fixed pipeline or
very standard pipeline that we can work
on it. So inverse kinematics is
generally considered a bit harder than
forward kinematics and there are some
questions we need to consider. First of
all do we have a solution? We might have
a point we might want to control the
robot to reach a certain point but that
point is actually outside the workspace.
So there's act so there is actually no solution
solution
and if the solution exist how can we
find the solution and eventually if we
can find the solution do we have
multiple solutions and how we can choose
Let's first take a look at uh the
solutions of inverse kinematics. We
might have finite solutions, we might
have infinite solutions or we might have
no solutions.
Uh again we we can consider a simple uh
two joint planer robot that we only have
two joint uh joint joint one here and
join two here. And
And
we have two joints which means that this
robot arm has uh two degree of freedom.
And for a planer robot if we only
consider the location of the manifactor
which is X and Y here it will be um you
can see that we have two degree of
freedom robot arm and we are also
working in a two degree two degree of uh
freedom workspace. So joint one and join
two versus X and Y two degree of freedom
on both side. This often will result in
finite solutions.
But we can see that even if we have
finite solutions, we don't have one
single solution. Instead, we will have
two solutions as shown in the figure here.
here. Um
Um
in this if we have the if the degree of
freedom of the robot uh workspace and
the degree of freedom for the robot
joints they are uh equal to each other
we will we will uh say uh this work uh
this task is uh completely specified and
we will often get finite solutions out
of this case. Um and in this uh specific
scenario we will often call this is this
configuration as elbow up and this
configuration as elbow down.
So very likely uh even if we have
completely specified the task we we
might we might not be able to get only
one single solution. Instead we will
often get f uh multiple solutions and
often we need to pick one of the best
solution that we want to use. And long
story short uh once we are choosing
among multiple solutions
a general recommendation is we will
choose the solution that result in the
minimum movement of the robot arm in for
example if I'm already in this
configuration I might prefer just to
move the robot a little bit instead of
move the robot all the way to elbow down situation.
But furthermore if we add one more
joints to the robot arm. So that this is two
join but now here we have three joints
but we are we are also just considering
the position X and Y. So we have three
joints versus two uh dimension workspace
which is just x and y because we are uh
here let's assume we are not considering
the orientation we are not considering
the orientation of the factor instead we
just consider the position
position
and then if we have more degree of
freedom in joints and less degree of
freedom in the task in the robot workspace
workspace
then we will what we will offer can get
is infinite solutions. We can see that
from this figure we can see we all we
can reach this uh target location with
with infinite uh possibilities on the
robot arm configuration.
So um this is often called kinematic
redundancy and actually many robot arm
nowadays they actually designed for the
kinematic redundancy because this can
actually provide us better dexterity in
the robot arm control. Um
in general for for a 3D space if we want
if we want full control on both position
and orientation which means that we have
full control on both XYZ on position and
RPY angle on orientation that would
would result in six degree of freedom.
So if we if our robot arm has uh six
joint six joints which which often means
that we will have um uh completely
define a specified uh task which we will
get finite solutions but many many uh
robot arm today they might have seven
joints or even more. So they will have
some kinematic redundancy and it
actually improve the robot arm uh with
better dexterity but that also the
trade-off is that the control might be
uh more complicated. So it really
depends on uh do we want simple control
or do we want better dexterity of the
And for sometimes the inverse kinematics
may not have a solution which means that
the target location uh that we want to
reach uh cannot be achieved by the robot
arm. There are two general uh situations
that can result in no solution. The
first one is we don't have enough degree
of freedom or is too far or too close to
reach the uh to reach the uh that point.
For example, this point
is clearly outside the the robot
workspace is too far to reach. And this point
point
obviously is too close to reach. Even
even if we fully
even if we fully fold back the second
joint, the probably the closest point
that we can reach is here.
So we can reach no clo no no closer uh
points. So this point is probably is
very likely uh too close to reach. And
for example, if we want to reach this
point but not with
this direction or this direction,
instead we want to reach with this
direction. then we might also get no
solution because the you can see that
the only two configuration elbow up and
elbow down configuration we can reach
is through the uh is either through this
orientation or this orientation. So this
is um this is typically um a classic
problem on we don't have enough degree
of freedom to reach this uh x uh three
orientation but we can then if we add
one more joint
the any factor if we add one more joint
here we will be able to
reach this uh location with our desired
orientation x3 three.
So this is these are the typical
examples on we don't have uh enough uh
degree of freedom or the points is uh
the points are too far away or too
close. It's outside the they are outside
the robot workspace but it can also be
outside the joint limits which is this
orange point. So
in for this problem um
it is similar uh in practice it is
similar issue that the robot just
similar uh just cannot reach this point.
Um but that would be uh still be uh
technically different because uh if the
if this for this yellow um for this uh
orange point it is basically that uh we
cannot reach because we cannot rotate
joint one
beyond beyond this yellow uh be beyond
this blue uh limitation. So if somehow
we can break this limitation this point
is actually reachable with the robot arm links.
links.
So the difference here is is that um we
can find the first situation
during the solution of inverse
kinematics during the um the solution
method that we will uh introduce later
on. So if we have the first uh situation
what we will get is we might be able to
find out that um we want to use ark sign
but uh uh we want to we want to compute
ark sin x but x
is larger than one or we want to take
square root of x but x is smaller than
zero then they will result in imaginary
part in the solution. And that generally
means that we have no solution.
But if the case is the second case then
the then we will not be able to find uh
similar clues like we are taking square
root of a negative number. Instead we
might be able we might be able to get a
get a solution angle out of the solving
procedure. But eventually we still need
to check if these joint positions or
joint angles they are actually uh within
the joint limit. So which now you'll see
the difference is that if we have the
first uh situation that we have no
solution then
we will we will be able to find it out
during solving procedure. But for the
second uh case we must double check the
joint limits after we get the solution
because we will get solution. It's just
that solution is outside the joint limit.
So overall the methods of solving
inverse kinematics uh generally we have
three major types of uh solution. The
first type is closed form solution.
Closed form solution means that we will
get a symbolic solution. Um that um for
example what what we will get is that we
will get say the one the joint one that
is that is a function of uh x y z and
orientations of the factor. So once we
get uh once we tell the robot the XYZ
location we want the manifactor to go
this function will give us um theta uh
angle of the join rotation. So we can
then control the joints to reach the target.
target.
So this is closed form um solution.
Um another major
type of solution is the numerical
methods. Instead of getting a symbolic
solution um numerical methods will will
often iteratively solve for equations
instead of using symbolic ways to u to
solve the uh to solve the equations. So
it will uh generally numerical method
they are uh they are often easier to be
implemented because once we have the
uh once we have the equation uh
described we can then u write write some
program to solve to numerically solve
the equations. Well for closed form
solution we often need to manually solve
uh the solve the equations by ourself.
Um today we will focus more on uh how to
obtain closed form solution because
uh first of all uh numerical method they
are they often follow
a straightforward or fixed pipeline that
we just need to um code for the uh
numerical solver for the equations. Well
closed form solution it actually
requires some uh tricks or techniques to
do it. Uh so
so
now the question is
if we have numerical method they are
very easy to use and they can also give
us solution. Why do we still want closed
form solution
that we have solved to we have to do all
the math and we have to solve all the
equations by our using our hands and our brain.
brain.
The difference in the computational
efficiency is that because numerical
solver numerical method they are all
they are they are often iterative. So we
might need the solver to run thousands
of iterations to find one valid
solution. So that can be pretty slow if
we want to control the robot arm in real
time with a very low-level controller.
Well closed form solution is more more
like once for all. If we have a symbolic
solution and then in the uh in the
real-time control we just need to plug
in all the numbers and then get the uh
get the joint angle that that can go to
the target. So closed form uh solution
will generally be way faster in
computing than numerical method. So
that's a benefit on why do we still want
the closed form solution and actually in
uh once you are uh once you use uh Ross
move it package they are they provide IK
function and IK fast function. So IK uh
inverse IK indicate for uh inverse
kinematics. So IK function generally use
numerical method and you can find out
that if you have a complicated
environment to to do the robot arm pass
planning the uh the default IK function
in Ross move it can be pretty slow. Well
IK fast use closed form solution and
that can be way faster than default IK.
But the the question now is if we want
to use IK fast we need to provide
symbolic solution to the uh to Ross move
it package and then it will be way
faster. So that's the benefits and
motivation why we still want to learn
and use closed form solution because it
can be way faster in real time control.
And the third method is hybrid method
which means that um we kind of take
advantage of both closed form solution
and the numerical solution.
So the closed form solution we will use
closed form solution for some joints
that we can easily solve and then they
will be way faster in real time control.
But some other joints might be very
difficult to solve it symbolically and
then we can for these joints we can use
numerical method. It's kind of like a
combination of a closed form and
Today we are uh we are going to mainly
look at numerical solution. Um and first
since we are working on inverse
kinematics we might also need to work on
the inverse of matrix and specifically
here for robot manipulation we are
looking for homogeneous transformation.
Uh again if you are uh if you need a
refreshing on homogeneous transformation
please go to our materials in 516 on
coordinate system and homogeneous transformation.
transformation. Um
Um
generally once when we talk when we talk
about matrix uh the uh inverting matrix
matrices they are not always invertible.
However, uh specifically for homogeneous
transformations and the rotation matrix,
they are always invertible because
because
physically we can understand this as a
transformation or a rotation. They can
always be on down. If I can move one
cube, if I can move the cube from the
base to this location, which definitely
means that I can also move it back.
So uh
homogeneous transformation matrix and
rotation matrix they are always invertible
invertible
and here gives the the formula on how to
do the u inverse of the of a homogeneous
transformation. Um
for rotation matrix it's actually pretty
uh simple to uh invert rotation matrix
that that is the the transpose of the
rotation matrix is the inverse of the
rotation matrix and please make sure
that um please keep in mind that it's
not it not it does not apply to all the
matrix um specifically it mainly applies
for rotation matrix if I have a random matrix
matrix
an arbitrary uh matrix. It it does not
mean that I I can use a transpose as inverse
inverse
and this is the inverse of the um of the
translation vector and we will not go
through the um uh the mathematical
details on how to derive this. Um but
this formula here is uh is pretty uh
straightforward and easy to use.
And we will also quickly review uh that
we have s and cosine uh and we will also
have arc sign and arc cosine. So
basically arc sign is that if we give a
sign value of an angle it will return us
that angle. So it's inverse of s and
similarly arc cosine is inverse of cosine.
And then um we have the uh the the
formula of the sum of angles. If we have
cosine theta 1 plus theta 2.
Um and again in our note
here in robot manipulation we will use
c12 to represent cosine uh theta 1 plus
theta 2. So you can see this is a very
uh clear and a simple notation because
in the future we might see a very long
equation so that if we write all of the
uh signs and cosine in this way the
equation will be super super long. So
it's of our interest to represent the uh
the signs and cosine in the in a very uh
concise way that we are using here.
And the equation is uh the formula is
basically given here that if we have the
if we have cosine theta 1 plus theta 2
it basically equal to c1 c2 cosine theta
1 cosine theta 2 minus s1 s_2 sin theta
1 sin theta 2
and uh these are the uh the equation for
the sum of angles and we also have the
law of cosiness.
Um we will not do all the math details
today but this law of cosine cosiness
can sometimes also be very very useful
And besides the inverse of s and cosine
we sometimes or actually more frequently
we will use the inverse of tangent.
But in terms of using arc tangent there
is problem that arc tangent is ambiguous
of quadrant which means that if one if I
have uh if I'm using arc tangent I'm
actually not
not able to tell whether that angle is in
in
the first quadrant or the third
quadrant. And similarly we we might also
not be able to differentiate
the second quadrant and the fourth
they actually have the same um tangent
value. So if we use arc tangent we
actually don't know where is this angle.
So instead of using arc tangent
in robot u manipulation inverse kinematics
kinematics
it is highly recommended that we use arc
tangent 2.
Um so arc tangent 2 is basically trying
to preserve the you can see that for arc
tangent we only have one input argument
instead for arc tangent two we have two
argument and such that the uh the
positive and negative sign of the uh of
the two inputs they are preserved. So we
can actually find out that if we are in
first quadrant then both y and x they
are positive while if we are in the
third quadrant they are both negative.
So that's a benefit of using arc tangent 2.
2.
Um if you want to look uh more about uh
arc tangent versus arc tangent 2 uh you
can take a pause here and then uh search
In terms of solving inverse kinematics,
we will first take a look at algebra
bracket solution. Um it might looks a
little bit complicated but overall uh
what we are doing in algebraic solution
is basically solving equations. So
So
as we've learned from the forward kinematics
for a robot arm we can um the forward
kinematics will give us the homogeneous
transformations and in which let's
assume if we have all the uh drawings to
be rotational then uh the the variables
will be um set theta one and sorry this
should be theta 2 will be set theta 1
theta 2 theta so on and so forth. Um,
including all of our joint positions
and that would eventually uh if we
compute all of that we will what we will
get is um is a combined homogeneous
transformation in which we can find our
rotation matrix which is which can also
be converted to rpy angle or zyx oiler angle.
angle.
Um if you are if you need a refreshing
of what is RPY angle and ZYX oiler angle
you can also refer to um uh 516 material
and also uh we we get the translation
vector on XY
and Z 3D position. So
So
in forward kinematics we we often in
most of the cases we consider they are known
known and
and
the combined t 0 to n
this is on no
no
But
now we are working on inverse kinematics which
which
we will assume
that this
is known. the the combined t from zero
to n this is known while
and here the diff the differences will be
be
in the previous um in the previous
lecture once we are working on forward
kinematics we simply just need to plug
in those theta values to get
the to get t to get t from zero to n.
But now
since we have t 0 to n to be to be known
while all of these theta n theta theta
rotations joint position they are
unknown. We then need to solve for these
status and this task is nontrivial
and uh most of the difficulty of inverse
Um so generally what we can do is now
we've uh we've write all of these uh
values out. So basically on the uh
on the left side of the
of the equation all of these values are known
known
and the forward kinematics values they
of the equation.
So these R112 R33 and X uh XD YD ZD they
are known uh and oh so the XD YDZD here
D um indicated for desired. So often
what we want to do in inverse kinematics
is that we have a desired and factor
location and we want to solve for the
joint positions that can achieve the
certain location.
so generally uh what we will get is that
here um we will keep these theta values
as u symbolic values and then after
multiplying all of this we will get
another big matrix here
which in in in it we will have a lot of
like signs and cosiness. and so on and
so forth. And
eventually we will get a a bunch of
equations that for example here u what
we get is R11 equal to C1 S2
and so on and so forth we will get get
R12 equal to uh this entry and R13 equal
to this entry and so on and so forth. So
we kind of get a bunch of equations and
we then want to solve these equations.
This this can sometimes be very very
difficult. Um but there are some tricks
that we can use and we will introduce
later on. But overall u a general
procedure is that uh for example if we
can get
theta one or theta n solved let's say
somehow we combined some equations and
we solved theta 1 and theta n first and
then we can move these two
terms because they are now solved they
can be considered as known. So we can
move these two terms to the left hand
side of the equation.
We can move them to the left hand side.
So that now the right hand side will be
uh will be simplified because uh
previously it has n unknown variables
from the one to set the n. But now it
only has n plus n minus two unknown
variables starting from setta 2 to n uh
to set the n minus one. Sorry for the
mistake here. So this will should be
theta n uh plus uh minus one.
So again and again we will we will do
this again and again. So once we get one
uh angle solved we then consider that is
known and then we simplify the equations
and then we do it so again and again
until we solve all the angles.
So this is a general uh workflow of uh
algebraic solutions on inverse
kinematics. Uh let's look at one example.
example.
So this is actually a pretty easy
example for most of the industrial robot
arms uh which has more than uh six uh
joints. The in the inverse kinematics
algebraic solutions can be very very
complicated. But here uh we are looking
at this simplified robot arm which only
has three uh orientations
and we are only considering the uh the
orientation uh sorry. So this uh
simplified robot arm has only three
joints and we are only considering the
orientation of the manifactor and we are
ignoring all the we are ignoring all the
So what we get here is again
all of these values they are known and
all of these values
they are on known
known
all of the uh specifically it's actually
all of the theta values they are unknown
but uh generally on the left hand side
uh of the equation they are all known
from R11 to R33 they are known and
on the right hand side um
the cosine uh angle a cosine angle b and
c they are unknown because we do not
know the joint rotation uh a b and c.
So for this this example instead of
using joint one two three uh we are
Now let's take a look at how we can
solve it.
So um on the right hand side is actually
the forward kinematics equation. Um we
have our we have uh skipped uh link link
frame assignment and also the forward
kinematics part. So we we directly give
the forward kinematics sol u result
here. So we can focus on the uh solution
of inverse kinematics here.
So on the again on the left hand side of
the of the equation we have uh these
R112 R33 values to be known and on the
right hand side we have ABC to be
unknown and we want to solve for them and
and
a general procedure is to look at the
these equations and try to find out um
which equations
or which what combinations of equations
can can can isolate some joint angles
out so that it's it will be easier for
us to solve it.
So by looking at this this uh this huge
matrix here
um intuitively for as for now I do not
want to touch these
these
entries because they are uh they look
pretty much more uh complicated and we
might need a lot of computation to to
really trying to isolate one uh one angle
angle
of these complicated equations. Instead,
So what we uh what we can
work on first is that we can try to find
out how we can combine because um for
these two terms
they they not only contain one uh
unknown variable but instead they
contain two unknown variables A and B.
They both have unknown variable A and B.
So what we want to do here is we want to
is that we want to isolate the um
we want to isolate the uh the unknown
variables so that like we have only one
variable in one equation which can be
we can first look at these two terms.
So that we have r11 equal to
ca cb cosine a and cosine b and we have
r21 equal to s a c b which we will write
the equation down here. And
And now we have two equations. We have two
now we have two equations. We have two unknown variables. But we have two for
unknown variables. But we have two for each single equation we still have two
each single equation we still have two unknown variables we cannot solve. Um
unknown variables we cannot solve. Um but here we have one trick to use that
but here we have one trick to use that is
from middle school. We probably all learned that sin square a + cosine
learned that sin square a + cosine square a equal to 1.
square a equal to 1. This is very nice because you can see
This is very nice because you can see that we have even if a might be unknown
that we have even if a might be unknown but as long as we can somehow get sin
but as long as we can somehow get sin square a plus cosine square a we can we
square a plus cosine square a we can we cancel out a to be a constant number one
cancel out a to be a constant number one which is very easy to use. And luckily
which is very easy to use. And luckily we can see that for these two equations
we can see that for these two equations we get here
for these two equations we get here.
here. If we just simply take the square of the
If we just simply take the square of the two equations and then add them up, then
two equations and then add them up, then we will have R11 square plus R21 squared
we will have R11 square plus R21 squared equal to CB² time CA 2 + S A square.
equal to CB² time CA 2 + S A square. This is sin A square plus sin this is
This is sin A square plus sin this is cosine A square plus sin A squar which
cosine A square plus sin A squar which will be one.
will be one. So eventually simplify this equation we
So eventually simplify this equation we will get CV²
will get CV² equal to R11 square + R 21 squared
equal to R11 square + R 21 squared and as we mentioned R11 and R21 they are
and as we mentioned R11 and R21 they are both known variable they are both
both known variable they are both constant act constants actually so here
constant act constants actually so here we get cosine B square and we just need
we get cosine B square and we just need to take the square root to get cosine B
to take the square root to get cosine B that is equal to plus and minus square
that is equal to plus and minus square root of r11 square + r21 squared.
root of r11 square + r21 squared. And we should notice that here once we
And we should notice that here once we are taking square root we are getting
are taking square root we are getting two solutions one positive and one
two solutions one positive and one negative.
So now we have cosine B. In terms of finding the angle B, we want to use arc
finding the angle B, we want to use arc tangent 2. I will mention later uh we
tangent 2. I will mention later uh we don't want to use cosine uh arc cosine
don't want to use cosine uh arc cosine uh here. Instead, we want to use arc
uh here. Instead, we want to use arc tangent 2. We have cosine B. So we still
tangent 2. We have cosine B. So we still need sin B to use arc tangent to use arc
need sin B to use arc tangent to use arc tangent 2.
tangent 2. And luckily we can find out that we have
And luckily we can find out that we have sine b which is equal to r
sine b which is equal to r uh 31. Uh I'm sorry I missed a
uh 31. Uh I'm sorry I missed a a negative sign here. So we actually
a negative sign here. So we actually have negative sign b equal to r 31.
Uh I will move the negative side here. All right. So then
now we have both cosine B and sin B and then we can use arc tangent 2 to solve
then we can use arc tangent 2 to solve for the angle B which is here. So B
for the angle B which is here. So B actually the angle B actually equal to
actually the angle B actually equal to arc tangent 2
arc tangent 2 and what's inside is s and cosine. So
and what's inside is s and cosine. So sine comes first and cosine comes next.
sine comes first and cosine comes next. So this is basically sin B and this is
So this is basically sin B and this is cosine B
cosine B and we get sin B here
and we get sin B here and we get cosine B here. So we just
and we get cosine B here. So we just need they are both known values. So we
need they are both known values. So we just need to plug in the values. All the
just need to plug in the values. All the R values they are known. So we now can
R values they are known. So we now can use arc tangent 2 to solve for the angle
use arc tangent 2 to solve for the angle B. You can see we actually work through
B. You can see we actually work through it to eventually just to get one joint
it to eventually just to get one joint angle out which is B for now. And you
angle out which is B for now. And you can see that at this moment we already
can see that at this moment we already have
cosine B. And technically we can use arc cosine on it to get the angle B out. But
cosine on it to get the angle B out. But in general practice I do not recommend
in general practice I do not recommend um using arc sine or arc cosiness um if
um using arc sine or arc cosiness um if if we can find both s and cosine. This
if we can find both s and cosine. This is because if we directly use arc sine
is because if we directly use arc sine or arc cosine, we might get fake
or arc cosine, we might get fake multiple solutions because
because uh if we only get arc sine or arc cosine
if we only get ark sign let's say if I only get ark sign I might get two
only get ark sign I might get two solutions one is here and one is here
solutions one is here and one is here and if I only get arc arc cosine
and if I only get arc arc cosine similarly it will be one here one here
similarly it will be one here one here and one here but but actually if we know
and one here but but actually if we know both cosine value and sine value we
both cosine value and sine value we actually know that it is one angle
actually know that it is one angle instead of two. So directly using arc
instead of two. So directly using arc sign or arc cosine it can result in uh
sign or arc cosine it can result in uh fake multiple solutions.
fake multiple solutions. So um it is not uh it it will not
So um it is not uh it it will not eventually give us wrong answer but it
eventually give us wrong answer but it will uh require extra effort on checking
will uh require extra effort on checking the answers. For example, if sometimes
the answers. For example, if sometimes if the equations are they are super
if the equations are they are super super complicated and we simply just
super complicated and we simply just cannot find both s and cosine value of
cannot find both s and cosine value of one angle one joint angle then we have
one angle one joint angle then we have to use ark sign or arc cosine. Then uh
to use ark sign or arc cosine. Then uh my general recommendation is that once
my general recommendation is that once you use uh arc sign or arc cosine at any
you use uh arc sign or arc cosine at any where in the procedure of solving
where in the procedure of solving inverse kinematics then after
inverse kinematics then after after we solved uh get the inverse
after we solved uh get the inverse kinematic solution we should plug in all
kinematic solution we should plug in all the inverse kinematic solutions back to
the inverse kinematic solutions back to forward kinematics forward kinematics
forward kinematics forward kinematics kinematics to check if these solutions
kinematics to check if these solutions they are valid or not. So you can see
they are valid or not. So you can see that once we if we are if we use arc
that once we if we are if we use arc sign or arc cosine we will then need one
sign or arc cosine we will then need one more step on checking the inverse
more step on checking the inverse kinematic solutions to verify if they
kinematic solutions to verify if they are valid solutions or not.
Sorry for missing that uh negative sign. So now we have B angle B solved. And
So now we have B angle B solved. And then
then we still need to work on angle A and
we still need to work on angle A and angle C.
But similarly we can still use these two equations because now we have angle B
equations because now we have angle B solved. So these two equations now only
solved. So these two equations now only have unknown variables as
CA and SA. So only A is unknown in these two equations. Now so this is uh because
two equations. Now so this is uh because we have already solved for B.
we have already solved for B. So similarly we will use the two
So similarly we will use the two equations R11 equal to CACB and R21
equations R11 equal to CACB and R21 equal to S A CB. And now
equal to S A CB. And now because CB is known we can rewrite the
because CB is known we can rewrite the equations to get CA and SA out. So um
equations to get CA and SA out. So um cosine a and sin a and both and all of
cosine a and sin a and both and all of the r11 cb r21 cb they are all known
the r11 cb r21 cb they are all known values because b is solved and similarly
values because b is solved and similarly we have cosine a and sin a we can then
we have cosine a and sin a we can then use uh arc tangent 2 to get angle a so
use uh arc tangent 2 to get angle a so that we have sin a come first and cosine
that we have sin a come first and cosine a come
a come second. We just need to plug in SA and
second. We just need to plug in SA and the CA and use arc tangent two to get
the CA and use arc tangent two to get angle A.
angle A. And of course here because we need to
And of course here because we need to divide uh R21
divide uh R21 uh sorry this will be um
uh sorry this will be um sorry for the mistake this will be uh
sorry for the mistake this will be uh R21 CB uh this will be R11 and CB sorry
R21 CB uh this will be R11 and CB sorry for the mistake.
for the mistake. So
because we need to divide R11 and R21 by CB, we have to we must assume that CV is
CB, we have to we must assume that CV is not equal to zero. And there is actually
not equal to zero. And there is actually a special condition if we do have CV
a special condition if we do have CV equal to zero
equal to zero and that is called singularity. We will
and that is called singularity. We will mention that later on.
mention that later on. So we should now also notice that a
So we should now also notice that a equal to tangent arc tangent 2 of uh of
equal to tangent arc tangent 2 of uh of this equation here. And we should notice
this equation here. And we should notice that a also has two solutions according
that a also has two solutions according to b
to b because b has two solution solutions.
because b has two solution solutions. one for the choices of whether uh we
one for the choices of whether uh we take the positive value of this square
take the positive value of this square root or negative value of this of this
root or negative value of this of this square root.
So B has two solution and A also has two solutions.
And now we have both A and B solved. And we want to solve for angle C now. So we
we want to solve for angle C now. So we can similarly find two equations that we
can similarly find two equations that we can use now. It would be these two
can use now. It would be these two equations because CB are solved. So only
equations because CB are solved. So only left unknown in these two equations they
left unknown in these two equations they are they are SC and CC sin C and cosine
are they are SC and CC sin C and cosine C.
C. So we have these two equations and then
So we have these two equations and then we just need to uh plug in these two
we just need to uh plug in these two equations into the arc tangent equation.
equations into the arc tangent equation. So we have um so this is basically um
So we have um so this is basically um we can use similar solution that uh here
we can use similar solution that uh here we have SC
we have SC equal to R32 over CB and we have um here
equal to R32 over CB and we have um here we have C C equal to uh R33 over C B
and we have We just need to plug in s first and cosine next and then arc
first and cosine next and then arc tangent 2 will give us the solution of
tangent 2 will give us the solution of angle C. And similarly we also have two
angle C. And similarly we also have two solutions here.
solutions here. uh because of there's two solutions for
uh because of there's two solutions for C B on choosing positive or negative on
C B on choosing positive or negative on uh on the square root same square root
uh on the square root same square root here.
So now we've solved all the joint positions A, B and C. And we can see
positions A, B and C. And we can see that we have two solutions depending on
that we have two solutions depending on whether we choose CB to be larger than
whether we choose CB to be larger than zero or CB to be smaller than zero.
zero or CB to be smaller than zero. Again CB equal to positive and negative
Again CB equal to positive and negative R11 + R 21 square we get from the
R11 + R 21 square we get from the previous steps.
previous steps. So because we need to we we took the uh
So because we need to we we took the uh the square root at that moment. So it
the square root at that moment. So it result in two multiple solutions
result in two multiple solutions positive and negative. And then
positive and negative. And then depending on whether we choose CV to be
depending on whether we choose CV to be larger than zero or smaller than zero
larger than zero or smaller than zero and then we will have two uh uh we have
and then we will have two uh uh we have two multiple solutions. Um and we can
two multiple solutions. Um and we can generally draw a tree of multiple
generally draw a tree of multiple solutions like this.
um we will uh we will not have something like B1 will lead to uh kind of A1 and
like B1 will lead to uh kind of A1 and A2 here. So it will have no more uh
A2 here. So it will have no more uh leaves because
leaves because all of the multiple solutions of both of
all of the multiple solutions of both of all angle A, B and C they are all
all angle A, B and C they are all dependent on whether we choose CB to be
dependent on whether we choose CB to be larger than zero or smaller than zero.
larger than zero or smaller than zero. So this is overall an example of
So this is overall an example of algebraic solution. Uh we used a simple
algebraic solution. Uh we used a simple example here. You can see that we we
example here. You can see that we we actually did not perform a lot of super
actually did not perform a lot of super complicated math to get the solution of
complicated math to get the solution of all the joint positions A, B and C. But
all the joint positions A, B and C. But in real uh in real practice for for
in real uh in real practice for for those uh six or more joints industrial
those uh six or more joints industrial robot arms um the in uh the inverse
robot arms um the in uh the inverse kinematics algebraic solution can
kinematics algebraic solution can actually be very very complicated. But
actually be very very complicated. But just for um for uh for simple demon uh
just for um for uh for simple demon uh demonstration here we are not using a
demonstration here we are not using a very complicated example.
very complicated example. So in the real practice if we find out
So in the real practice if we find out that the algebraic solution of those uh
that the algebraic solution of those uh six joint robot arms are super super
six joint robot arms are super super difficult then we can on the other hand
difficult then we can on the other hand refer to numerical methods which are
refer to numerical methods which are easier to use but again they might
easier to use but again they might requires uh they might require larger uh
requires uh they might require larger uh computational cost.
So uh we've introduced algebraic solution and now we will uh introduce
solution and now we will uh introduce geometric solution. Uh in real practice,
geometric solution. Uh in real practice, geometric solution uh in my opinion it
geometric solution uh in my opinion it it will be less um
it will be less um it will be less possible to be
it will be less possible to be implemented because geometric solution
implemented because geometric solution uh often works better uh for planner
uh often works better uh for planner robot or for some robot uh robot
robot or for some robot uh robot subspace
subspace which means that somehow we can we can
which means that somehow we can we can further find a a subspace of the robot
further find a a subspace of the robot arm and in that subspace is is planner
arm and in that subspace is is planner robot for example if I have one robot
robot for example if I have one robot arm that can rotate around but if we if
arm that can rotate around but if we if we do not consider the first joint is
we do not consider the first joint is basically just to do the peaching in one
basically just to do the peaching in one uh in as a planner uh robot so that that
uh in as a planner uh robot so that that is called robot subspace in that case uh
is called robot subspace in that case uh geometric solution might be uh might
geometric solution might be uh might might be a more handy tool to use but
might be a more handy tool to use but overall uh algebraic solution I believe
overall uh algebraic solution I believe uh is more uh generally applicable
So now let's take a look on how do we use uh geometric solution. Basically
use uh geometric solution. Basically that's um so it it is uh um we are then
that's um so it it is uh um we are then utilizing uh the geometric relationships
utilizing uh the geometric relationships that we can observe on the robot arm um
that we can observe on the robot arm um the robot arm configuration and then try
the robot arm configuration and then try to figure out what the joint positions
to figure out what the joint positions can be. So it will be easier to look
can be. So it will be easier to look this through uh an example
this through uh an example a lot of equations here but uh we will
a lot of equations here but uh we will we will go through them one by one.
we will go through them one by one. So if we take a look at this robot arm,
So if we take a look at this robot arm, we have three joints. The first joint is
we have three joints. The first joint is a rotational joint say the one that can
a rotational joint say the one that can rotate in this way.
rotate in this way. And then we have a second joint that is
And then we have a second joint that is a translational joint which is this kind
a translational joint which is this kind of like green rod that it can translate
of like green rod that it can translate through this direction.
through this direction. And the third joint 3 is rotational
And the third joint 3 is rotational again which is here.
again which is here. So
if we look at this robot arm um we can see that it's a planer robot arm and now
see that it's a planer robot arm and now we can try to use geometric solution to
we can try to use geometric solution to solve it. Um
solve it. Um according to this uh if we look look at
according to this uh if we look look at this robot arm one easy relation we can
this robot arm one easy relation we can find out is that the the factor
find out is that the the factor orientation ga
orientation ga is equal to theta 1 plus theta 3 because
is equal to theta 1 plus theta 3 because there's only two rotation we can get
there's only two rotation we can get which is theta 1 and theta 3. So this
which is theta 1 and theta 3. So this gma angle will equal to theta 1 plus
gma angle will equal to theta 1 plus theta 3
and but this one equation is not enough to solve three unknown uh unknown
to solve three unknown uh unknown variables. We at least need uh three
variables. We at least need uh three equations to solve for three unknown
equations to solve for three unknown variables in general. So we need to find
variables in general. So we need to find more relationship.
more relationship. And now what we can see is we what we
And now what we can see is we what we can find is that now um let's look at
can find is that now um let's look at this point
this point for this point
for this point what we can get is that if we look at
what we can get is that if we look at this distance
it may not be clear. So uh if we look at this distance it is actually
this distance it is actually cosine
theta 1 times d2 because this is d2 and this is theta 1. So this distance
this is theta 1. So this distance distance distance is actually cosine
distance distance is actually cosine theta 1 times d2 which is here.
theta 1 times d2 which is here. But we can also try to find this
But we can also try to find this distance in from the other direction
distance in from the other direction that is here.
that is here. So overall
We have this distance to be X because that's a that's the location of the any
that's a that's the location of the any factor.
factor. And then we can also look for this
And then we can also look for this distance.
This distance is also not the not difficult to get which should be L3
difficult to get which should be L3 which is
this distance. This will be L3. So this distance will be equal to L3 times
distance will be equal to L3 times cosine
So you can see now we can use these two distance to get the same distance here
distance to get the same distance here which is x - l3
which is x - l3 cossine
cossine gamma
gamma which is here.
which is here. Now you can see this give us one more
Now you can see this give us one more equation on uh d2 * cosine theta 1 equal
equation on uh d2 * cosine theta 1 equal to x - l3 cosine gamma
to x - l3 cosine gamma and similarly now we've this time we are
and similarly now we've this time we are using the x
using the x uh the relationship in x axis but we can
uh the relationship in x axis but we can do it similarly for yaxis I will not do
do it similarly for yaxis I will not do the details for now due to the time
the details for now due to the time limit but you can work work for that for
limit but you can work work for that for by yourself and you can then find out
by yourself and you can then find out this second equation on D2 sin theta 1
this second equation on D2 sin theta 1 equal to Y - I3 sin gamma and now
equal to Y - I3 sin gamma and now now we have overall three equations
now we have overall three equations one
one one two and I will label this as three
one two and I will label this as three so one two three three equations
and let's take a look on how we and solve it. So now we have three equations
solve it. So now we have three equations and we have three unknown variables
and we have three unknown variables theta theta 1 d2 and theta 3 to solve.
theta theta 1 d2 and theta 3 to solve. So what we want to solve is actually
So what we want to solve is actually theta 1 theta 3 d2 and theta 1. So all
theta 1 theta 3 d2 and theta 1. So all of these uh underlined variables they
of these uh underlined variables they are unknown. Well, we actually know
are unknown. Well, we actually know Garma X and Y because and and also L3
Garma X and Y because and and also L3 because L3 is one link of the robot. We
because L3 is one link of the robot. We know the we know the length of of this
know the we know the length of of this link
link and also uh we know X and Y because that
and also uh we know X and Y because that is the target location we want to go and
is the target location we want to go and we also know the garma that is the
we also know the garma that is the target orientation we want to achieve.
So now three equations for three unknown variables. What we can do is we should
variables. What we can do is we should take a look on the three equations and
take a look on the three equations and then try to figure out can we isolate um
then try to figure out can we isolate um one uh joint position out so we can
one uh joint position out so we can solve for it first. You can see that
solve for it first. You can see that from now on it's sol is solving equation
from now on it's sol is solving equation again similar to algebraic solution. The
again similar to algebraic solution. The difference is is that for algebraic
difference is is that for algebraic solution we actually use forward
solution we actually use forward kinematics to get all of the equations
kinematics to get all of the equations and for geometric solution we are using
and for geometric solution we are using these geometric relationships to get the
these geometric relationships to get the equations. But once we get the equation
equations. But once we get the equation the following steps will be the same on
the following steps will be the same on solving the equations.
solving the equations. Now if we look at these equations
intuitively I find out that this equation may not be useful at the very
equation may not be useful at the very beginning because that's garma equal to
beginning because that's garma equal to theta 1 plus theta 3 two equ two unknown
theta 1 plus theta 3 two equ two unknown variables in one
variables in one equation. So it it might not be able to
equation. So it it might not be able to help. Instead
help. Instead let's look at these two equations. For
let's look at these two equations. For these two equations, we can see that um
these two equations, we can see that um the only unknown variables will be d2
the only unknown variables will be d2 and theta
and theta one. There's no 3 fortunately.
one. There's no 3 fortunately. So it's very nice that we can then take
So it's very nice that we can then take a look here and
a look here and we can use the same trick again that we
we can use the same trick again that we know
know cosine
theta 1 squared plus sin theta 1 square = 1. If we can somehow get into this
= 1. If we can somehow get into this format, we will be able to cancel out
format, we will be able to cancel out theta 1. And you can then see that it's
theta 1. And you can then see that it's actually not it is not difficult to get
actually not it is not difficult to get that. we just need to take take the
that. we just need to take take the square of both uh equation one and
square of both uh equation one and equation two and just and then add them
equation two and just and then add them up. So on the left hand side it will be
up. So on the left hand side it will be d2 squar times cossine theta 1 square
d2 squar times cossine theta 1 square plus sin 1 theta 1 squar and this term
plus sin 1 theta 1 squar and this term is actually one
is actually one and on the right hand side it's just a
and on the right hand side it's just a bunch of mass that we need to take
bunch of mass that we need to take square of these two terms and then add
square of these two terms and then add them up.
them up. Then we do all the mass and then we
Then we do all the mass and then we simplify it. This will be the equation
simplify it. This will be the equation we get. And we can then take a look at
we get. And we can then take a look at this equation. There's only one unknown
this equation. There's only one unknown variable that is D2 squared.
variable that is D2 squared. We know X, we know Y, we know L3, we
We know X, we know Y, we know L3, we know garma because
know garma because they are uh X, Y and garma. They are the
they are uh X, Y and garma. They are the any factor location and L3 is a robot
any factor location and L3 is a robot arm link length. They are all known
arm link length. They are all known constant.
constant. So in terms to solve in terms of solving
So in terms to solve in terms of solving d2 we just need to take the square root
d2 we just need to take the square root of d2
of d2 and again because we are taking the
and again because we are taking the square root so we will have two
square root so we will have two solutions one positive and one negative
solutions one positive and one negative and that give us the solution of d2 and
and that give us the solution of d2 and and then let's come back to see these
and then let's come back to see these two equations again we can see that if
two equations again we can see that if now we consider D2 is known then these
now we consider D2 is known then these two equations
two equations only has one unknown variable that is
only has one unknown variable that is theta 1.
theta 1. So and also it it is very nice that we
So and also it it is very nice that we get cosine theta 1 in equation one and
get cosine theta 1 in equation one and we get sin theta 1 in equation two. So
we get sin theta 1 in equation two. So we now get get both s and cosine of
we now get get both s and cosine of theta 1 and now we can use arc tangent.
theta 1 and now we can use arc tangent. We can use arc tangent 2 so that um
so that we can have this equation here theta 1 equal to arc tangent 2 and s
theta 1 equal to arc tangent 2 and s comes first and cosine comes next
comes first and cosine comes next and simply the d2 will cancel out here
and simply the d2 will cancel out here and eventually we just need uh we just
and eventually we just need uh we just need to plug in the two uh equations
need to plug in the two uh equations here that s comes first and the cosine
here that s comes first and the cosine comes next. But here they they are
comes next. But here they they are actually
should also be divided by d2. But we will um we will simplify that
will um we will simplify that and just plug in the two equations
and just plug in the two equations equation one and two here.
equation one and two here. But we should not forget that d2 has two
But we should not forget that d2 has two solutions one positive and one negative.
solutions one positive and one negative. So that can result in theta 1 also has
So that can result in theta 1 also has two uh two solutions depending on
two uh two solutions depending on whether whether d2 is positive or d2 is
whether whether d2 is positive or d2 is negative. And if d2 is negative we will
negative. And if d2 is negative we will get um a different solution on theta 1
get um a different solution on theta 1 which is actually uh if theta if theta 1
which is actually uh if theta if theta 1 one
one is pointing in this direction and then
is pointing in this direction and then theta one two
theta one two will be pointing in this direction by
will be pointing in this direction by adding pi.
So that give us the um the solution of theta 1. So we have two solutions on D2
theta 1. So we have two solutions on D2 and two solutions on theta 1.
and two solutions on theta 1. So now we can finally use garma equal
So now we can finally use garma equal equal to theta 1 plus theta 3. And
equal to theta 1 plus theta 3. And because we have already solved theta 1
because we have already solved theta 1 so only theta 3 here is unknown
so only theta 3 here is unknown variable. So it's very simple that um
variable. So it's very simple that um theta 3 equal to gamma equal to uh gamma
theta 3 equal to gamma equal to uh gamma minus theta 1. But because we have two
minus theta 1. But because we have two solutions on theta 1, so we also have
solutions on theta 1, so we also have two solutions on theta 3. And now we
two solutions on theta 3. And now we have all the solutions of d2,
have all the solutions of d2, theta 1's
theta 1's and
and theta 3. They are all solved now. And
theta 3. They are all solved now. And they all have two solutions depending on
they all have two solutions depending on whether d2 we choose d2 to be positive
whether d2 we choose d2 to be positive or to be negative.
And here we can we can see that for the two solutions we always assume either D2
two solutions we always assume either D2 to be larger than zero or D2 to be
to be larger than zero or D2 to be smaller than zero.
smaller than zero. We haven't got discussed one condition
We haven't got discussed one condition that is D2
that is D2 equal to zero. What happens if D2 equals
equal to zero. What happens if D2 equals equals to zero?
equals to zero? So if D2 equals to zero, we can further
So if D2 equals to zero, we can further draw the robot arm now because we no
draw the robot arm now because we no longer have uh
longer have uh and non Z a nonzero D2 which means that
and non Z a nonzero D2 which means that D2 is basically zero distance uh right
D2 is basically zero distance uh right at this
at this right at this center.
right at this center. So the robot arm will look pretty short
So the robot arm will look pretty short like what we are what we draw here.
like what we are what we draw here. So if D2 equal to zero what we can find
So if D2 equal to zero what we can find out is actually very interesting that
out is actually very interesting that now theta 1 and theta 3 they are they
now theta 1 and theta 3 they are they are actually all like joined one and
are actually all like joined one and join three they actually they are all at
join three they actually they are all at the center here
the center here all at the center here. So we can then
all at the center here. So we can then see that if we rotate theta 1 and if we
see that if we rotate theta 1 and if we rotate theta 3 they result in the same
rotate theta 3 they result in the same movement of the Annif factor the factor
movement of the Annif factor the factor will will always just move
will will always just move on this arc. We are kind of like using
on this arc. We are kind of like using this robot robot arm like a compass.
this robot robot arm like a compass. So in this case we actually lose one
So in this case we actually lose one degree of freedom of this robot arm
degree of freedom of this robot arm because we have joint one and joint
because we have joint one and joint three. They have the same movement. So
three. They have the same movement. So they basically can be considered as one
they basically can be considered as one joint.
joint. So we kind of lose one degree of freedom
So we kind of lose one degree of freedom and this this configuration is called
and this this configuration is called singularity and we will take a look on
singularity and we will take a look on singularity later on when we are
singularity later on when we are introducing differential kinematics
and we will quickly look for how we can do how we can solve inverse kinematics
do how we can solve inverse kinematics using numerical solution.
using numerical solution. with numerical solution. Uh what we will
with numerical solution. Uh what we will what we have is um instead of solving
what we have is um instead of solving all the uh all the mass in in the
all the uh all the mass in in the symbolic way as we did before this time
symbolic way as we did before this time we will just use uh equation solvers uh
we will just use uh equation solvers uh numerical equation solvers like Newton
numerical equation solvers like Newton Rabson or Rangakuda there's a bunch of
Rabson or Rangakuda there's a bunch of equation solvers available um in Python
equation solvers available um in Python or in MATLAB that we can easily find uh
or in MATLAB that we can easily find uh u proper tools that we want to use.
u proper tools that we want to use. So overall uh what a general procedure
So overall uh what a general procedure is we first need still need the forward
is we first need still need the forward kinematics.
kinematics. That is why forward kinematics is so
That is why forward kinematics is so important. We still need the link frame
important. We still need the link frame assignment. We still need DH parameters
assignment. We still need DH parameters so that we can have the forward
so that we can have the forward kinematics ready because u forward
kinematics ready because u forward kinematics actually represent how the
kinematics actually represent how the robot can move. So even if we are using
robot can move. So even if we are using the uh numerical solver the solver will
the uh numerical solver the solver will still need to iterate on uh how to move
still need to iterate on uh how to move the robot and find out the inverse
the robot and find out the inverse kinematic solution
kinematic solution and then we need to define an objective
and then we need to define an objective objective function. This is often
objective function. This is often required for most for many equation
required for most for many equation solvers and um we will not go go through
solvers and um we will not go go through details on what can be a good objective
details on what can be a good objective function. So if we want the numerical
function. So if we want the numerical solver uh to be stable to be efficient
solver uh to be stable to be efficient there are actually some tricks to get
there are actually some tricks to get the objective function but uh our focus
the objective function but uh our focus today is on the uh symbolic solution. So
today is on the uh symbolic solution. So we will not go through detail here
we will not go through detail here and then we need to define u inverse
and then we need to define u inverse kinematic kinematics function. So that
kinematic kinematics function. So that would basically we need uh we need a
would basically we need uh we need a need an inverse kinematics function and
need an inverse kinematics function and equations so that our um our numerical
equations so that our um our numerical solver will will try to solve it and
solver will will try to solve it and eventually we need to find an optimizer
eventually we need to find an optimizer which is uh which is uh uh typically the
which is uh which is uh uh typically the equation solvers um as I mentioned we
equation solvers um as I mentioned we can use rangakuda we can use newton
can use rangakuda we can use newton repson and there's a bunch of other ways
repson and there's a bunch of other ways um uh for example also like SLSQP then
um uh for example also like SLSQP then different optimizers they might have
different optimizers they might have different performances. Some will um
different performances. Some will um some will uh have more stable
some will uh have more stable performance but some will have like a
performance but some will have like a faster computation there. There could be
faster computation there. There could be a lot of trade-offs in between different
a lot of trade-offs in between different uh numeric numerical solvers. So it's
uh numeric numerical solvers. So it's not there's no uh in my opinion there's
not there's no uh in my opinion there's no uh gold standard uh on the of the
no uh gold standard uh on the of the optimizer. It's basically depending on
optimizer. It's basically depending on um the trade-offs we want to consider on
um the trade-offs we want to consider on whether whether we want faster computing
whether whether we want faster computing or whether we want uh want to deal with
or whether we want uh want to deal with some uh cases that we might have no
some uh cases that we might have no solution but we still want to get to the
solution but we still want to get to the closest point. For example, if I want to
closest point. For example, if I want to reach a point, reach a point, but
reach a point, reach a point, but actually my robot arm is not long
actually my robot arm is not long enough, but I still want to reach the
enough, but I still want to reach the closest point uh as possible. So that
closest point uh as possible. So that some optimizer will give us performance
some optimizer will give us performance like that. So which sometimes can be
like that. So which sometimes can be very handy.
very handy. So this is overall uh the numerical
So this is overall uh the numerical solution. uh nowadays with the uh with
solution. uh nowadays with the uh with AI language models uh it should not be
AI language models uh it should not be very difficult to um to ask uh AI to
very difficult to um to ask uh AI to generate a numerical solution uh for
generate a numerical solution uh for kinematic uh for inverse kinematics for
kinematic uh for inverse kinematics for a robot arm but we again still need to
a robot arm but we again still need to provide the DH parameters as that that
provide the DH parameters as that that is required for the forward kinematics.
So a general workflow uh with inverse kinematics on the robot is we will start
kinematics on the robot is we will start with
with the joint position. We can read the
the joint position. We can read the current joint position often from the
current joint position often from the encoders on the motor. So these encoder
encoders on the motor. So these encoder sensors will give us feedback on the
sensors will give us feedback on the current joint position and then we use a
current joint position and then we use a current joint position and forward
current joint position and forward kinematics to get the current and factor
kinematics to get the current and factor position or pose uh here because this
position or pose uh here because this robot can only control uh position. So I
robot can only control uh position. So I will I will use position here.
will I will use position here. uh in in six degree of freedom um robot
uh in in six degree of freedom um robot uh industry robot arm we can control
uh industry robot arm we can control both position and orientation which
both position and orientation which combined uh that is called pose.
combined uh that is called pose. So with the current manifactor position
So with the current manifactor position we can then take cartition control
we can then take cartition control command for example if the user want the
command for example if the user want the robot arm the robot grasper to move up
robot arm the robot grasper to move up or move down for a certain distance and
or move down for a certain distance and then we will add for example add uh
then we will add for example add uh we will have z uh which is going up and
we will have z uh which is going up and down we have z at for example 10 cm.
down we have z at for example 10 cm. So that would be something uh that the
So that would be something uh that the user can command the robot to move uh up
user can command the robot to move uh up and down, left and right or rotate uh as
and down, left and right or rotate uh as um incremental control. This is very uh
um incremental control. This is very uh common in uh tally operation that you
common in uh tally operation that you will be using in your uh project.
will be using in your uh project. So um we have once we have the
So um we have once we have the cartitioning uh control command then we
cartitioning uh control command then we add the control command to the current
add the control command to the current we we add the control command to the
we we add the control command to the current factor uh
current factor uh position and then what we get is the
position and then what we get is the desired factor position and once we have
desired factor position and once we have the desired factor position we will use
the desired factor position we will use inverse kinematics to get the desired
inverse kinematics to get the desired joint position.
So what we learned is how to get this step down today. And eventually once we
step down today. And eventually once we get the desired joint position, we just
get the desired joint position, we just need to run the motor control and then
need to run the motor control and then the robot arm will move to will rotate
the robot arm will move to will rotate to that certain configuration that user
to that certain configuration that user want it to go.
want it to go. So this is general control workflow of
So this is general control workflow of inverse kinematics.
Now let's move on to differential kinematics.
kinematics. For differential kinematics um as we uh
For differential kinematics um as we uh worked on before on from forward for
worked on before on from forward for forward kinematics it actually give us
forward kinematics it actually give us the relationship from the joint position
the relationship from the joint position to the any factor pose.
to the any factor pose. And for inverse kinematics reversely it
And for inverse kinematics reversely it give us the relation from any factor
give us the relation from any factor pose to the joint position. But
pose to the joint position. But sometimes besides the position control
sometimes besides the position control we might also want the velocity control.
we might also want the velocity control. So differential kinematics basically
So differential kinematics basically give us the relationship
give us the relationship u not between the any factor position
u not between the any factor position and joint position. Instead it will be
and joint position. Instead it will be any factor velocity and uh joint
any factor velocity and uh joint velocity. It can be um it can be
velocity. It can be um it can be represented in continuous way as uh the
represented in continuous way as uh the joint velocity and effective velocity.
joint velocity and effective velocity. It can also be uh joint increment and
It can also be uh joint increment and and factor increment as a discrete
and factor increment as a discrete system. Um
system. Um a quick re a quick reminder uh review
a quick re a quick reminder uh review that if we have theta dot that means
that if we have theta dot that means that we are taking the derivative of
that we are taking the derivative of theta with respect to time which means
theta with respect to time which means that if I have theta dot if theta is
that if I have theta dot if theta is joint position then theta dot is joint
joint position then theta dot is joint velocity
velocity and furthermore if we have theta double
and furthermore if we have theta double dot that mean that generally means that
dot that mean that generally means that we uh the acceleration of the of the
we uh the acceleration of the of the joint but we will not work on
joint but we will not work on acceleration. We will just work on uh
acceleration. We will just work on uh velocity in differential kinematics
besides the relationship from the joint velocity to the any factor velocity. We
velocity to the any factor velocity. We might also want to do some something
might also want to do some something like inverse differential kinematics
like inverse differential kinematics that is from the
that is from the um from the uh the factor velocity to
um from the uh the factor velocity to the joint velocity
the joint velocity and this matrix J theta is called
and this matrix J theta is called Jacobian matrix because we are going to
Jacobian matrix because we are going to take the the uh the Jacobian matrix of
take the the uh the Jacobian matrix of the forward kinematics matrix.
the forward kinematics matrix. So this is often labeled as J. We will
So this is often labeled as J. We will mention how to uh how to get Jacoba
mention how to uh how to get Jacoba matrix later.
this equation what we get is actually here. So this differential kinematics
here. So this differential kinematics specifically Jacobian matrix will be
specifically Jacobian matrix will be able to give us the relationship that we
able to give us the relationship that we if we provide all the joint velocities
if we provide all the joint velocities we will get the any factor velocities
we will get the any factor velocities and they xyz dot they are linear
velocity and this omega xyz they are angular
and this omega xyz they are angular angular velocity. I think you are fairly
angular velocity. I think you are fairly familiar with linear and angular
familiar with linear and angular velocity once you are controlling the
velocity once you are controlling the turtlebot in the previous quarter.
So generally if we have u six uh if we have the full six degree of freedom of
have the full six degree of freedom of the any factor which is xyz and rpy or
the any factor which is xyz and rpy or this xyz uh x doty dotz dot and omega
this xyz uh x doty dotz dot and omega xyz then the jacobian matrix will have
xyz then the jacobian matrix will have the size of six times n where n will be
the size of six times n where n will be our number of joints. But sometimes if
our number of joints. But sometimes if we are working on a planer robot which
we are working on a planer robot which means that we are only uh we only uh
means that we are only uh we only uh want XY position and one garma angle as
want XY position and one garma angle as we used as example before then the
we used as example before then the Jacobia matrix can be 3 * N where n is
Jacobia matrix can be 3 * N where n is similarly the uh the number of joints.
similarly the uh the number of joints. So uh then the the dimension of the
So uh then the the dimension of the Jacob Jacobia matrix is is also
Jacob Jacobia matrix is is also determined by uh are we working in 3D
determined by uh are we working in 3D space or are we working in 2D space um
space or are we working in 2D space um and some other type of spaces as well.
and some other type of spaces as well. Um so once we have the differential
Um so once we have the differential kinematics and the chakovia matrix we
kinematics and the chakovia matrix we can then answer interesting questions on
can then answer interesting questions on for example on question one if um if we
for example on question one if um if we rotate all the all the joints with uh
rotate all the all the joints with uh with 0.1 rad per second what will be the
with 0.1 rad per second what will be the velocity of the any factor in that case
velocity of the any factor in that case what we can do is we can use a jacobian
what we can do is we can use a jacobian matrix Um and we just need to use a jug
matrix Um and we just need to use a jug matrix to multiplying all these uh joint
matrix to multiplying all these uh joint uh the a vector of joint velocities with
uh the a vector of joint velocities with all 0.1s and then we just need to do the
all 0.1s and then we just need to do the computation and eventually we will find
computation and eventually we will find the any factor velocity and then
the any factor velocity and then reversely if we have the inverse of the
reversely if we have the inverse of the Jacobian matrix
Jacobian matrix what we can do is uh let's assume the
what we can do is uh let's assume the user want the uh the factor to move uh
user want the uh the factor to move uh to move in abs and y direction which
to move in abs and y direction which kind of like move uh diagonally uh with
kind of like move uh diagonally uh with a with a 10 mm uh per sec speed per
a with a 10 mm uh per sec speed per second
second and then what we can do
and then what we can do and then uh we want to know what how how
and then uh we want to know what how how fast we want to rotate the joints to
fast we want to rotate the joints to achieve that end factor um velocity. So
achieve that end factor um velocity. So what we can do is uh we just need to
what we can do is uh we just need to take the inverse of the Jacobian matrix
take the inverse of the Jacobian matrix and then
and then we will use that to multiply uh so this
we will use that to multiply uh so this is this will be x dot and y dot and this
is this will be x dot and y dot and this is z dot and omega x omega y omega z. So
is z dot and omega x omega y omega z. So because we only want the uh the factor
because we only want the uh the factor to move in x and y direction with 10 mm
to move in x and y direction with 10 mm second speed. So we can we just need 10
second speed. So we can we just need 10 and 10 here and all the other entries
and 10 here and all the other entries will be zero and we do the math and we
will be zero and we do the math and we will get the joint velocity that we need
will get the joint velocity that we need to control so that the robot and factor
to control so that the robot and factor will move with the target uh or desired
will move with the target uh or desired velocity that we want.
So now let's take a look on how do we get that Jacobian matrix. We we already
get that Jacobian matrix. We we already find uh we already show that Jacob
find uh we already show that Jacob matrix can be very very useful. But then
matrix can be very very useful. But then how can we find it?
So one uh one straightforward way is to use
one uh one straightforward way is to use uh is to uh get the chakoba matrix by uh
uh is to uh get the chakoba matrix by uh taking the differentiation of the
taking the differentiation of the forward kinematics uh equations with
forward kinematics uh equations with respect to time. um we will we will only
respect to time. um we will we will only introduce this method today. There might
introduce this method today. There might there are there's also other uh methods
there are there's also other uh methods such as velocity propagation but that
such as velocity propagation but that one would would be more complicated. Um
one would would be more complicated. Um if you are interested um you can uh you
if you are interested um you can uh you can message me and I will share more
can message me and I will share more materials with you but today we will be
materials with you but today we will be focusing on uh obtaining Jacobian matrix
focusing on uh obtaining Jacobian matrix by differentiation.
by differentiation. So let's take a look at this uh this
So let's take a look at this uh this example here that we have um
example here that we have um three joints join one
three joints join one joint two and join three.
So all the three joints they are rotational
rotational and we will um we will skip the forward
and we will um we will skip the forward kinematics part and part and directly
kinematics part and part and directly give the result of forward kinematics
give the result of forward kinematics that we already solved for
that we already solved for x y and alpha. So alpha here stand alpha
x y and alpha. So alpha here stand alpha here please notice that alpha here is
here please notice that alpha here is not the alpha in the dh parameters
not the alpha in the dh parameters instead alpha is is the angle of
instead alpha is is the angle of this
this the
the uh the orientation of the factor.
uh the orientation of the factor. So we we have x and y and alpha
So we we have x and y and alpha represented by um the the joint
represented by um the the joint positions
positions theta 1 theta 2 and theta 3. So
theta 1 theta 2 and theta 3. So these are the forward kinematics
these are the forward kinematics functions. With these forward kinematics
functions. With these forward kinematics functions we will then take derivatives
functions we will then take derivatives to get the jacobian matrix.
if we take the if we take the derivative with respect
if we take the derivative with respect to time for this first equation,
to time for this first equation, what we will get is
what we will get is x will becomes x dot because it's taking
x will becomes x dot because it's taking the uh the derivative with respect to
the uh the derivative with respect to time. So x position will be x velocity.
time. So x position will be x velocity. now
now and
this term will be here and this term will be here and this term will be here.
will be here and this term will be here. Um we will again we will not go over all
Um we will again we will not go over all the math. If you uh if you need a review
the math. If you uh if you need a review on how to take the uh take the
on how to take the uh take the derivatives then uh you can you can
derivatives then uh you can you can search for it or you can ask a AI on how
search for it or you can ask a AI on how to take the derivatives with respect to
to take the derivatives with respect to time. Um
time. Um and then we we can then rewrite this
and then we we can then rewrite this function to isolate uh say the say the
function to isolate uh say the say the one dot say the two dot and the three
one dot say the two dot and the three dot. So you can see here they are not
dot. So you can see here they are not isolated but in terms of format of
isolated but in terms of format of chobia matrix we need to
chobia matrix we need to factor out all the theta 1 theta 2 and
factor out all the theta 1 theta 2 and theta 3. So these are the va uh these
theta 3. So these are the va uh these are the uh the joint velocities that we
are the uh the joint velocities that we will be um we will be uh given as input
will be um we will be uh given as input and these terms
and these terms they will eventually be the entry
the entry entries in the jacobian matrix.
entries in the jacobian matrix. So again if you uh here we the the
So again if you uh here we the the reason uh we get these terms is because
reason uh we get these terms is because we we need to take the chain rule of the
we we need to take the chain rule of the derivative. Again if uh we will not do
derivative. Again if uh we will not do the math today here. So if you uh want
the math today here. So if you uh want to take um look at more details of how
to take um look at more details of how to take these uh derivatives then you
to take these uh derivatives then you can search for it or you can ask AI.
So this first equation is what we get from the previous uh slide and that was
from the previous uh slide and that was on the first equation here.
on the first equation here. Now we still need to take the derivative
Now we still need to take the derivative for the second and the third equation.
for the second and the third equation. So similarly
So similarly we can take the derivative for the
we can take the derivative for the second and the third. The third one is
second and the third. The third one is fairly simple enough. We if we have the
fairly simple enough. We if we have the alpha equal to theta 1 plus theta 2 plus
alpha equal to theta 1 plus theta 2 plus theta 3 then the derivative is basically
theta 3 then the derivative is basically just alpha dot equal to theta 1 dot plus
just alpha dot equal to theta 1 dot plus theta 2 dot plus theta 3 dot but taking
theta 2 dot plus theta 3 dot but taking derivative of ss and cosiness they are
derivative of ss and cosiness they are still they are still a bit more trickier
still they are still a bit more trickier and but similarly we can use a
and but similarly we can use a uh use uh use a sim similar uh procedure
uh use uh use a sim similar uh procedure that we did in the previous slides and
that we did in the previous slides and eventually what we get will
eventually what we get will this equation
this equation and again we will factor out all the 1,
and again we will factor out all the 1, 2 and theta 3 dots.
2 and theta 3 dots. And now with these three equations we
And now with these three equations we can then
can then factor out all theta one two three dots
factor out all theta one two three dots and
and and what we we will get is
and what we we will get is so xy
so xy and alpha
and alpha they are
they are xy uh sorry x dot y dot and alpha dot
xy uh sorry x dot y dot and alpha dot they are actually q dot and
they are actually q dot and theta
theta Theta 1 dot, theta 2 dot and theta 3 dot
Theta 1 dot, theta 2 dot and theta 3 dot they are actually theta dot here
they are actually theta dot here and what is left
and what is left will be the jacobian matrix. So if we
will be the jacobian matrix. So if we factoring out all of that eventually
factoring out all of that eventually what we get is this Jacobian matrix and
what we get is this Jacobian matrix and it's actually not that difficult because
it's actually not that difficult because um
because you basically can find out that uh what we want.
uh what we want. So this equation here will then be um
so what we will get is actually uh theta 1 dot theta 2 dot and theta 3 dot
1 dot theta 2 dot and theta 3 dot this this is here and this is here and
this this is here and this is here and the Q dot will again be um be x dot y
the Q dot will again be um be x dot y dot and alpha dot. So
dot and alpha dot. So in how do we find these terms is
in how do we find these terms is actually you can see the terms are
actually you can see the terms are actually here. So this term
actually here. So this term comes here and this term
comes here and this term comes here
comes here and this term comes here
and this term comes here because the first row
because the first row is about x dot and then y dot and then
is about x dot and then y dot and then alpha dot. So we can have we can we can
alpha dot. So we can have we can we can see that the first row is all about the
see that the first row is all about the equations of X.
equations of X. And similarly
for the second row it will be here
here and here because that will be the second row of the
second row of the because the second row is about y dot.
because the second row is about y dot. So we have the second equation. These
So we have the second equation. These terms will comes as a second row of the
terms will comes as a second row of the of the Jacobian matrix. And eventually
of the Jacobian matrix. And eventually because R of a dot is just theta 1 dot
because R of a dot is just theta 1 dot plus theta 2 dot plus theta 3 dot. So on
plus theta 2 dot plus theta 3 dot. So on this on the third row it will be one one
this on the third row it will be one one and one.
So this jacobian matrix here will be able to provide us the relationship
able to provide us the relationship between the joint velocities and any
between the joint velocities and any factor velocities.
So now let's take a look at another example. This is actually the example
example. This is actually the example that we used for the geometric solution
that we used for the geometric solution for the inverse kinematics. But now we
for the inverse kinematics. But now we will use it use it again for
will use it use it again for differential kinematics.
differential kinematics. And
And these are the forward uh these are the
these are the forward uh these are the forward kinematics equations. Again we
forward kinematics equations. Again we will skip on we will skip how do we find
will skip on we will skip how do we find all of this. We assume that we already
all of this. We assume that we already have the forward kinematic result. If
have the forward kinematic result. If you are interested in uh doing the
you are interested in uh doing the forward kinematics for it, you can you
forward kinematics for it, you can you can then try to do it by yourself on
can then try to do it by yourself on finding what's the relationship of x y
finding what's the relationship of x y and gamma with the with theta 1 d2 and
and gamma with the with theta 1 d2 and theta 3. These are the force these are
theta 3. These are the force these are forward kinematics.
But now what we need to do is to just take the derivative respect to time.
take the derivative respect to time. So if we take the first
If we take the first equation and take the derivative with with respect to time
the derivative with with respect to time then what we will get is that this this
then what we will get is that this this term will result in these two terms
term will result in these two terms we will skip the math. um this the one
we will skip the math. um this the one uh one term here result in two terms
uh one term here result in two terms here for of after the derivative of time
here for of after the derivative of time is because we have two unknown variables
is because we have two unknown variables d2 and theta 1 here.
d2 and theta 1 here. So if we take the derivative of it we
So if we take the derivative of it we will uh we will get two terms and this
will uh we will get two terms and this term if we take derivative it comes
term if we take derivative it comes here.
here. Again, we will not do the math today,
Again, we will not do the math today, but if you are interested in all of
but if you are interested in all of these math, you can take a pause and
these math, you can take a pause and work on it by yourself.
And what we need to do is is simply just to take the
take the equations and take the
with the uh derivative with respect to time.
time. So
So actually finding Jacobian matrix in my
actually finding Jacobian matrix in my opinion is easier than finding inverse
opinion is easier than finding inverse kinematic solution because we what we
kinematic solution because we what we need to do is to just get the forward
need to do is to just get the forward kinematics which is a fixed pipeline and
kinematics which is a fixed pipeline and workflow and then after we get all these
workflow and then after we get all these forward kinematics kinematics equations.
forward kinematics kinematics equations. We just take the uh derivative with
We just take the uh derivative with respect to time and then we get the we
respect to time and then we get the we get these equations and we also remember
get these equations and we also remember that we also we always want to factor
that we also we always want to factor out the joint
out the joint positions so that eventually we can then
positions so that eventually we can then factor out to get the uh the jacobian
factor out to get the uh the jacobian matrix.
matrix. So now if we do it and factor out the
So now if we do it and factor out the jacobian matrix what we will get is
jacobian matrix what we will get is here. So um recall that uh what we have
here. So um recall that uh what we have is what we have here is um
is what we have here is um theta 1 d2 and
theta 1 d2 and theta 3 and on this side is x y and
theta 3 and on this side is x y and gamma.
So you can see that eventually we can easily find the
easily find the um easily find the terms that we have.
um easily find the terms that we have. Um
Um first of for theta 1 dot um we need uh
first of for theta 1 dot um we need uh we have negative d2 s1
we have negative d2 s1 this is here and we have l3 sin theta 1
this is here and we have l3 sin theta 1 plus theta 3. So s13 here
plus theta 3. So s13 here is actually
is actually sin
sin theta 1
theta 1 plus theta 3.
plus theta 3. So you can see this is how we get the um
So you can see this is how we get the um this is how we get the uh the entries in
this is how we get the uh the entries in the jacobian matrix and the second the
the jacobian matrix and the second the second term is about d2. So for the
second term is about d2. So for the first equation we only have one term of
first equation we only have one term of d2 that is here. So what we need? So d2
d2 that is here. So what we need? So d2 is factor uh sorry these are the theta 1
is factor uh sorry these are the theta 1 dot d2 dot and theta 3 dot. So
dot d2 dot and theta 3 dot. So eventually what we get here is we just
eventually what we get here is we just need this cosine theta 1 here to be c1.
uh we will not do it one by one for this example but uh we just need to keep
example but uh we just need to keep following this these these steps and
following this these these steps and then we will be able to eventually get
then we will be able to eventually get the the entire Jacobian matrix from
the the entire Jacobian matrix from these three equations.
Now let's quick uh let's take a look on the inverse of Jacobian matrix.
the inverse of Jacobian matrix. The Jacobian matrix
The Jacobian matrix what what a Jacobian matrix can do is to
what what a Jacobian matrix can do is to map the joint velocity to the n factor
map the joint velocity to the n factor velocity. But sometimes what we need is
velocity. But sometimes what we need is to map the factor velocity back to joint
to map the factor velocity back to joint velocity. In that case we will need to
velocity. In that case we will need to take the inverse of Jacobian matrix.
But as we mentioned the inverse of the of a matrix does not
the inverse of the of a matrix does not always exist. So sometimes we if we find
always exist. So sometimes we if we find out that the determinant of the Jacobian
out that the determinant of the Jacobian matrix is equal to zero which means that
matrix is equal to zero which means that the Jacobian matrix has no inverse and
the Jacobian matrix has no inverse and there's no solution
there's no solution for the equation that we want to map the
for the equation that we want to map the antifactor velocity back to joint
antifactor velocity back to joint velocity.
velocity. In this configuration, it is called a
In this configuration, it is called a singularity where the Jacobian matrix
singularity where the Jacobian matrix has no inverse.
has no inverse. There's a there's a uh a number of
There's a there's a uh a number of phenomenon that we will we can we can
phenomenon that we will we can we can find in uh in singularity and we will
find in uh in singularity and we will mention that later on. And here uh the
mention that later on. And here uh the determinant if you are not familiar with
determinant if you are not familiar with this math again search for it or ask AI
this math again search for it or ask AI for it.
So now let's take a deeper look at the singularity because it's actually very
singularity because it's actually very important in robot arm control. We long
important in robot arm control. We long story short we generally want to avoid
story short we generally want to avoid operating our robot arm around
operating our robot arm around singularity configuration.
Uh one one way to find uh whether we are at a singularity uh configuration of the
at a singularity uh configuration of the robot
robot is to check the Jacobia matrix the rank
is to check the Jacobia matrix the rank of the Jacobia matrix. Um
of the Jacobia matrix. Um so overall singularity of a robot arm uh
so overall singularity of a robot arm uh is that is that the robot arm sometimes
is that is that the robot arm sometimes will be at a a certain configuration
will be at a a certain configuration like a a certain pose. either look like
like a a certain pose. either look like this or look like this or look like
this or look like this or look like this. Sometimes it might be in a special
this. Sometimes it might be in a special uh situation that the the inverse
uh situation that the the inverse kinematics u control of the robot arm
kinematics u control of the robot arm might not work very well. And there
might not work very well. And there might be al there can also be other
might be al there can also be other phenomenons that that singularity is
phenomenons that that singularity is very special case that the control
very special case that the control at singularity or near the singularity
at singularity or near the singularity area would be um would be trickier or
area would be um would be trickier or would have some special um
would have some special um considerations that we we have to make.
considerations that we we have to make. But first of all how do we check if we
But first of all how do we check if we are at singularity uh configuration? One
are at singularity uh configuration? One straightforward way is to check the rank
straightforward way is to check the rank of the Jacobia matrix
of the Jacobia matrix and uh we will quickly introduce what is
and uh we will quickly introduce what is rank of a matrix.
rank of a matrix. So rank of the matrix is a number of
So rank of the matrix is a number of linearly independent columns of or rows
linearly independent columns of or rows of a matrix. So if we have a if we have
of a matrix. So if we have a if we have uh an uh an m byn matrix, we will call
uh an uh an m byn matrix, we will call the matrix that is full rank if the rank
the matrix that is full rank if the rank is equal to uh the equal to m or n
is equal to uh the equal to m or n whichever one is smaller.
whichever one is smaller. Which means that we for a full red
Which means that we for a full red matrix we need uh we need all the rows
matrix we need uh we need all the rows or all the columns that that they are
or all the columns that that they are all linearly independent.
all linearly independent. For example,
For example, if we have some matrix like uh uh like 1
if we have some matrix like uh uh like 1 1 0 2 0 and 0 0 1. This is not a full
1 0 2 0 and 0 0 1. This is not a full rank matrix because you can see that the
rank matrix because you can see that the first two rows they are actually linear
first two rows they are actually linear uh linear dependent because if we if we
uh linear dependent because if we if we label this as R1 this is R2 then we have
label this as R1 this is R2 then we have a linear relationship that R1 equal to 2
a linear relationship that R1 equal to 2 R2. So this is an example that this is
R2. So this is an example that this is not
not full
full rank
and eventually we should notice that the matrix matrix is only invertible when it
matrix matrix is only invertible when it has full rank. So we must check if the
has full rank. So we must check if the Jacobian matrix is full rank or not
Jacobian matrix is full rank or not before we can actually take inverse of
before we can actually take inverse of it. Um and if the Jacobia matrix is not
it. Um and if the Jacobia matrix is not full rank, our robot is at singularity
because it is defined that if we have no inverse of Jacobia matrix then we are at
inverse of Jacobia matrix then we are at singularity. So which means that not
singularity. So which means that not full rank result in no inverse of
full rank result in no inverse of Jacobia matrix result in singularity.
So if we go back to uh Jacobian matrix um so we no longer have Jacobian matrix
um so we no longer have Jacobian matrix inverse because it is at at singularity.
inverse because it is at at singularity. If we are um if we are in the
If we are um if we are in the singularity configuration we no longer
singularity configuration we no longer have the inverse of Jacobian matrix.
have the inverse of Jacobian matrix. Instead
Instead what we will get is we can find out that
what we will get is we can find out that for some
for some joint rotations or join velocities at
joint rotations or join velocities at singularity
at singularity we might find a situation that we have some nonzero
we have uh some nonzero joint velocities but
joint velocities but the any factor velocity is zero which
the any factor velocity is zero which means that at singularity we might move
means that at singularity we might move we might rotate some joints but the any
we might rotate some joints but the any factor is not moving at all which
factor is not moving at all which somehow seems like the robot arm is
somehow seems like the robot arm is locked there even if we are rotating
locked there even if we are rotating some joints but the robot the but the
some joints but the robot the but the robot any factor is not moving
uh we will skip all the math here. Um if you are interested you can take a deeper
you are interested you can take a deeper look. But overall what I want to mention
look. But overall what I want to mention is that um
is that um if we are approaching
if we are approaching the singularity
If we are approaching the singularity, what we can find is that
we can sometimes get a finite and effective velocity. If we for example if
effective velocity. If we for example if we are very close or if we are on the
we are very close or if we are on the singularity configuration of the robot
singularity configuration of the robot arm and sometimes we just need we just
arm and sometimes we just need we just want a very small velocity or very small
want a very small velocity or very small movement of the any factor and if we are
movement of the any factor and if we are using inverse kinematics that can result
using inverse kinematics that can result in a super super large or even infinite
in a super super large or even infinite joint velocity. So you can see here that
joint velocity. So you can see here that is why I mentioned that we want to avoid
is why I mentioned that we want to avoid operating the robot using inverse
operating the robot using inverse kinematics around singularity because if
kinematics around singularity because if we are around or at singularity
we are around or at singularity configuration
configuration even if we just want a very small and
even if we just want a very small and effective velocity we can sometimes get
effective velocity we can sometimes get a very very fast join velocity which is
a very very fast join velocity which is unsafe.
So let's look at one example here. Um we will use this robot arm with three
Um we will use this robot arm with three joints. Join one, join three, join two
joints. Join one, join three, join two and join three. Um
and join three. Um and we will skip all the forward
and we will skip all the forward kinematics and the the procedures that
kinematics and the the procedures that we find the Jacobian matrix. Instead we
we find the Jacobian matrix. Instead we directly give the Jacobian matrix here
directly give the Jacobian matrix here and then we consider the poles that we
and then we consider the poles that we have set theta 1 equal to 45° theta 2
have set theta 1 equal to 45° theta 2 equal to zero theta 3 equal to 180°.
equal to zero theta 3 equal to 180°. This is actually not uh it will not
This is actually not uh it will not actually looking like this. I will not
actually looking like this. I will not draw it for now. Instead I will show it
draw it for now. Instead I will show it later. But if you're interested, you can
later. But if you're interested, you can try to draw this configuration out for
try to draw this configuration out for the robot to to take an observation on
the robot to to take an observation on what the robot look like under this
what the robot look like under this configuration.
configuration. But if we are under this configuration,
But if we are under this configuration, now we can plug in the numbers for the
now we can plug in the numbers for the uh for theta 1, theta 2 and theta 3. So
uh for theta 1, theta 2 and theta 3. So these n these numbers now they are no
these n these numbers now they are no longer unknown variable. Instead we
longer unknown variable. Instead we already know the one two three. So we
already know the one two three. So we can actually plug in the numbers here
can actually plug in the numbers here and then we can simplify the Jacobian
and then we can simplify the Jacobian matrix into this one.
matrix into this one. Um so we still keep
Um so we still keep S1 and C1 as theta ones but uh actually
S1 and C1 as theta ones but uh actually set theta 1 here is known for 45
set theta 1 here is known for 45 degrees. We do this because um we will
degrees. We do this because um we will use that later on. But overall these um
use that later on. But overall these um out of these numbers they are now known
out of these numbers they are now known known values and constant values.
So all the values in these in this matrix are known and constant.
And now let's take a look um is this a is this a singularity configuration or
is this a singularity configuration or not.
And also if you want to uh further consider uh you can try it by yourself
consider uh you can try it by yourself that uh this is
that uh this is this exam this configur configuration
this exam this configur configuration set theta 1 equal to 45° theta 2 equal
set theta 1 equal to 45° theta 2 equal to zero and theta 3 equal to 180 is what
to zero and theta 3 equal to 180 is what we are going to show next but you can
we are going to show next but you can also try yourself on can you find
also try yourself on can you find another singularity pose of this robot
another singularity pose of this robot arm
arm but let's take a look on the current
but let's take a look on the current configuration. If we draw the
configuration. If we draw the configuration out, we can actually find
configuration out, we can actually find out that the robot will look like this
out that the robot will look like this because you can see that you can see
because you can see that you can see that SATA one is 45,
that SATA one is 45, SA 2 is zero and SATA 3 is 180.
SA 2 is zero and SATA 3 is 180. And then
And then if we look at the Jacobian matrix we we
if we look at the Jacobian matrix we we should pay attention to that sin 45
should pay attention to that sin 45 equal to equal to cosine 45 = to 0.707
that actually means that we have s1 equal to c1.
equal to c1. So now if we look at the first two rows
So now if we look at the first two rows of the Jacobian matrix, we can label the
of the Jacobian matrix, we can label the first row as R1, the second row as R2.
And what we can find out is that R1 and R2, they are not linearly independent.
R2, they are not linearly independent. Instead, we actually have R1 equal to
Instead, we actually have R1 equal to negative R2. They have a linear
negative R2. They have a linear relationship which means that this
relationship which means that this Jacobian matrix is not full rank and we
Jacobian matrix is not full rank and we cannot take inverse of it and our robot
cannot take inverse of it and our robot is in singularity for this
is in singularity for this configuration.
on the robot arm, no matter how I rotate joint one, joint two, and no matter if I
joint one, joint two, and no matter if I rotate join one, join two or joint
rotate join one, join two or joint three, they always they all just result
three, they always they all just result in the manufacturer to move in these two
in the manufacturer to move in these two green
green directions. We cannot move in the in
directions. We cannot move in the in this red direction
this red direction at this moment.
at this moment. So that you can see that then we lose
So that you can see that then we lose one degree of freedom of the factor
one degree of freedom of the factor movement since we can only move to the
movement since we can only move to the green direction instead of the red
green direction instead of the red direction. And well if our robot is in
direction. And well if our robot is in other configurations let's for example
other configurations let's for example do it here
do it here then at this configuration we it's very
then at this configuration we it's very likely that we can move both
likely that we can move both horizontally and vertically. But here at
horizontally and vertically. But here at this singularity configuration,
this singularity configuration, we can only move along the green
we can only move along the green direction instead of the red.
And furthermore, if we re if we remove
if we re if we remove this
this definition,
definition, instead we just keep setta 1 as a ar as
instead we just keep setta 1 as a ar as an arbitrary value and we only keep
an arbitrary value and we only keep theta 2 equal to zero and set theta 3
theta 2 equal to zero and set theta 3 equal to 180. And we will still be able
equal to 180. And we will still be able to find out that um
to find out that um for the row one and row two they still
for the row one and row two they still have a relationship that row one over
have a relationship that row one over row two equal to tangent theta 1 and
row two equal to tangent theta 1 and tangent theta 1 will be a like
tangent theta 1 will be a like regardless what number we choose for
regardless what number we choose for what rotation we choose for uh joint one
what rotation we choose for uh joint one this will be a constant number which
this will be a constant number which means that even if we even if say the
means that even if we even if say the is at other angle other than 45° we
is at other angle other than 45° we still have row one and row two they they
still have row one and row two they they are they have a linear relationship. So
are they have a linear relationship. So actually the singularity here is that as
actually the singularity here is that as long as we have set theta 2 and theta 3
long as we have set theta 2 and theta 3 equal to 180 degree then
equal to 180 degree then regardless of where joint one is this
regardless of where joint one is this robot arm is at singularity. It's
robot arm is at singularity. It's actually very easy to understand like we
actually very easy to understand like we can overall rotate this configuration
can overall rotate this configuration uh while fixing uh theta 3 and theta 2
uh while fixing uh theta 3 and theta 2 only rotates theta one like this big rod
only rotates theta one like this big rod uh rotating like here or here. You can
uh rotating like here or here. You can actually see that we are facing a very
actually see that we are facing a very very similar uh situation and the robot
very similar uh situation and the robot arm is in singularity.
And another uh easy example here is also that if we have all the
that if we have all the if we have the entire robot arm to be
if we have the entire robot arm to be fully stretching
fully stretching then under this configuration no matter
then under this configuration no matter if we rotate joint one or rotate joint
if we rotate joint one or rotate joint two or rotate joint three they all
two or rotate joint three they all result in the green direction of the
result in the green direction of the factor movement and the antifactor
factor movement and the antifactor cannot move upward or
cannot move upward or cannot move up or lower. So this
cannot move up or lower. So this direction
direction of movement will be lost if we are under
of movement will be lost if we are under this configuration. It might be less
this configuration. It might be less intuitive that of course you will agree
intuitive that of course you will agree with me that we cannot move up
with me that we cannot move up but you might argue that we might be
but you might argue that we might be able to move here. This is definitely
able to move here. This is definitely within the robot workspace. But
what we will see here is that at this specific configuration right as right as
specific configuration right as right as this moment all the three joint
this moment all the three joint rotations will only result in horizontal
rotations will only result in horizontal movement.
movement. If somehow we controlled
If somehow we controlled the robot arm to a lower the robot any
the robot arm to a lower the robot any factor to a lower location, it's very
factor to a lower location, it's very it's almost certain that our trajectory
it's almost certain that our trajectory will be a curve like this. We cannot
will be a curve like this. We cannot move vertically down because you can
move vertically down because you can imagine the rotation of the joints in
imagine the rotation of the joints in your mind and you can you can see that
your mind and you can you can see that vertically moving down at this configur
vertically moving down at this configur configuration is impossible. So we are
configuration is impossible. So we are losing one degree of freedom and our
losing one degree of freedom and our robot arm is in singularity
and we will then quickly take a look on velocity mapping and force mapping.
velocity mapping and force mapping. So for velocity mapping um we here we
So for velocity mapping um we here we are using a very very simple example
are using a very very simple example here
here that uh we just have one joint
that uh we just have one joint and one link. So very very simple
and one link. So very very simple example
example and
and then we can find out that the any factor velocity V will be equal to R the
factor velocity V will be equal to R the length of the link
length of the link times theta dot which is the velocity of
times theta dot which is the velocity of the joint
and and then we can project the factor velocity
the factor velocity V
V into X direction and Y direction. We can
into X direction and Y direction. We can project V into Vx and V Y.
project V into Vx and V Y. And because this angle because this
And because this angle because this angle is theta
angle is theta so that this angle will be theta and
so that this angle will be theta and this angle will be 90° minus theta.
Sorry. Uh this angle will be 90° minus theta.
theta. And actually then we will have
this is theta. So vx will be uh because it's pointing to the left so it's in the
it's pointing to the left so it's in the negative direction of x. So vx will be
negative direction of x. So vx will be negative r
negative r uh times uh sin uh sin theta time theta
uh times uh sin uh sin theta time theta dot and similarly y here uh v y here
dot and similarly y here uh v y here will be r um will be r theta dot times
will be r um will be r theta dot times cosine theta dot because it's uh it's
cosine theta dot because it's uh it's actually this vector
and we simply can just uh write the write the these two equations into a
write the these two equations into a matrix form
matrix form as this.
as this. So you can actually see that this is
So you can actually see that this is actually the um
actually the um the Q
dot. Uh here I I use a bad notation but this
Uh here I I use a bad notation but this this should be labeled as Q dot uh just
this should be labeled as Q dot uh just just to be uh less ambiguous. Um
just to be uh less ambiguous. Um and then on the right hand side it's
and then on the right hand side it's theta dot times this
vector or it can still be considered as a as a as a 2x1 matrix. So actually by
a as a as a 2x1 matrix. So actually by velocity mapping we can also find the
velocity mapping we can also find the Jacobian matrix because this is Q dot
Jacobian matrix because this is Q dot this is theta dot. So this is actually
this is theta dot. So this is actually the Jacobian matrix.
So we can use this Jacobian matrix to map between the joint velocity and any
map between the joint velocity and any factor velocity.
And similarly we can also do the force mapping.
mapping. For the force mapping uh it will be a
For the force mapping uh it will be a bit more uh complicated and due to the
bit more uh complicated and due to the limited of time we will not go through
limited of time we will not go through the force mapping uh here uh for the
the force mapping uh here uh for the details at this moment. But what I want
details at this moment. But what I want to what I want to show that uh if we do
to what I want to show that uh if we do all the force mapping if we do all the
all the force mapping if we do all the math in this page
math in this page eventually what we can get for
eventually what we can get for singularity is one phenomenon that uh
singularity is one phenomenon that uh can help us to to find the singularity
can help us to to find the singularity that is
that is at singularity
it I'm not saying all forces there will be a certain force or a couple of
be a certain force or a couple of certain forces
certain forces on the any factor that will be passively
on the any factor that will be passively fully resisted by the
fully resisted by the robot arm structure
mentioned that is passively and fully resisted. It's very important that uh is
resisted. It's very important that uh is passively and fully resisted. This might
passively and fully resisted. This might look look like a very complicated
look look like a very complicated statement but
statement but in fact it is pretty intuitive to feel.
in fact it is pretty intuitive to feel. That is
That is if you fully stretch your arm and you
if you fully stretch your arm and you try to push on the wall. What you will
try to push on the wall. What you will feel is that your elbow is not is not
feel is that your elbow is not is not actively resisting it because the force
actively resisting it because the force d the force directly transmitted through
d the force directly transmitted through the bones. My elbow is not going to need
the bones. My elbow is not going to need any force to resist the external force.
any force to resist the external force. Instead if I have my elbow to be not not
Instead if I have my elbow to be not not uh to be not fully stretch stretched and
uh to be not fully stretch stretched and if I have external force and my elbow
if I have external force and my elbow actually need to fight against it. So
actually need to fight against it. So you can see that here it's actually
you can see that here it's actually intuitive one intuitive one intuitive
intuitive one intuitive one intuitive way to find singularity that at
way to find singularity that at singularity there will be a certain
singularity there will be a certain force on the factor that we push on the
force on the factor that we push on the wall. So the wall is giving us a force
wall. So the wall is giving us a force that is passing our arm and this force
that is passing our arm and this force is fully passively resisted.
is fully passively resisted. So this actually indicate that for many
So this actually indicate that for many robot arms as long as the robot arm is
robot arms as long as the robot arm is fully stretched
then the force that is pointing vertically
vertically pointing directly through the robot arm
pointing directly through the robot arm will be passively resisted. So for most
will be passively resisted. So for most of the robot arms
of the robot arms if we fully stretch the robot arm it is
if we fully stretch the robot arm it is very likely to be a singularity as you
very likely to be a singularity as you if you work with any robot you fully
if you work with any robot you fully stretch it you try to push on it if
stretch it you try to push on it if there's no joint
there's no joint if there's is no joint that you you find
if there's is no joint that you you find out that is actively resisting the force
out that is actively resisting the force then this configuration will be a
then this configuration will be a singularity.
singularity. So this is also one of the reason that
So this is also one of the reason that for many robot arms you see their uh
for many robot arms you see their uh their default pose or their default
their default pose or their default configuration or their homing
configuration or their homing configuration is not fully stretching
configuration is not fully stretching out. Instead it's kind of like folding
out. Instead it's kind of like folding in a certain configuration instead of
in a certain configuration instead of fully stretching out because that is
fully stretching out because that is singularity and we generally we do not
singularity and we generally we do not want to uh operate the robot around
want to uh operate the robot around singularity configuration.
All right, that is all of the lecture today. Uh there we covered a lot of
today. Uh there we covered a lot of details today. Um and this is a very
details today. Um and this is a very fast pace. Um
fast pace. Um it will be uh you are you are only
it will be uh you are you are only required to um to conceptionally
required to um to conceptionally understand the inverse kinematics and
understand the inverse kinematics and the differential kinematics and the
the differential kinematics and the singularity. But if you are interested
singularity. But if you are interested in uh all the mathematical details,
in uh all the mathematical details, please message me and we can have
please message me and we can have further discussions and we I can give
further discussions and we I can give you and share I can share with you more
you and share I can share with you more uh materials. Thank you.
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.