# 2014W ENGR486 Lecture09 Inverse Kinematics, Part I okay so we talked about inverse kinematics today okay yeah just a little bit the leftovers from the forward kinematics just wanted to bring it to your attention because we’re going to make use of some results here for universe kinematics all right so so in previous lecture you know we we did is we talked about the using th convention to derive forward kinematics right yeah the th Commission will use example for industrial robot and industrial robots we know that the last three joint industrial robot is a spherical a spherical wrist it’s actually basically 2 Z Y Z – fearful wrist okay so basically we’ll call it – the roll pitch low okay Oh peachy now so in particular if we’re going to basically a single out of the spherical robots and spherical wrists and assign it and the H frames to it and get the results basically this if this is the last frame and which back to the third frame we get a homogeneous transformation matrix like this right yeah now in the lecture notes this is derived based on this configuration here but you need to basically understand that this is not a zero position right so basically if you compare the theta angles for example X 3 and X 4 initially there is a 90 degree of theta angles here right yeah if you compare X 4 X 5 there’s a 90 90 degree here ok so if you want a zero zero position zero position is basically it should be this kind of configuration so X 3 X 4 X 5 they all share the same direction right yeah but for this particular one this t6 3 okay so technically you know if you wish feel if you have the whole robot you would have T 3 0 basically a matrix right you know from the from the third frame up to the original frame 0 so you have another one here and from third frame until 6 this is going to be what’s look like here right and for this particular one if you actually compare with one of our electrical electrical in Euler angles you know the lecture notes on Euler angles ok and we derived a Euler angle for ze Y Z if you compare this one with this Z Y Z angle you will see that they are exactly the same thing ok exactly same thing so when we do inverse kinematics and what we’re going to focus on is this right here we’re actually going to focus on is how do we use this essentially the homage in transformation matrix over here ok so this portion here at this portion is basically the Euler angle Z by Z okay yeah and now we’re going to make use of to solve the inverse kinematics okay yeah and the other one particular robot substituting robot here okay and which is what we’re going to use today so I think I did an example here how to assign a frame properly so this is a frame one at frame 0 frame 1 and frame 2 right there are two links and three frames okay but there’s no rotation on the last frame there okay you can easily assign the D H frame the huge parameters according to the frames like that you get all the teach basically variables like this all right yeah and then you can calculate a t10 t21 based on the d h tables and then you can calculate T to 0 right yeah so if you remember that for any combination transformation matrix this is orientation and this is the displacement right yeah so let’s see take a look at this one here the orientation of frame 1 which is back to frame 0 this is basically a rotation about that axis of theta 1 angle right yeah and that’s what you see here okay and this one here represent is the position vector of the frame the once origin which is bad to the frame zero so you see what’s the corn this if this is L 1 here and the coordinates basically you know this portion is L 1 cosine theta 1 and this portion is L 1 sine theta 1 right yeah and that’s exactly what’s here ok yeah altogether you get this guy here so this one represent is the position vector of this point this which is any factor right then you factor which back to this one here so basically what is the coordinates of this if we call this PCX and PCY what is the coordinates pc x pc y right given theta 1 theta 2 and l1 l2 okay yeah and then as a matter of fact this is got claw you said this is a forward kinematics right this 14 so what is forward kinematics forward kinematics is you have a joint variable Q okay that’s the Qi here and you have also joined variable and then you what you want is so what is that what is the position vector right for based on all the Q there that’s basically forward kinematics right yeah so in this particular case even if you don’t know how much in your transformation matrix you can easily derive the homogeneity you can easily derive the forward kinematics easy here right so if you want to do that basically okay drop that to the K to the x axis and drop that to the x axis here and if you draw a horizontal lines like this okay so basically that’s what you’re going to get here l 1 C 1 plus L 2 C 1 C 1 2 is cosine theta 1 plus theta 2 right 0 1 plus theta 2 so what is theta 1 plus theta 2 it’s basically from here to here right so you want to see that – ok yeah so you know sometimes to have a little bit sense of geology/geography in terms of robot robot instead of just rely purely on the homage in transformation matrix will help you understand basically I was going on in here all right yeah oh good ok so now let’s talk about the inverse kinematics here ok yeah as we said you know the forward kinematics basically right you have a join okay so forward kinematics is you have all the joint variables so joint variables we don’t know what they what kind of join it so it could be it could be a rebel joint it could be a prismatic George right yeah but altogether you know doesn’t matter we’re drawing two that is if you use you know th or you use geometry wise you’ll end up with essentially a homogeneous transformation matrix in a like this one here right like this and the homogeneous transformation matrix contains actually contains what in six informations what are the six information first is one two three these three information these three information represent what the position right yeah so basically let’s say you’re going to hand up with a homogeneous formation is B to form any factor to the frame zero and this guy here contains two information one is position okay position of the enya factor so the position let’s say I call it X E Y e and z e okay yeah so basically it’s this this this right the three things in here it also contains orientation a orientation and orientation is described by these three by three matrix over here okay yeah now orientation right not it this is a matrix nine elements but if we recall that right you don’t need nine variables for this matrix right you actually only need what how many variables to describe this orientation three yeah that’s Euler angles right so you only need three basically angles here let’s see here’s my Euler angles Phi Theta side okay yeah so basically the Hohmann transfer measure matrix which is the forward kinematics contains these six informations here okay and now this inverse kinematics the inverse kinematics is the other you’re on it here right so then give in right te 0 so which means what you’re going to   waterless it’s the wall in the space the robot can reach in any orientation okay that’s Dexter’s workspace so this is essentially the ideal situation right because it gives you the flexibility here okay yeah now if we compare the data turns workspace in the reachable workspace essentially this depth or the dexterous workspace is a subset of this reachable workspace okay yeah okay so I think we have talked about this example here so let’s see let’s save a very simple example okay if you have a to link robot okay we don’t know maybe the links are not necessarily the same right yeah so what will be the envelope making you cannot draw OB the envelope of the reachable workspace and under what condition that you can have a dexterous workspace for this robot right what will be a ritual how would you draw the reachable workspace pardon me l1 plus l2 okay so basically you’re talking about l1 plus l2 and then you draw it a circle right yeah was that it part of it yeah there’s an internet right so that’s right yeah so basically you have another circle let’s see right here right and when you fold this up to here cell – right yeah so that will be the reachable workspace now if l2 is shorter than l1 or in other words let us say l2 is not the same as l1 when you have a dexterous workspace right if l2 not the same as l1 so that’s the case we just draw here right Dexter’s workspaces you can reach the point at any orientation may be for this particular planner kids right any orientation doesn’t mean is 3d like this it’s a planner so planner basically means like what we just draw here orientation is this okay it’s a five so you it’s about that axis here’s a point I can reach those that with that angle with the fuzzy as angle about that axis this way this way this way this way this way okay like that that’s dexterous oriented right word space so parent for this one here if l2 not the same as ll1 yeah I got a hat you’re not going to have any Dexter’s workspace right if you if you’ll point any locations here anywhere the including the workspace you there’s actually only one right that’s it was some time you have it too okay yeah okay so when is the planner the orientation we’re talking less days okay yeah not because of time so what I’m saying is if it’s a planner this is orientation right then when we see the dexterous workspace in planner in order to the the definition is essentially is not like in the 3d space the to reach the point is select this you know different orientations that’s right yeah because that’s where you’re constrained right yeah exactly right yeah so if l1 equal to l2 right so you think about it the only work Reid dexterous work space is the origin because when you fold this here right when you fold it here you set up I wanted to reach this origin here how do i how can I reach the word you basically you can have infinite number of solutions if you don’t specify your orientation you can reach that there you can reach the point like this they stay straight all the way around 360 degrees okay yeah so if this one here there’s only physically one point right for the dexterous workspace okay yep okay so now having said this now so now let’s think about the universe kinematics now okay so basically how do we obtain the solution of inverse kinematics okay so the idea is okay to still focus on this statement here okay given a desired homogeneous transformation matrix and we want to calculate the angle joint angles or joint displacement okay that’s the simple step and easy to stick on now the other thing is let’s say the position right here right the desired position from the combinations formation matrix like this guy here now what are the position these are supposed to be what L was c1 cosine theta 1 l 2 cosine theta 1 plus theta 2 like this right so in other words you’re going to be giving a number right here you’re going to be given a number in here and then you’re going to try to solve for theta 1 and theta 2 so each one of this okay each one of this they are functions of theta I or D I right there functions okay and you’re actually trying to solve they get trying to get a solution based on the given functions okay yeah so let’s let’s think of it I’ll give you a most general so if I look give you the most general let me open the file here there right so here is a t60 okay you typically will see that this is a t60 this is a maybe this is basically the homogeneous transformation matrix describing the ad factor and okay yeah so if this is a puma and 560 it is chisme 560 and here’s the expressions if you use symbolic toolbox you derive all of this bunch of four expressions here right yeah apparently you can see c2 3 is a cosine theta 2 plus theta 3 right yeah so in other words here’s here’s the the Questor that you’re gonna go on now right this guy imagine this this is going to be given huh it’s going to be giving giving means you have a number number number number number number here right okay so but in theory you know what this number from do you know this number from forward kinematics you know this is where numbers should be from right and you know that number should be from here okay yeah and then now we’re trying to calculate this we’re trying to calculate giving all the numbers what are the theta i basically right what are they – I here look it so how many theta lies I have tomorrow of six degree of freedom I have six right and if I wanted to solve for the six variables the mathematic and I need how many equations six right okay so I put ideally I can have one two three out of the position three here right I can out of three here okay one two three then you need another three right you know three so the other three you can use reuse their gains to the other three probably coming out of here isn’t it right yeah however there how many here they’re lying out here right there nine so they’re nine of them but doesn’t necessarily means you know you use all of them if you remember is nine basically represent is this is a rotation matrix right which is your matrix it’s a rotation matrix actually they are not nine variables we keep saying it they’re only what three right it’s three variables three variables we basically or in other words all of the lying out here right they’re not linearly of the nonlinear equation anyway they’re not linearly independent okay you may have a three independent wise out of the nine equations yeah again then you would have a basically so-called redundancy right yeah also often your time we can see that you would have a infinite number of universes Meccan Ematic solutions right yeah and this is why the industrial robot the general uses sixty rear fair right although you will see that this the inverse kinematics solution is not unique and anyway but you want in most cases you won’t have infinite numbers for solutions like a seven or eight right yeah okay so so now that’s basically the idea now you essentially you know out of this whole bunch of your creations that are here right you will be able to essentially your ability subtract six equations since you gain six equations and based on the six equations and then you solve for theta I right that’s the idea but now you can pretty much see how challenges is because even just based on the these three equation that are here what are they are sine cosines right they’re not the the beautiful linear equations a 3x plus 2y plus you know lead and six is add that kind of equation to solve okay so this is a basically trigonometry to denote the trigonometric function and in orders when you solve that kind of a function and often in time you will get multiple solutions okay see if I’ve seen you know like a let’s see even just assign sine theta equal to z21 right and then then see that could be PI over 2 or 3 that could be negative PI over 2 right so you could have basically multiple solutions okay yeah so given those nonlinear characteristics you’re gonna have multiple solutions okay yeah for the inverse kinematics okay but the idea is you don’t need to multiples you don’t need all the solutions opening time you only need a one solution okay multiple solutions doesn’t means bad okay you have a choice okay and actually you know when you when you learn optimization you can use those flexibilities essentially and in particular also in the robotic planning okay so if you have an object maybe I can reach the object in this week then we reach laughing the other way right yeah that’s basically the advantage is to use it okay okay so now let’s take a look at the idea of a multiple solution right let’s look at multiple solutions here okay if I if we have a tuning robot and we want to reach that point so how can we reach that point we can reach the point like this right now or you can also reach that point like what like this okay like this so I’ll use this because we’re going to have it is rely on this one here because you have an example here so for this configuration this is the called elbow up okay it’s like elbow up like this and for this one here it’s called elbow down okay I’ll put done so for planner robot if the point is reachable then you typically will have two solutions okay the two solutions here all right yeah so what about the Puma okay whatever Puma robot if you have app you my robot so here’s a diagram here if we want to reach a certain location so this is – link and I’ll bring the pew liner here so this is two solutions so for Puma one and this is basically or four in six degrees for industrial robot if we’re going to try to reach one location for this represent the same location here very same location how many solutions will you have in here what a jointer here shows you for right so basically there’s so-called left and the right a pose or configuration so left basically means this so here see if this is the two arms here right if you are if you are any the two arms in this we here so the arms on the left side of the trunk this is the left configuration right yeah and you can always turn around basically make the arm on the right side of the trunk now that’ll be the right configuration right yeah so essentially in order to reach that point you can either use the left or right configuration and to reach the point you can either it from our point of view you can it can it can be I will up Oh elbow down right yeah so altogether the combination is a four out of here right combination for now however because the spherical raised okay I’ll show you I’ll show you the million the math lab here to show you something here okay so basically and now you reach the point here right you reach to here either left on or let elbow up elbow down so you can also manipulate the spherical raced a to a different angles and then end up with the same orientation okay so I’ll show you what what I mean sit here okay so I write down this one here so there are four right there foil here 8 therefore here now for the spherical wrist is 2 theta 4 7 5 6 6 okay the three spherical wrist right if we do this if we let theta 4 change from current angle okay by 180 degree okay and then we change to the 5 okay from a current angle to the negative of it okay yeah and if we changed SATA 6 from the current one by another 180 degree all right so see the relationship or this what it means so here’s the theta for the currents 30 degree for example and you change it to 210 Korean theta 5 is 30 degree and you put the create of Phi 2 negative 30 degree all right create a the 6 is 10 degree and then you put it in hundred 90 degree that’s 90 okay and then that ND factor the orientation ain’t a factor okay actually when you do this three things here and you do these three things here will the position of the in factor change you know basically what you’re doing here is you’re just right doing all of this in area but it’s possible right the position could change so what we want is we want to maintain okay even we do this we want to maintain the init factor the same orientation and the same configured in the same position okay as the four pictures here right so let’s say but if so this basically will produce okay the same okay position and orientation okay so let’s see if but if this is true or not oh darn it okay so I’m going to run it on the follower here all right so and this is you know what you’re going to do for your project alright kind of snapshots I didn’t finish my project actually okay essentially this is just the forward kinematics portion and you’re going to enter the inverse kinematics and user2 maybe in trajectory tracking or even a control basically to build up yourself a simulation environment all right yeah but once you ran it you know this is their position and the XY that right as orientation right yeah so you can punch in a number here so if you remember from the first lecture this pose right this poses what we call zero position right so the zero position means all the theta values at from the beginning they are all zero degrees right it was the early degrees okay and you can punching a number here essentially to change and to rotate like this okay so for example you know you change thirty degree here so that means you’re rotating thirty degree from current location okay to to the next yeah so that the angle edit here entered here is not the current to joint angle it’s how much degree you want to change based on the current drawing angle right okay so in your program you can always adding a value at here what’s the current angle then that’s actually pretty useful okay because well sometimes when you’re punching numbers if I push a 68 here then sometimes you’re gonna get lost control so what is the current to theta one angle right yeah okay so that’s the point okay and you know you can click going back here so my point here is let’s give an arbitrary theta foil here let’s see if I put a thirty degree at here okay and then put a negative thirty out of here okay so let’s say this is the this is the current joint occurrence orientation in a position phone in factor okay right yeah and according to my writing edit here I can achieve you know the same orientation of position by giving a new set of theta for theta five and a set of six angles right okay so how do we do that so I’m going to change the current data for angle to this guy which means the state of four what is the current angle because I’m going to add one motion so the current is thirty-two degree right so I need to change from thirty to 210 so in other words this is going to be a plus 180 degree right yeah so thank rotate 180 degree so that’s here now seat of five needs to be from negative thirty to thirty degree knob right to thirty degree yeah so so I’m going to rotate 60 degree and here to make it a positive a thirty degree okay alright and the state has six is to get another 180 degree in here there see right that’s the same orientation and position as previous one right yeah so basically this means if you consider if you consider this guy here right consider is or combination in here together with each one of this then how many solutions would you have now in terms of reaching a desired point with the desired position and orientation how many solutions will you have eight yeah right so each one of them has two different set of state of four seven five and six six right so together basically they’re a solutions okay they’re a solutions here okay not necessary you can reach all the reach solutions because sometimes you have the joint limits right you know we doing and you going to be able to together even though mathematically there is a solution okay so often time you had to you know take consideration so many things into considerations alright okay so now you can realize that tricky things about inverse kinematics here right so let’s start from the simplest condition let’s start from the two linked robot and then we’ll go into this Puma that’s basically I’ll show you different ways of doing kinematics humor schematics today we’re going to show you the analytical way and G on a geometric solution and then we may finish to the Cobian the differential kinematics and then we’ll see another one numerical approach for solving inverse kinematics alright so basically you’re going to have focus on three different approaches one is analytical still okay analytical way and geo geometric away and numerical approach so we’re going to basically look at a three different things today we’re going to try to look at the top one top two here okay and then we’ll look at a numerical approach when we finish the Jacobian okay so let’s look at start an example here okay and we’ll look at the the two linker robot as that example there for illustration of analytical solution and geometrical solution okay now this is a very essential approach for the for this is this with a solution for the two linked one it’s very fundamental very essential we actually will be able to use that for the universe kinematics of our six degree of industrial robots okay yeah now there are two posts right elbow up and elbow down and we have our brain is one here and we have the hominin a transformation matrix listed at up here so I’ll just bring this one here okay yeah so basically as you can see your px right equal to L 1 C 1 plus L 2 c1 2 and P y equal to L 1 s 1 plus L 2 s 1 2 px is the any factor position in a position now what are we trying to do right we’re trying to solve for basically what is the state of 1 and what is the state a 2 in terms of for the PX and the py all right yeah so bear in mind what is known what is not known here so P X py are known okay okay PS if you are unknown and solve for theta 1 and theta 2 all right yeah so analytical so first I said analytical way analytic approach another little approach basically is here are the two equations right here the two equations you solve the two equations analytically right that’s analytical way okay given two equations what are the solution and they’re not you basically you have many ways to do it is so what you do is you can okay take a square of each one of the equation then you add these two equation them up okay add them up okay there are lots of a trigonometric you know you can make use of it right so for example when you add this up so you can take you can think low service so what’s going to be when you take a square you can L 1 c1 squared right you can L 2 c1 2 square you have L 1 s 1 square you have L 2 s 1 2 squared so when you add these two up to L 1 C 1 square plus L 1 1 square is and 1 squared right yeah you also have you also have this guy here so there’s l1 squared and the IO 2 squared and the other term is what – l1 l2 here’s us there’s also 2 l1 l2 so there’s a c1 c1 2 plus s1 s1 – so trig identity trig identity is what cosine alpha minus beta equal cosine alpha cosine beta plus sine alpha and sine bad ok so I can take the off right here as theta 1 plus 0 2 as alpha and it’s theta as theta 1 right so when you put this 2 back over here what would you get so off is theta 1 plus theta 2 and theta is theta 1 so together you get cosine theta 2 you write cosine theta 2 okay so that’s analytical l1 arrow 2 are the dimensions you often see a dimension geometric dimension so that you now you know so then you get this theta 2 right from here you get the arc cosine X so you get to see it as you wish you this right yeah however okay many times you don’t use the arc cosine or arc sine okay for calculating the inverse solution okay if you don’t read the information it mostly they will say this because it’s not accurate okay it’s not accurate after that this some search here was trying to find a why this is not accurate I couldn’t find a very convincing one here but I have a hunch is this is mostly to deal with the digital computer basically the the floating-point calculation okay in terms of the arc sine and our cosine okay now particularly at the negative one to one location because cosine theta changes from negative 1 to 1 right yeah so basically their arc cosine changes from negative PI over 2 to PI over 2 ok yeah so when you when you add the location right so we try what we’re trying to do is try to avoid but I don’t think it’s that kind of critical moment in time and it’s the range okay it’s the range it’s the matters so what we do is we try to use a 10 arctan or arc 10 – if you remember here for the inverse okay so what we do is we use typically we try to use our 10 or that a 10 – you know that that function okay yeah so is that great or it you shouldn’t be cause Bruce p-square oh sorry yeah of course yeah what am I doing here is that right yeah good point okay so we typically try to use the Tang universe or arctan – all right yeah so here to relate this Tang universe with the theta2 there is this so called half angle formula and that formula says this so 10 theta over two squared equal to one minus cosine theta one plus cosine theta okay one plus cosine see okay cosine theta is giving over here so you can plug up cosine theta into here then you can get this tan theta right yeah now because there they are there is a square and here is a square okay so basically from here you can get theta 2 equal to positive negative okay and arc 10 or 9 recognizes this theta over 2 so 2 times Tanglers okay and a whole bunch of things here but if you plug it in you’ll get this guy okay so you get this one here so there are two solutions for theta2 based on this one here you get a positive you get a negative so what do you think that a positive and a negative thing and here why do you have a two solutions lamb I blew up it but not so okay so here here’s the pose here so which one do you think should be a positive which one she should be the negative that’s right right so positive mortgage means counterclockwise rotation right so you can able down from the reference to this this is a counterclockwise right it’s kind of clockwise okay yeah so negative is for elbow up and positive is for elbow done okay so that’s one thing now if you don’t like to use this half angle formula if then we can try to use this arc ten to eight or ten to so here’s a cosine theta right cosine theta two is equal to this right because I hate glue this now they can you can cancel this sine theta 2 equal to positive negative one minus cosine theta two squared okay right yeah so here again you have a positive and negative sign now right a positive and negative so if this is a positive just like the previous one if it’s positive which means sine theta two is always part is greater than zero right it’s always good in there oh so if it’s a positive then that means theta is between zero and two pi okay and this is elbow done okay this terrible time so then we use the arc 810 – so we use the a-10 to function so 810 to function takes the the Y and X so the Y here is sign and the X there is the cosine okay so this is another way of forgetting theta2 there okay yeah so once you get the theta2 then you can sub the city to value basic lay back into the equations over here and back into the equation here right yeah and then you will be able to solve for sine city is this then you basically you end up with just a two unknowns theta as c1 and s1 right c1 x1 so you’ll be able to solve for theta one so in our case here the s-1 and you’ll be able to get s 1 equal to L 2 C 2 P Y L 2 s 2 P X px squared plus py squared yeah so I got the phone in the lecture notes you can really have to rewrite this one here is whether you will be able to solve a solution for s 1 say 1 then you can use the a 10 to a 10 to 4 meter to solve for ok say 2 1 ok yeah so that’s the analytical one here right so basically it’s a purely algebraic solution right you based on the two equations and you in the nation with the two equations then you solve for theta 1 and see that – so geometric a solution if you match your solution and your magical solution it’s based on you know the observation of the geometry of this of the robotics of this two arm system here right so let’s say this is the drawing I’ll bring it here ok ok so given that desired location and you draw a vector okay and you can have elbow up elbow down right enable done if you look at the weave look at the geometry here so now let’s see if I’m trying to solve for this elbow down here and what is Theta 1 this is 0 1 here right this is 0 1 so if I use the geometry information basically see don’t want you go to this alpha angle – this better angle right say that one go to this but if I wanted to but if I wanted to use elbow up position this is elbow down if you want to use elbow up position then actually see the one strip it should equal to what alpha plus beta right okay so this is elbow up okay so then what is I for what is a bad habit right just purely big jock geometry here and offer this angle here right how can we get offa angle if we have this any factor desired location basically offer is what eight arctan of py over PX right joy rich yet so the Alpha physically is a 10/2 py and px px geometry beta is this angle here so it really doesn’t matter because you can see this is a bad angle this is better angle here right it’s bad here symmetric X so what is known here if I look at this triangle here or doesn’t matter that triangle and this is l2 this is l1 right and px py is known so the distance from here to here is also known right so basically for this whole triangle you know the length of each side of this triangle and you’re trying to calculate the angle sandwiched by two sides of the triangle so that’s actually basically called law of cosine right you can calculate okay so use a law of cosine you can capture the better angle okay a better angle is going to calculate it like a cosine beta equal to px squared plus py square plus l1 squared minus l2 squared over 2 l1 a px square plus py squared right yeah that’s a law of cosine so the law of cosine here you know give you a solution for that huh okay trying to the R cosine so that beta is 0 2 pi okay yeah yeah now the other geometry is this the other one is you can try this one here can try this so I can try this geometry if I extend this line here and then drop a projection from here to here okay from here to here so what do we have here this is bad so tangential beta equal to what this guy over this guy here right is all right yeah what is this distance well maybe what’s this angle here this angle is see the two right okay so so 10 better basically equal to l2 sine theta2 l2 sine theta2 over l1 plus l2 cosine theta2 okay cause i see that – hmm yeah okay so in other words theta 1 can be obtained you know based on this relationship you can obtain the beta through here okay through here or you can obtain the bad has to root here but a question is you look at this well oh if I want to obtain the batter here and then I have to know theta 2 first right so why should I get a theta 2 so see the two you can obtain that basically from the analytical ones from here okay so it’s probably in Kotik a mixed of analytical in a geometry geometric solution okay duh good right yeah yeah I’m not sure there’s a geometric solution for theta 2 though yeah well maybe there is so theta 2 is actually equal to this angle plus beta isn’t it right so you can use the law of cosine for this guy angle and then plus the law of cosine of this angle and you can guess it a 2 right yeah so either way you know you have a quite quite a few different options that are here okay in terms of the humours kinematics for this to link robot just remember those kilometers you know here and in here and geometry are geometric ways will be this guy and these two right and that’s the formula you will you will use to implement it to implement to this inverse kinematics okay to build up on a six-link group off there it’s all good yeah so I don’t have too much time left but let me just maybe quickly go over they slept without drawing here okay okay so for this example here you have a three think of a robot okay threading robot so because of three in control law so techniques baking in fact if I don’t care about orientation that it can reach gate is for certain points we actually have how many solutions infinite right yeah now if we constrain then orientation is okay I want to reach that point with an orientation of Phi angle nine fine okay so then we would have only actually two solution stuff right if you have the 85 this orientation and then you have elbow up and enabled um okay for this kind of case okay so then the question here is basically what is given up gave in this this and orientation right see that remember that the operating space the written that are really done there right giving position and orientation what would be the beta theta 1 theta 2 and theta 3 values okay so that’s basically not this example Q so apparently theta 1 and theta 2 the are the solution can be easily grabbed from the previous formula right from here okay but in order to get the formula you have to know basically the l3 this location first right you got a little didn’t know dislocation but the gaming location is px py so you should try to obtain this location first okay yeah now which I indicate is the W right it’s W here okay so how do we get the W well this is actually easy because say PX py is you can you can get PX py from where from the t30 right if you want this p WX filled with the w location all you need is actually the p is now the t30 is a t20 right yeah okay so that’s basically easy to done ah that’s what I reason here and then you can calculate theta one and see that you using a four meter as previous one right and then right from here at the last month theta three using this geometry see the three compared to the orientation so see the three basically equal to 3 Phi minus theta one and a minus theta 2 C Phi angle is the orientation right is orientation so geometric wise the Phi equal to theta 1 plus theta 2 plus theta 3 right just like a to link is 0 1 plus theta 2 right so that gives you basically simple it sample of solving given orientation now and position I will be the three joint angles right yeah that’s a good so next lecture will be interesting and we were going to look at many we’re going to look at this the geometric solution for the Puma robots right the analytical ones I have it in electro notes but I never used analog ones here I don’t it’s not that generic basically but the geometry solution is more generic solution giving a tip and any type of industrial robots and that’s something you can implement all right yeah and the numerical ones is also a strategy nary but numerical once there is a tricky one basically in it as you’re going to see in the future it’s hard to control you know basically in what kind of a pose that you’re going to approach that point for numerical pics numerical approach in ain’t just give you a solution without really realize realizing that what orientation is trying to approach the point okay questions okay