Angle-axis (E0.2) Euler Angles, Quaternion (E0.3) orientation representation, Manip. dir. kin (E1)
Transcript
foreign foreign okay no no writings no no okay I don't want the presenter View this time foreign let's share the screen okay can you can you see online yes we can see okay good [Music] so welcome back after the Eastern holidays and today lecture we will talk about different representation of orientation different than rotation Matrix last time we uh discussed about rotation Matrix and um now we will see the uh why the rotation Matrix are limited in some sense and um the main disadvantage of rotation Matrix are as representational orientation related to the fact that they are not minimal representation of orientation why they are not minimal because uh they need nine parameters so we have a three times three Matrix and uh we ideally need only three variables to represent orientation and indeed we have six constraints we remember that these are the orthonormal constraints that we discussed last time that makes the r Matrix an orthodontal mathematics yes oh yes um I see I see yeah so I need to share this way [Music] so it's putting a secondary monitor yes I should do like this now let's see if I manage to to write on the and this ah okay I didn't know you could do like that uh uh I will share again sorry yes no how can I go forward here us ually [Music] no so much foreign sorry about that you know you see the presenter view which I don't want oh okay okay so um online you can see now the other issue here with the representation the screen is not being shared okay mentally share this okay now we can see yeah but here it is appear the okay no it's okay so um as I said we have uh this orthonormality uh constraints and if we subtract to the nine nine variables that we have to represent the rotation Matrix the six constraints we remain we end up with three uh three independent variables so uh that's why we need at least uh uh six degrees of freedom to position the position the to position the uh and the factor and regulate also its orientation because we need three parameters um three degrees of freedom to uh to position the the under factor and free for your orientation and another uh reason for which we want to we don't want to use our rotation Matrix to represent orientation is whenever we do interpolation for example uh let's think we want to go from an initial orientation and move to the final orientation uh with a straight line so uh uh a path let's say that goes from the pi position to the PF final position does the job and for position you could think about uh for example do an interpolation where we start from PI Plus PF minus pi times s where s is a scholar that goes from 0 to 1. so one has to zero uh we have p is equal to Pi whenever s whenever s is is one we have P equal to BF can we do the same for orientation in your opinion something like that can we do that foreign as we do it for position the answer is no and why because in the intermediate locations so we we might ensure the orthonormality properties for the initial orientation and for the following orientation but for whatever is in the middle we are not able to to ensure them so [Music] um this is uh this is a limitation of orientation Matrix oh then uh second the third one it's um whenever we come to Define orientation error for example we want to have a desired orientation that we want to track we have our actual orientation of the end Factor we want to compute the error between these two orientations and again uh we cannot do the simple subtraction of the desired orientation minus the actual orientation because again we have not insurance that is the rotation Matrix I remember we don't know if the will satisfy the property of having a unit Vector as columns the property of having the columns orthonormal or to orthogonal each other so having a scalar product zero and and also uh determinant equal to one so uh but we want to have a tool that terrible allows us to to derive the orientation error the same way as and the interpolation that the same way we do uh with positions that's why we come for example uh to introduce the angle axis representation uh the angular FC representation it's um it's uh comes from a simple idea think about your um um starting orientation let's say your your actual orientation and your desired orientation and you want to compute [Music] um you want to know uh how is the second frame uh oriented with respect to the first one and you can think about the generic or rotation that is defined about an axis that brings the initial frame to the to the final one so uh given um this axis and given an angle uh we can consider um an orientation of this angle about this axis and we consider again the counterclockwise convention because we are using the right-handed rule so um we consider a positive uh rotation around the axis a counterclockwise rotation and with four parameters we are able to uh Define the orientation of the of the frame with respect to the to the initial one and we need four parameters free for the axis and one for the angle so still is not a non-lineable representation that would need just three parameters we said that are enough to represent orientation and in addition to this um uh so we we can we can use a formula that is called Rodriguez formula uh to compute the direct problem the other right problem is getting from this representation if it is the angle axis representation the correspondent rotation Matrix and three three Rodriguez formula is the following so we have a axis and angle and we have this did you ever seen this this is uh called author product is is a matrix and it's very similar to the Norm the square Norm remember but is the the two uh that the transpose in the is in the other in the other place then we have identity minus this again outer product cause Delta Theta plus you remember the excuse symmetric Matrix Associated to a vector so this is the excuse me mathematics Associated to the um cross product of of the axis sine of Delta Theta um so this is a other product we said and an important point is that this this mapping between angle axis and and rotation is not injective do you remember what the injected function is that for if you have the domain we have more points on the domains that correspond to the same point in the code domain so we have two sets of angle axis form um doubles that correspond to the to the same rotation Matrix and we will see afterwards how and why uh the opposite the inverse problem will give you two solutions so um this means that we have um we have something that is not really minimal here and this is an example you can you can you can we will see um we can do with Matlab afterwards I connect my laptop and we we can we can do this exercise together where we start from the um an axis zero zero one with some uh Delta Theta and we if you apply this uh rodrigger formula for example uh we can see that we boil down to have what something that we know which is the elementary rotation about that so we see that in this generic case of Rodriguez formula uh for any kind of uh rotation if we choose as axis the z-axis we see that the Rodriguez formula spits out the uh the known uh for a matrix of Elementary rotation about the z-axis and this is just to for us to to ensure that um everything works properly so um again I stress if Delta Data is positive the rotation is counterclockwise and if it is negative is clockwise so if you for example you want to Define um you know the orientation of this with respect to the to this Frame you have a Delta Data of 30 degrees and it's positive while if you define the other way still is Delta Theta is not minus Delta Theta but we will the value that is associated to that will be a negative value and this clockwise thing is due to a strictly link to the fact that we are choosing proper rotation so rotation Matrix that have a determinant equal to plus one if you use a determinant equal to -1 you will have the opposite one but we are not masochists so most of the community use proper rotations and and we would do the same then there are some interesting properties um of of this Rodriguez formula this this mutation Matrix computed uh this way uh that is um for example um the fact that if you look um apply the rotation Matrix to a generic Vector we saw the last texture that this Vector is rotated um unless what unless you apply the rotation to a vector that is aligned with the axis in this case the axis doesn't change an axis of our scale version of it and this means that it is invariant everything moves by by the axis so this um this formula here what remembers you that you already seen saying that a matrix times a vector is equal to the vector itself what does it mean do you remember from sorry um no no it's it's uh it's um it's more than that is more than that a is not the identity Matrix I I can I can put this maybe [Music] um it tells you something yeah exactly so X if satisfy this relationship is an eigenvector of a and a is not necessarily an identity Matrix it holds us for non-identic Matrix not trivial Solutions and so in the case of a rotation Matrix like this the axis is on a gam vector of r and is associated to what what is the eigenvalue is associated vector foreign exactly so there is only one um one negative value that is one we don't know the others we could be uh for sure we have three again values because we have a three times three Matrix uh all of them uh could be real if one of them is real and the other two are complex conjugates we could have different values and we will see that we don't see that but it's just just remember that one is The Reeling a value and the other two are complete conjugate uh another properties that [Music] um all uh Matrix satisfy is that the determinator of the Matrix is equal to the product of the eigen values so we know um we see here that um since the determinant is one the product of eigen values is one and also the trace of the Matrix uh in general is is the sum of the eigenvalues and in case of rotation Matrix if you uh we will see in Matlab if you do the um computer trigger the Rodriguez formula and you will see that the trace so the sum of the again values that correspond to the trace that is the sum of the elements of the Matrix in the diagonal is equal to 1 plus cosine Theta Delta Data don't pay attention if I don't forget to put the Delta because they are the same there's just just a notation and the the other properties that R is not an injective map because we have uh the two solutions related to the same Associated to the same rotations so in the case uh if you have a a are set with our axis R and a angle Theta the also the minus axis minus r uh minus Theta we will correspond to the same rotation Matrix then the inverse problem um how do we compute the inverse problem we start from we have a um bag a big set of rotation Matrix and we want to find the corresponding angle axis and we call this is uh as the inverse problem okay again I write introduce formula and we see here that for each entry of the rotation Matrix we can write an equation in how many unknowns four because we have Theta we have the three components of a axis in general we don't know how to to solve this problem but if we are talking about rotation Matrix exists on analytic Solutions and how do we compute that first we remember what we just said that the trace of a matrix is equal to 1 plus 2 cosine of theta and therefore um we can compute data or Delta Data sometimes I I make confusion between them but they are the same thing it's equal to uh what I compute the trace which is uh um sorry this is capital r yeah I compute the trace which is first element of the diagonal second element of the diagonal plus third element of the diagonal and I subtract -1 I divide by 2 and I get cos Theta and then I do the arc cosine what is the problem of of computing the arcosine that the cosine provides only values in 0 pi so we want to get the the other solution let's say that we need and for the we will see later how to how to deal with that and not use their cosine but use their attention function and but first let's uh find a way to compute the axis coordinates and you remember that we can write a skew symmetric matrix by subtracting to a matrix its transpose and if we do that we see that we have zeros on the on the on the diagonal and if we do that you do that symbolically in Matlab for example we see afterwards you find out that you um you get uh you get this you get the this expression so actually you can you can work out the component of your axis Computing this uh this and extracting from the SQ cinematic Matrix that is this one so for example we can get R axis are X are y r z we need to divide by two assign that Theta what and we take we said This this term is this one and is that component uh with a post sign so we take the r two one minus R12 then we have the Y component here that is this one that is as is so r13 minus R three one and then we have the X component with the opposite sign that is this one so we change the sign R 3 2 minus r 2 3. okay cool now we have uh we know how to compute the data not really satisfied about that but we we are we have a at least a method and we also are able to compute the the axis what what is the problem in the in this situation with this formula yeah so we can have a division by zero here whenever a sine of theta is zero so we have two angles that create problem that are for example Delta Theta equal to zero and that Theta equal to plus minus pi that are triangles for which sine of theta is zero and these are called uh singular cases a PO for these cases the axis is not defined okay but we said that we are not satisfied with our cosine because the um jar cosine uh sorry uh in general we we we we don't like the either dark tangent of or they are um the arcosign um instead of using uh them uh we we want to use the attention functions and the attitude functions is always defined in the four quadrants so if you think about the angles with zero angle here and 90 degrees here Pi here uh minus 90 degrees P here this is the first quadrant and this is the second quadrant third and fourth so for example um if you use the arctangent you can use the sign of the input argument to Define what is the quadrant because you know um the attention is let's say the the when you computer arc tangent you do the Y component divide the X component um which is the sine divided cosine but and then you do the arctangent in the attention you have the sign here and the cosine here so uh in the case of the attention you are able to while their tangent provides you only output between minus Pi half and Pi half minus 90 degrees and Plus 90 degrees the attention provides you uh for all the angles but the origin but this case never happens because you never have uh both cosine and sine equal to zero so uh using this um and knowing that the norm of the axis is one uh again doing this subtraction and knowing that the normal various one we know that the excuse symmetric Matrix Associated to the cross product with this um vector v will um if we compute the normal V we have something like this so we knowing that the norm of this is one we can compute simply in the norm of this Vector B and uh divide by true if we want to compute the sine of Delta Theta since we do the square root we have two solutions and then to compute Delta Data instead of using the um they are cosine this time we can use the the attention so instead of using so ideally we instead of using dark design we could do Arc Tana of sine Delta Theta cosine the data but we don't want to even to use the arctan so we use the atan shoe function which is uh we replace signed at the theater so we uh we divide [Music] plus minus one half of rb2 R23 r13 minus r 3 1 squared plus r21 minus R1 shoot squared and a second argument the cosine that we found before that was the trace minus one divided by 2. okay and we use this expression if you want to compute the solution and we see that since we have a square root here with two plus plus and minus solution we get the two solution we were expecting that tell us that this mapping is not injective and that we have two solutions well if we want to uh now we want to see uh okay then so for for the for um as an exercise you can check um the computation um of a singular case and a singular case we saw that is [Music] um resulting in a in a sine of Delta Theta equal to zero we will see this in in Matlab and um [Music] yeah something is missing the summary okay um a side note is that um the angular access representation can be equivalent to a rotation or Euler Vector which is if you multiply your Delta Theta times the unit axis you get this this vector and you will see that we will use this in the exponential map it is an equivalent way or represent the orientation that is minimum is a minimum representation of orientation and you will use this with Andrade in the next course [Music] next year and for example if you have an axis angle like this uh 90 degrees angle about that axis this is the associated error vector okay then um another formula that you can use rather than using the um Rodriguez formula directly you if you want to rotate just a vector and you could simplify the Rodriguez formula and obtain uh a single formula without uh having to first multiply the rotation Matrix and then multiply for the vector to rotate so this is a rotated Vector this is the Matrix that you remember rotate Vector this is the original vector if you place the Rodriguez formula here to compute the rotation Matrix Associated and you have the vector here you can simplify uh this way and you end up with something like this formula one menu online data and you can you can rewrite this is scholar you remember is a scholar product so you can put either on the left for example there's no problem to be more clean and then sorry you multiply by r heart which is the unit vector and then we do this okay this is just a side note if you want to be more efficient in your code in a summary um now we see why this angle axis are also are useful we can when you want to plan orientations we can do the interpolation on the Delta Theta axis so now we are uh it's listed to do this we start from the initial angle and we subtract from the final the initial one and we have the scholar s that is the time parameterization goes between 0 and 1. so this is very useful to do interpolation um still is not no minimal representation because we have four parameters and the components of R are are constrained by the condition of of having unit Norm because we said unit taxes and um also we said that the mapping to rotation Matrix is not unique okay then uh we we can we can introduce the exponential map it is something very similar and equivalent to the angle axis representation and and the idea is that given an angular velocity Vector applied for a unit time uh uh we want to compute the equivalent rotation Matrix of this uh of this rotation or the rotational with the with that that angular velocity and for example consider a trajectory uh um on the rotation uh time varying or rotation Matrix and we want to use the properties that we saw that is a link in the time derivative to the angular velocity times Vector product the rotation Matrix itself that could be Rewritten as as I said the associated Matrix to the cross product of Omega times R and if you look uh closely to this to this system um to this equation it's a differential equation of a dynamic system first order that you know that as a solution uh with exponential starting from the initial initial value x0 so uh in an equivalent way we can integrate um the this differential equation with the rotation Matrix where this is equivalent to the a matrix and to do so we use the exponential but this time is not an exponential of Scholars but it's an exponential Matrix and this is the initial orientation so this is uh um we use a exponential of a matrix here with in Matlab or in Matlab you can you is represented by the function X m and if we set the initial orientation's identity for a unit time we have what people call the exponential map so it's it's um if you do expand of a vector Omega you get really rotation Matrix so you get a matrix that um satisfy the properties of orthonormality so belongs to the group SO3 and um in this case if we consider this as this angular velocity that you don't know you know that has no uh not necessary a unit Norm but you could have whatever whatever magnitude and we split in in a in his unit Norm part and and in a scholar that the present is magnitude we see that we will go back to the previous Rodriguez formula that we we said uh before so um if we get um get this this expression we don't know how to to deal with that explanation of a matrix but we can do a Taylor expansion of the exponential so as the same as as an exponential uh a scalar exponential we can do a Taylor expansion of that and and this has this this uh this this um relationship where you have the linear term you have a quadratic term and the and the and the in the cubic and so on and but it can be proved I don't do it here but that this uh Taylor expansion with the specific properties of the exclusive metric Matrix can be transformed into something like this so something that is related to Omega uh exclusive metrics and Omega squares using metric and you can recognize from here that this is the Taylor expansion of sine Theta and of 1 minus cosine Theta and you can find more resources in this in this paper on this development and the cool thing that you want to show is just that if we write this down uh we want to we will see that we can get the Rodriguez formula from this this is a variation of radicals formula and that you can apply we give you the same result if you compute the symmetric Matrix squared as this this um this expression uh if you don't believe you can do it symbolically and we see that if we replace these uh Omega hat with the uh with the r with our axis sorry a heart is missing and we consider a property that you remember uh if you do the square of a excuse in mathematics this is the outer product minus the norm times the um identity Matrix but because the norm uh of a unit Vector is one then this boils down to just be I and if you replace sorry I'm I'm filling up partially the the slides to I Plus sent it so we look at this foreign minus cosine Theta and we replace this this is okay right plus send data like this Plus minus r r transpose cosine Theta minus I Plus I cosine you see this simplifies and we go back to the Rodriguez formula which is I minus RR transpose cosine Theta Plus sine Theta okay yeah and this is a Rodriguez formula so we see that explanation map it's equivalent foreign so to summarize the exponential map is is mapping a a vector and click them back to represent the an angular velocity but that is the axis times this this data angle uh into rotation Matrix that belongs to the group SO3 as this expression so you pop this and these are equivalent they provide you a rotation Matrix that satisfies the orthonormality properties and given uh so the idea that given Omega the exclamation map computes the rotation Matrix that you would obtain applying that Omega for a Time unit for one and the inverse of our explanation map is called the logarithmic map and you can use in Matlab the function log m and these does the opposite so uh from a rotation Matrix we installed the uh the angular velocity and you um you can compute using this this uh function in Matlab and it provides you what provides you uh if you do the logarithm of the of the of the of the of the rotation Matrix you get the argument of exponential uh that is uh excuse me mathematics so um then you can take out the value of the of the Omega vector and compute the axis and the and the data equivalently you can do uh whatever which we we saw before uh from the trace and from the excuse me metric part you can compute the axis and the and the angle so this is equivalent to what we saw to the inverse problem of uh uh in the angle axis case so the summary exponential map is a minimum representation uh because we uh three-dimensional map without constraints we still have singularities in 0 and pi and also it's not injective if we for example compute the exponential map with a an angle of data or we sum up 2 pi 4 Pi um to the single data you obtain the same the same rotation Matrix so yeah now I will show you you some exercises with this you can [Music] if I foreign on the server on the on the folder of these slides sometimes I update them so I try to change the foreign yeah you can do the take a break now I will I will set this up so we you don't waste time foreign okay okay foreign [Music] [Music] let's see uh now some some exercises uh what we just said um if you look at the rotation matrix.com matter file uh first we Define some um sorry you cannot see this [Music] duplicate first we Define some Anonymous function at the beginning that we will use uh alarm that are also called Lambda functions so if you consider like ads um the argument is input in this case we want to compute the the excuse me mathematics Associated to the cross product of a vector v and and we also Define the free Elementary rotation Matrix about X Y and Z axis so first let's solve the direct problem so we want to get the rotational Matrix from a certain angle axis set we Define an axis like this way um that should be a unit taxes you can compute the norm of that and the angle uh we can put I don't know point every Rod and we apply the Rodriguez formula that is the following so before we get r and now we can check just r as the terminal could one and is orthonormal so we can check that our inverse is equal to that expose yes so this is just a very small number it's just mathematics of zeros um instead if we want to compute the radius formula symbolically as we um to see that the um relations that we found are correct we Define uh some variables symbolic type like axis components coordinates and the angle we should append a value [Music] label real the student F complex Solutions Mobile Solutions and so with the final Vector of symbolic values called axis we apply again the religious format this time we will get um thank you we get a big expression and if we look at the at the trace of this uh it does the the expression that we saw we can find that if we continue to trace you can find that is one that is the norm of the three components of R is one uh um plus one uh one plus two cosine of the angle uh and and and you said instead if you compute the excuse me metric uh difference between R and his transpose we see here that we we get uh minus two r z sine of angle so the expression of of before and if we divide by two sine of the angle we get the again the discussion Matrix of the of the axis so uh for the inverse problem um so we we get the direct problem we compute the rotational Matrix numerically we saw that this stuff Works symbolically and we want to verify that the inverse problem will provide our axis and our angle back so the angle uh this time we apply just the cosine but you can apply those to the arc attention to uh and formula and you see that you evaluating the r cosine of Trace minus one divided by 0.5 so by two sorry divided by two means multiplying by 25 and do the r cosine you get the angle uh somebody of you uh um correct found an error a typo in the in the slides I will correct it I was dividing from uh two by two uh out out of the after the r cosine so that was wrong um for the axis uh we do the following we apply that just a formula we saw and we see that the axis is the same as the starting one uh which computer directs the direct problem um now the singularity uh this was the example of a singular case that I was showing you in the slides so we can evaluate the rotation Matrix Associated to this this um time uh terms and and we want to check is a rotation Matrix so we first consider that the norm of each column um sorry this is a tube should be a one and we do an end uh so if this is one it means that all the Norms all the The Columns have Norm equal to one orthogonality so we do the dot product of the columns again we do an end and we see that there are orthogonal and also the terminate one so this is just a simple test you can you can always use to check if uh tissue matrix's rotation marks three times three matrices or addition Matrix then [Music] um again we want to apply the uh the inverse formula we get an angle of Pi and here we started to have problems of sine of theta equal to zero so for some reason Matlab uh yeah when you complete the axis you get something that explodes not no longer any taxes uh the second exercise was to rotate a vector so we this is the original Vector we want to rotate and we want to apply rotation that is angle axis representation let's say around that of uh foreign [Music] [Music] so previously we get this expression for for the rotated vector and we want to see that the result is the same as we apply the elementary rotation around Zed uh that is the uh the formula that we we saw we Define above with the anonymous functions applied to the to the vector B so this is evaluation we see that the two vectors are the same then the next exercise is on the exponential map uh again we take the angle this axis and this angle and we we can we can we want to see basically that the free formulas that provides you the same result so this is the formula um Rodriguez formula and this is the formula with the exponential map applying the the function expand of Matlab directly to the cross cross M of rotovac is the product is what we call angular velocity without heart so it's a product of the axis and the angle and uh we want to see that it is equivalent um to the Rodriguez formula variant [Music] like this compute R this way get these are this way we get the same r and the third wave again they are the same then we want to show that the non-indjectivity of exponential map so we compute exponential map for name for for the Angles and also for the uh an angle plus 2 pi and we see that they are the same because if you subtract one from each other you get zeros very small number here that is basically a matrix of zeros uh the logarithmic map it's a log M function and we wanna we wanna see that we get this question mathematics Associated to this that is this one and if we take the um the element this will be the that component or rotation Vector this will be the Y component and the X component I think and if you compare with the rotation Vector that we defined before the values are the same just column Arrow so again we we show that you can get from the inverse problem uh back to the to the original input we we used for the direct problem and then I think we can move to the next topic that here are the Euler angles to change back to my foreign we cannot hear you sorry let's thank you uh so what are all angles um all the angles are a minimal representation of orientation think about um other angles as a set of subsequent orientation and this orientation should be about independent axis so the set of Euler angles is like understand why change this color is a set of three angles that you use to represent uh the orientation of a frame and this set of angles is not a vector just a sequence of angles why because it cannot is not part of a vector space so it can be combined combined uh um two set of angles you cannot sum them up and obtain uh another another angle another set of angles um as I said the order angles are a sequence of rotation around independent axis of reference frame so think about independent axis if I do a rotation about um at that axis and then I do another rotation again about the same z-axis these two rotation are not independent axis rotations so this should be about different axes and this axis could be of two types they could be fixed Axis or moving axis so if you think of fixed access you you always think about rotation about the original frame inertial frame fixed on the on the lab let's say and the moving axis it means that you first rotate about one axis then about the subsequent axis then about the uh the other axis again so every time you you change the reference frame and there are 12 possible combinations of moving axis and 12 fixag axis and as you said they cannot be a continuous axis so no x-axis said or YZ and these are all the possible combinations so for example a rotation about the x-axis then a rotation about y-axis then again about the x-axis or all the other combination X Y and Z and all the combinations are for the in this case fixed axis and if you do a rotation about X let's say at axis X about another axis and then again about that axis we called uh this angles proper angles otherwise if they are done about axis with different names they are called tight Prime angles or carbon angles and they say we say that the same is for moving axis we will discriminate the moving axis with a prime or with a second without with a superscript here to discriminate them from the fixed axis and we will see that only 12 combination matters because we will we will show that uh doing a um a rotation uh three rotations but the pixel axis is equivalent to do the same rotations um about a set of axes that are opposite and we will see that later so in essence there is an equivalence between the two uh uh we will consider only moving axis in this course so because they are more intuitive um while in the fixed axis you do the rotation always about the initial frame and you need to remember uh how was that located and as a sequence we say we have 12 sequence for a movie axis we choose this one we choose this one which is a mostly used in robotics and is the one that does a rotation first about that axis and we call this angle V uh to be consistent with the book of Siciliano then a rotation about Y axis this this is you see this initial one uh we do a rotation about the Z axis and the dead axis would be uh the same as the fixed axis because that's why we don't put any any superscript here because they will be coincident at the beginning then when we once we do we did the rotation um the first rotation we see that the new axis new x-axis will be rotated and we do a rotation this time about uh um the y-axis and you will see that again we will have a these two axes changed and then we will do a rotation about that that taxes again and find another another frame and these are called uh this uh Theta is it feels called role uh data is called pitch and um and uh um sorry [Music] um fee is called yo Theta is called pitch and C is called role around the x-axis the problem of this moving axis is that this axis won't be orthogonal because depend the axis location depends on the how much uh rotation did you do with the with the about the previous one and so if you want to for example see this axis in a in our robot quadruped robot you see that the role is about the axis coming out from the from the uh face of the robot and the lateral one is the y-axis and the vertical one is the z-axis and these are called roll picture then the direct problem we said we want to uh the electronics but we want to compute the rotation Matic Associated to this um set of Euler angles foreign capital the expression of rotation Matrix is equal to RZ see r y Theta RX C and you remember these are um we saw them they are Elementary rotations that's why uh Euler angles are convenient because you will see very convenient to want to find an orientation you apply free Elementary rotation and you you use the anonymous function that we we saw in Matlab and these are subsequent rotation one about a z-axis one about the rotated y-axis and the other one about the rotated again x axis and these are moving axes and you see that this is the order of rotations uh successful rotation means first multiply the previous rotation with the following one and these are the elementary rotations I recall the expression of the elementary rotation that we already saw in the previous lecture one about the x-axis we see that one is here the other one about Y axis the one is here and the other one about x axis the one is here are this is clear uh if you multiply this this is this um this multiplication subsequent rotation you'll find this expression and remember this expression uh only works for this set of Euler angles that we choose among the 12.
okay so z y x about moving taxes because people whenever need to use other angles need to always Define what is the sequence they are uh um talking about otherwise there is no meaning there is no uh common ground to discuss and we will see this we obtain in Matlab we do an exercise to obtain this Matrix and uh the issue of not having non-orthogonal axis is that um we cannot compute for example the orientation error as as we saw uh subtracting desired values from from actual values sorry actual basis from desired radius so this is not true orientation error cannot be defined like this and because the rotation error should live in a in a clearance space so in a space in a nuclear space with the orthogonal axis and therefore when we want to uh do tracking orientation with other angles we need to map them to other representation like the angle axis or rotation Matrix and use a different Oracle terms we see the last one is is quaternion um so um if we want to do the right problem with fixed axis not with the moving axis um as I said we can get the same rotation Matrix if we shift the order of the axis so rather than doing first Z then y then X about moving axis we do rotate first about X then a wild Y and then about Z but these rotations uh are not uh Elementary uh Matrix so they have a more complex definition and they are not as that's why we we never work with fixed axis we use moving axis because these are much simpler to compute and more intuitive also to think about because you want to think about I I need to define the orientation on my walls an incline wall to go with my robots a ramp and I think about running picture [Music] rolling pitch inclination is much easier than thinking about fixed access but just remember that there is an equivalence between the two just shifting your so the these these two will give the same results this is about the moving axis that is about the pixel axis um then the inverse problem we say the inverse problem is to go back from the rotation Matrix to the representation so to get a clue on how to do that we can have a look to the uh phase of the rotation Matrix and if we inspect that what we can see what what we can get from intuition here on Computing the values of uh v data MC angles first we can see that here there is only data here the cosine of theta sine of theta again cosine of theta here we have cosine of Phi and sine of Phi so for example we can try to get fee dividing the sign this term by this one the cosine will eliminate and we get the tangent of V but we say we don't we don't like to use the tangent so we better to use the attention so we can do uh attention of this two inputs and but we need to pay attention that our two one and R11 they are they contain this term that can go to zero and make us our attention not defined then um for data we can consider a sign of data here minus r31 and as a cosines Theta we we can do we can square these two term and we will see that we get we Square them and we sum them foreign data we see that this is from the trigonometry property it's one so we get cosine of theta squared we do this take a square root about here you see the problem with other angles we still have two solutions because of a square root so we always have a better solution and for the third one uh the fee we get we consider only these two terms we do the attention of this uh you know this one and divide by cos Theta and again we see here that whenever cos Theta becomes zero we have issues so so this is a zero uh what does it mean having cos Theta equal to zero it means that we are in singularities so the solutions to generate cos Theta is equal to zero and because Theta is equal to zero means for example when two axis are align and this is called the gimbal lock problem and happens in the case of this sequence that we choose for Theta equal to plus minus 90 degrees so whenever you have a pitch of of uh 90 degrees you cannot recognize you cannot solve the inverse problem what happens in the Pacific we are placed in the previous expression Theta equal to for example 90 degrees and we get this formula and if we look at that we see that from uh the information in this Matrix we can only retrieve information about the sum or the the difference of vmc because if we apply the trigonometric formula of sum and addition identities that we saw we can see that this one is equal to sine of C minus V this one is equal to cosine of C minus V is is the same and this is the minus sign of C minus V so in here you know that you can solve uh for uh get information on on the difference this is these two angles but not on them separately so you cannot discriminate uh between uh yo and roll anymore and this is what happens in a singularity situation um and again if you use a different sequency you will have a different um [Music] your different point uh set of of angles for which you have singularities [Music] um so uh if you look at the drawing uh this is whatever happens in a normal configuration with oral picture not not aligned while in the singularity you get the your uh axis uh aligned with the x-axis so you don't know you you you can either move uh V and c and you want to have any any you don't recognize the the the effect is is due to the their somewhat difference depending if you are using uh minus Pi half or plus by half a speech so um you cannot distinguish between a CMV and this means that uh to the same rotation Matrix we have an infinite set of uh of angles that correspond to the to the same rotation Matrix for example if in this case if you compute the rotational Matrix of this angles or pitch and yo and you compute uh this one sorry this one don't think about it uh what's wrong uh you get the the same result foreign in this case of a singularity The Chosen representation of Euler angles you know is not able to capture the orientation Associated to the uh to the rotation Matrix and you can repeat this analysis for any sequence of the 12 that we saw and you will always find two solutions and Singularity for some for some values of the angles that will be different in any case so knowing the task that you want to do in our case we choose this sequence because we know our robot will never go with 90 degrees pitch because it's very it's very dangerous it's not that humanoid so a Strunk is always let's say shifting between uh plus and minus 30 degrees you never go minus maximum 45 never go completely vertical so that that's a limitation of of Euler angles and another um thing that we need to know is how to compute uh the angular velocity um that is the the the the from from the derivative of the other angles uh the derivative of all the angles we call them Euler rates and the angular velocity is a is a vector that lives in a nuclear space so with orthogonal axis and and we can sum the contribution of each component in any order we don't care while in the case of Euler angles we want we need to respect the the sequence so to map uh Euler rates into into Omega we start from uh um the orientation we we have that we want to see how for that orientation uh the derivative of the order rates will map into an angular velocity because we need orientation but we don't need also for example if you want to do control of orientation we need the damping term and the damping term will will depend on the angular velocity so we need to work also the velocity level and so as input we have the the orientation we have uh at that moment and the the set of oil rates that we we want to map they don't belong to a vector space and again a sequence of two rotation is not obtained some in the corresponding minimal representations you cannot sum these angles and in general as I said the the angular velocity is not equal to the Euler rates foreign [Music] is not an extract differential if you do the integral of Omega you don't get the the orientation the set of Euler angles while if you do the integral of the Euler rate you get this the the the set of Euler angles a set of oil angles relative to that [Music] to that integration so uh integral of Omega doesn't have any physical interpretation uh let's consider uh two sets of rotations first we rotate for example about for one second about the z-axis and then for another second about the x-axis and we see that if um with with Omega equal to one I think and we see that um sorry uh Omega equal to uh 90 degrees per second and we got this uh if you do the integral we get this number and we know that if we rotate first about that and then uh about X we get this orientation while if we do the opposite that is we first rotate about X and then about Z we get this orientation that is different from this but if we integrate Omega we get the same value so there is a mismatch uh in in this sense so that if it was an exact differential it would provide a different uh different value of orientations not the same one and while for linear velocity we know that the velocity is the time derivative of positions so for orientation Omega is not the time derivative of the Euler angle that represents orientation even if they are 3D vectors so if somebody in the communities tended to do that that is is wrong and and this why because this is why a considering translation doesn't matter in which order um you translate you can translate first about why and then about text or first about X and then about why and you will end up in the same point while for orientation this doesn't work and the order matters and if you rotate about one axis and then about the other one you don't you don't get the same result they're doing the opposite order okay so how do we um is still possible to find though the relationship between the Omega and other rates for a certain orientation um let's consider this the same sequence that we introduced before and compute the contribution of each or a component of a Euler rate Vector to the Omega so Omega is defined an ingredient space so it's a fixed frame and the first [Music] rotation we said is about the z-axis so we put the z-axis here and we multiply by the Euler rate fidot and this is the contribution due to the first the to the feed out component of the Euler rate then we do a rotation about the um [Music] we we did this rotation so we saw that the um the y-axis the x-axis sorry uh has moved and the y-axis as well that's moved from the original ones foreign about the Y Prime axis that will be this one so because it has like a minus sign of Phi and uh on the on the X component and cosine of Phi in the in the Y component and we apply this component of the Euler rate and the third one is the rotation about the X second axis and therefore is like again rotating Computing the applying this rotation to a vector that is rotated two times so the X second is due to the rotation from the X to the X Prime and then again rotating again from the X Prime to the X second and if we put all of this in a matrix form we see this is the z-axis this is the corresponds to the second column of the elementary rotation Matrix that is representing the y-axis so it's a rotated axis and this is the first column so the x-axis uh uh of uh the composition of the rotation about said and about y and this Matrix here is dependent on only Phi and data so it's dependent only on the angles about x-axis and Theta axis and y-axis sorry about that axis and and y-axis and we can sum this contribution in a matrix way and find the Omega and this mapping as I said depends on the uh on the actual orientation so you will have a different mapping for each orientation is non-linear one so this Matrix will be different for each for each orientation and if we do the determinant determinant of this Matrix we get the cosine Theta and this means that for Theta equal to plus minus 90 degrees uh we have determinant coins to zero and this means that we are not able to represent Define the mapping between order rates and Omega and this is called The Singularity for this uh Euler rates to Omega representation because T cannot be inverted for for this for this uh for this situation where cosine Theta is 0 which means again for the same singular situation as in the previous mapping that we saw so also the velocity level we have this singularity so it doesn't exist and um there exists angular velocities that cannot be represented with this set with a set of Euler rates so you you you have problem in this in this configuration foreign sequences you have different uh very different expression for the Matrix t and different values of singularities to summarize all the angles are a minimal representation of orientation because they have only three parameters they have a singularity and this is the price to pay for a minimal representation usually you do have a this we see that in quaternions you don't have you don't have singularities but you don't you have a nominal representation uh the other problem is that they have not orthogonal axis due to the fact we are using subsequent rotations and the advantage is that they can be numerically easily numerically integrated so you can you can plan a trajectory with all the other angles you say I want to move from this orientation to moving just is that the component a new a new you can easily easily do that with other with other language foreign let's say in our code we always start to to use start using online angles knowing that there are this Singularity problems but then if you want to do for example somersault or jumps that com you do a full rotation of the body then you need to use another representation that we will see people usually do use quotations indeed the quaternions are called Unit quaternions um they are there are four parameters there are no minimal representation but they have no singularity and the shortcoming is that they have a unit Norm constraint think about a quaternion in this way to to get an idea you can think about uh to represent how do you represent a point on a circle in polar coordinates you can use a parameter that represents the array distance from the origin and the angle with respect to an axis to a zero reference um in a in 3D you to represent a point you can do the same reasoning and use again the uh the array the radius and and two angles okay now if you do this for a four dimensional sphere you get a quaternion so you get a scholar that represents a radius of four-dimensional sphere and three angles sorry foreign I have some delays okay and these question areas are useful because they eliminate the problem of Singularity that we find in angular axis representation and therefore for example they are used for example to describe satellite orientation or space applications where you cannot have these these issues um aquaterian is composed from a scholar part we said in a vector part let's say the the three angles in the for the sphere and this color part is in R belonging to R and this one to R uh Cube and they suffer from this problem of uh um having needed to have a unit Norm so you you do the squared of a scar part and the vector part n should be equal to one you remember this is the norm for a vector and and the nice uh another nice uh property is that they don't have the problem of having two uh solutions for the same orientation so for the for example the what we had in the angle axis representation uh will will give this will correspond to the same quotarian and to the same rotation Matrix we don't no longer have the duplication and but to do computation with quaternions we need a special algebra and what we need for a um in an algebra to to to to do computation at minimum we need um [Music] to represent the fact we don't do any rotation and we represent this with this kind of quaternion that has a one in the scholar and a vector of zeros uh in the in the vector part and this corresponds to for example to the identity in the rotation Matrix so the um is the neutral element then we need the inverse of uh defined inverse of the quaternion as we did for rotation Matrix and this will just shift flipping the sign of the uh we've done just flipping the sign of the vectorial part and we also need to compose rotations um Define quaternary multiplication so let's say a quaternion uh we want to define the orientation uh that is resulting from the composition of two uh two rotations and one represented by the uh quaternion q1 and one by the equatorium Q2 and in this case this is the formula so you you for this color part you you you do the following and and this is for Victoria party this is just uh you would call this function whenever you want to to compose rotation say patterns and is represented by this quaterial multiplication we have a possibility to map and convert whatever neon an angle axis uh this is angular axis to quaternion so whatever we saw before can be easily mapped into quaternions and this is the whenever you have small angles the quaternion correspondent boils down to this very simplified formula and then from quarterly you can compute those the angle axis in this way foreign [Music] part divided by the the normal part and since the norm is it's one of the quaternion then you can compute the norm of the Electoral Parts doing square root of 1 minus this color part squared because remember you cannot write anymore yeah I think uh PowerPoint has some issues okay it's getting very slow uh then we have also the Rodriguez formula to map quaternions into rotation Matrix and again uh we have a skill symmetic Matrix Associated to the to the vectoral part Epsilon and you can find in this document a lot of information on Euler angles quaternions yeah and so on it seems that Zoom crashed [Music] okay can you hear me yes we can still hear you okay that's that's crazy because uh arrive a message that everything crashed here but you still can see me okay and now uh I can we can do some Matlab examples on on the computation of the quantities that we just defined foreign [Music] foreign [Music] we still cannot hear you Professor we cannot hear you sorry guys uh I I had to switch from computers and I need to Newton and mute the microphone and I forgot this uh this um this one closed now can you hear me yes yes we can hear you now now I'm sharing this uh so you know okay it's coming on uh foreign [Music] in this this laptop um yeah so nothing I was just showing the um the application of the formula we we presented in the in the lecture and so demonstrating that we can compute the singular uh [Music] and Matrix for for the value of uh pitch of uh minus 90 and Plus 90 degrees and showing that both of them they give the uh the same solution uh so here is the symbolic expression uh that we now analyzed and putting the numbers inside you see you get the same uh this in rotational Matrix and in this exercise we were just competing applying the formula for direct program which is applying a subsequent rotations Elementary rotations about that Y and x-axis and then getting back after the competing the uh the rotation Matrix the angles the original angles applying the inverse problem formulas um then for the um mapping between all the rate and angular velocity uh we apply the formula that is in the slide and this is exactly what we have here because uh fee that is your the angle for the yo and it should be consistent sorry uh zero zero one for the for the for the this axis and minus sign V equals V and if you evaluate this and we multiply for the vector of Euler rates that we um sorry retro Warrior rate we want to compute the Omega from we get the value of Omega in the inertial frame in the fixed frame and we want to check that this mapping has some singularity in a correspondence of uh 90 degrees as well or minus 90 degrees and to do so we check uh we we have this Anonymous function we uh we call it with for example whatever number uh for the rolling and yo and applying a 90 degrees for the pitch and if we do so we get this Matrix and if you complete the determinant we see that it's going to zero so Singularity uh in this case as determinant equal to zero and and means that we cannot map all the rates into into Omega foreign very short break of five minutes and I will go back to the to the next slide in the other computer foreign foreign thank you foreign foreign okay unlock Ed sweet foreign okay okay I understand why it is okay um so this now we start the uh get into the core of the kinematics we discuss about the different kind of orientation representation now we want to put everything together with also the description of translations and Define the kinematics of a rigid body initially and then putting them together the rigid body that represent the links of a robot and having the direct climatics of a robot first um about uh kinematics um do you know what what what what what is the definition of of kinematics in your opinion [Music] correct so kinematics cares only about the description of emotion without considering the the the forces that cause the motion because the study of influence of the forces is the matter the subject of the Dynamics the kinematics we just care about description of emotion and so um we know that by moving these joints the robot changes the position and orientation of the under Factor but to not only of that effect also of all the other points in the structure of the road so in studying the direct climatic solar robot we are able to compute um deposition and orientation of each frame they could be attached in any point of the robot as a function of what of the joint variables that we present in this case with the Q vector so in in the kinematics we have different spaces [Music] um to have a motion of the joints we need to actuate the actuators we saw that we have uh a relationship with jointed actuators and usually this relationship is one to one we can see an example what is not and so we have a patient space the joint space and the dark space the time space inductation space can have different dimensions for example uh in this case whenever you use two Motors that work in an antagonistic way but both of them what will activate on the joint variable so think about this is one joint so we have two motors to move one joint but in this course we don't consider this we assume one model per joint so the dimension of the joint space is the same as the dimension of the patient space and we completely neglect adaptation space for now um to describe the joint space we use what we call generalized coordinates so suppose we have for example a system of n rigid bodies moving in the space free to move how many how many degrees of freedom do they have the total number of digital freedom of the system all the let's say n n bodies nine uh what in total plus six times six times n okay then let's assume we are going to limit the motion of this bodies these links floating in space and we will limit this Motion in certain joints and these joints will allow only one relative movement between two bodies so in this case we eliminate of the 60 degree freedom of each body would eliminate five of them because we introduce constraints between any two subsequent links any two links and we call these constraints autonomic constraints because depend only on position and not on velocity um we will see later on in the contact Dynamics how how to define this in autonomic constraints and we'll better detail on that and in essence we have five scalar equations that remove this algebraic equation that removes these degrees of freedom and we remain with what we remain uh with six times n minus s which is five times um the number of uh of of of joints so we remain with and and small coordinates that we call generalized coordinates so we we remain with a number of coordinates that is a number of the visual Freedom that is equal to the number of joints so the generalized coordinates are coordinates that allows us to represent our system while implicitly taking into account the constraints and represent the number of the visual freedom of the mechanical system and the important thing is that the generalized coordinate should be minimal and unambiguous and they can contain what they can contain depending on the nature of the joint linear quantities or angular quantities so if you have a rotational joints we will have a generalized coordinate that is an angle and if you have a prismatic joint you will have a generalized coordinate that is it's a it's a it's a position linear position relative of one link to the other so um we have two spaces which we set we don't consider adaptation space the joint space is where we have the equators acting on and there are adaptations are usually placed along the structure and and then this actuator will move these joints and usually they these joints are for example rotational ones and they're not affecting uh they are not directly in commanding Cartesian uh variables so they in case of rotational joints they they they command uh an angle they control an angle so they they live in a space in a joint space that is not it's not a Cartesian space and while the task space usually is where we Define the um our task uh it could be even the joint space itself but it usually is um it's um it's a it's for example the end effector space um and to go from the joint space to the touch base um we said that we use the direct kinematics that Maps joint position into into Factor position for example and the inverse kinematics instead is doing the opposite is mapping and the factor position or Cartesian position of some whatever Point into joint positions and so the space of the choice is defined by the vector of joint variables we call Q q1 and q1 q1 is for the first join the qn for the last joint well and for this queue we need to choose a parameterization um and this is a way to describe it to describe this this uh this configuration and uh this uh parametization uh is done with generalized coordinates that are minimum and ambiguous and and as we said is the number of degrees of freedom uh is equal to the size of this uh generalized coordinate Vector q and is equal to the number of joints um we have here two examples for example of an parameterization choice we could if we want to uh Define the the joint space for this for this robot we could use for example uh either um this angle for the first joint and this angle for the second joint uh or we could do whatever we most people of two in robotics we use for this second joint angular position we Define it in a relative way with respect to the previous one so this is both of them are are okay they are minimal here we have a two degrees of freedom robot with two joints [Music] um in this case is a planner robot and there are minimal and unambiguous while in this case for example we have one degrees of freedom Planet robot with one joint here that moves these links around and in this case uh is it um unambiguous this this kind of parameterization if we choose for example to represent uh the joint space with these two variables X and Y well it is an ambiguous we can we can we can represent the configuration of this link uh with X and Y coordinates for each point for each configuration sorry for each configuration we will have a different uh couple of X and Y variables but uh is it minimal foreign yeah because let's say there is implicitly if we choose X and Y there is a constraint in involved into into this that is that for example this point cannot be um um the length of this segment is not going to be bigger than uh L squared uh sorry the the line squared is it should be um X and Y component should be related to the lengths of the of the of the of the link for example so we have two variables but they're not minimal because in the end we have one degrees of freedom and we need to add a constraint so ideally we just need one variable so this is a non-minimal representation and this is not good for set to represent the joint space as generalized coordinate um while what about the operational space or the task space the both of those names are are the same and equivalent um so the task space is the space where the task is defined and usually where the trajectories are planned um so for example if you want to move the and the factor on a 2d plane we have a 2d task if you want to drill a hole perpendicular to a surface we we do have um a 1D task um and the important thing is that the direct kinematics is defined for each task so we first Define the task we have a joint space that is always the same and we can find this direct thematic mapping for each task so the direct kinematics depends on the task other example of tasks are to move the position of the end effector uh move the position and the orientation of them the factor so in this case in the first case you have a task of three dimensions um in the second case you have a task six dimensional task but you could also do other things for example you have a camera in the under in the factor and you want to do visual serving visual tracking so you wanted some feature in the image plane of your camera are tracking uh some desired ones so you want to follow an object for example so you want to in this case the task is is defining the image plain image image plane of a camera and still you can find a direct pneumatics that relates the motion of your joints to the motion of the feature in your camera playing so you can be very creative here you can put together many things you can put orientation and in position you can do control of position and orientation on in true Direction and leave the third free or you can do control the position in two direction and let give the the third one free so this is just to say that tasks are not limited to the Cartesian space even though we mostly we see examples related to that so again for the also for the Cartesian space we want to choose a productization this time the vector of the task variable that we call R ellips in a m Dimension space where m is as I said six dimensional three-dimensional and again the description of the task variables should be in an ambiguous and minimal and usually we have a for example usually we have um lower than six bar and task Northern equal to six um for example in the case of a Scara robot you remember it's a robot that has been so in the in the first lecture uh as two rotational axes uh followed by one Prismatic one then you can still have the fourth rotational one for the tip but let's say it's it's really good friends in this case in this case we [Music] from from from a three-dimensional joint space can I compute the the uh position orientation of the of the end effector for example it is our task is six dimensional here let's say you want to control position and orientation together do you think we we can do that foreign is it possible why not [Music] fixed and uh I cannot change orientation because then the factor is fixed it cannot change orientation I repeat the question for the reply to for the for the others um well um it's true that the rotation cannot be changed the orientation cannot be changed with the some orientation cannot be changed just just the orientation about the z-axis can change because these two axes are on the uh on the z-axis these two joints are around the on the z-axis but for example we cannot change this orientation or this orientation but this doesn't mean that we cannot compute that they are fixed so we cannot affect it but the structure itself will produce the directory Max you produce uh certain orientation that will not be dependent on the joint variable but there would be some numbers there okay so um three of the six variables will be fixed we can change for example the position in the y coordinate we can can we do that on the XM on the X and Y yes or no in the factor horizontal positions can we control them separately I think we can control it only only three things right we have three degrees we can control them three things three things what are these three things one is the vertical position of the under Factor because this joint is Prismatic and is directly affecting the the comp component that's fine okay then we have the horizontal component that are linked together right because we don't have a prismatic joint in this direction so they are constrained to move on a circle okay and then we have the orientation so we can control orientation around that so we can uh we have still trigger Freedom vertical position uh orientation about said and X Y that move on the line so we we have one degrees of freedom of coupled X and Y and do you think we can do the inverse kinematics can we compute from the position orientation we can can we compute the [Music] um the three angles uh sorry the three joint variables the two angles and the position of the of the Prismatic joint universally I mean can we map one to one now I cannot compute the inverse kinematics um in in in in as a one-to-one mapping and so I don't have because I don't have enough degrees of freedom to place arbitrarily the orientation and position some orientation are fixed so uh um our mapping is is is not uh is not one-to-one and if the number of task variable it's lower than the number of joints we are guaranteed that we always are able to place our task variables in a arbitrary way so we can we can uh we can we we don't have these issues so in this case uh instead m is bigger than n and we cannot do that uh so in a typical industrial case uh either m is equal to n and usually there are six diseases Freedom or uh that's the robots are seven degrees of freedom and still our task is most of time to control position orientation in this case we have one EXO freedom of redundancy which is the difference between the task-based variable and joint space variable and for serum manipulators again we can say that we have always a solution for the direct kinematics and this is the mapping so uh we'll call this uh direct um kinematics is is um um function of the joint variables that provides you the task variables and The Verge kinematics is the opposite we have the task variable is input and we get the joint variables output and again uh in for the inverse kinematics we can have either multiple or infinite solutions we can have no solution at all or and additionally we to compute inverse kinematics we don't will always need the four kinematics expression the direct kinematic flow forward kinematics is the same they are equivalent uh they are synonymous and instead the opposite for a parallel manipulator you know parallel manipulator is like um one where we have kinematic Loop like a steward platform that the the platform that are used for example for flight simulators we have the opposite uh we have the direct pneumatics is super hard is is difficult as in the ceremony collateral kinematics is while inverse kinematics is easy this is just a note so how do you compute this direct kinematic map that relates joint variables to task variables we can concatenate the transforms like we did for the rotations what which transform rotor translation so transformation that represents the rotor translation of one frame with respect to the other so first in a manipulator we said we can attach a reference frame to each link and Joint and we usually number the links from the base that is link 0 to the and the factor that is link n and third uh we place the joints to connect the links uh allowing their relative motions and this is the sketch of a kinematic tree that represents a robot where we have a mixture of rotational joints and Prismatic joints [Music] so the rotational ones are are these ones it is one Prismatic is this one each joint has Associated is single degrees of freedom variable we don't talk about uh two degrees of freedom joints here is not uh a part of this course so we assume always joint with one degrees of freedom and each variable is associated to a joint uh here we have the Prismatic one and it's joined to define the relative orientation of the next link with respect to the previous link and and finally we have the end effector and you usually place a frame also at the end of factor that is RG transformation with respect to the last link frame so we have the joint variables the touch variables are and position orientation of the frame Fe could be a an example of dust variables and the idea is that we want to Define this transformation between each frame and the next one and coconut concatenate them this way we are able to uh go through Express for example the position of [Music] of the under factor in the base frame as a function of the joint variables because the position of this point will be dependent on the values of the all the joints and to do so uh we introduce the concept of rot translations and the concept of uh homogeneous transforms that is an operator that implements a lot of translations so combines the representation of a position and orientation of a rich body with respect to another one and with the term pose we Express the both the um position and orientation the concept of position orientation is named with the term pause so opposing 3D as I said is free position parameter free orientation parameters in 2D we have two position parameter and one orientation parameter so it's the pose is different according to where we Define it um the homogeneous transform are a basic tool to Define and derive the direct schematic from an emulator and they are uh four by four Matrix that allows to compose these rotor translations the same way as we did for rotations foreign so uh we said we we work with frames so let's think about the frame of one link with respect to the to the previous one uh and we have the frame FB uh let's think about uh is attached to the to the first link uh while this fa is a is a base frame um or this Frame could be I don't know the uh and the factor frame with a gripper um and I want to map for example the reading of uh of a camera attached to the end effector as we saw in the previous lectures uh we want to map this into the into the base frame um and we see that this frame has a different origin with respect to the to the to the frame a and to define a to map this this uh Vector P that is defined in the B frame into the A-frame we have two things to do so first we have to remember rotate map change of coordinates through the Matrix ARB to change the coordinates of P into into a and then we need to apply the translation of the uh of the of the of the true origin of the two frames because for the rotations the two frames were coincident for in this case we are considering uh frames that are can be far apart from each other so uh the expression of the vectoring in a is this Vector represent this plus this one everything should be sorry this is f a everything should be summed up in the same frame so that's why we do this rotation today to the mapping to the to the to the A-frame and because you don't want to adapt add together beer and apples and this is called a fine operation so a multiplication and a sum and we know that uh we cannot do concatenate this kind of a fine operation together as we did for rotation and a trick uh that we saw in the lecture on uh on the on the visual sensor when we were talking about the penal model is that we can rewrite this uh this mapping in homogeneous coordinate we append a scale factor we choose one okay so Pia expressed in homogeneous coordinates pa1 and we Define uh this mapping as this Matrix so this is PB expressed homogeneous coordinate and we see that if we do block wise um multiplications we obtain exactly the expression of PA because we multiply PB times R and 1 times this and we sum them together we obtain the same expression and the the one will will just remain the one and this time we have a an operator that is linear so we can do compositional Matrix and see here I I said it's the origin of frame B uh with respect to frame a expressed in frame a so this is important is this segment this Vector expressed in frame a while that is the orientation of frame B with respect to frame a let me show and to conclude we can interpret this uh homogeneous transform uh t uh that describe the poison rotation of a frame with respect to another the position orientation of frames respect to another and we we can interpret as we did for rotation Matrix also as [Music] um uh an operator that uh changes the representation of a geometric Factor uh from a frame to another and in particular uh the museum transformed ATB transforms a geometric factor from um that is from origin of frame B to the point P into another geometric factor that is from the origin of frame a to a point B and it's a linear relationship this means I can compose several transforms and as we did for rotations we see that we can comp concatenate multiple router translation just multiplying one after each other and if you do the product [Music] blockwise you get in essence um this expression we can do it we can do it by hand um yeah okay yeah you can you can if you if you do this um block wise you you find uh this element is a product of these two plus you have zero here so this won't count and you you get in essence the this element is what is the rotation Matrix that represent the orientation of frame C with respect to frame a while this is just the position the shift between the frame origin the origin of frame C with respect to frame a expression frame a and this is exactly the transformation uh from a to c so the composing the transformation from A to B with the transformation from B to C we can get the transformation from a to c yes um okay we continue from this point next time tomorrow and yeah I will put online the the examples uh and correct the type of uh you spot today and see you tomorrow [Music] foreign