w14 <<
Previous Next >> w16
w15
翻譯
We saw this simple two-link robot in the previous lecture about forword kinematics.
我們在上一堂關於正向運動學的課程看到了這簡單的雙連桿機構。
The tooltip pose of this robot is described simple by two numbers, the coordinates x and y with respect to the world coordinate frame.
該機器人的工具提示姿勢由兩個數字簡單描述,即相對坐標的坐標 x 和 y。
So, the problem here is that given x and y, we want to determine the joined angles, Q1 and Q2.
所以,這裡的問題是給定 x 和 y,我們要確定連接角 Q1 和 Q2。
The solution that we're going to follow in this particular section is a geometric one.
在這裡我們要用幾何來解決。
We're going to start with a simple piece of construction.
我們將從一個簡單的結構開始。
We’re going to overlay the red triangle on top of our robot.
我們要在機器人上覆蓋紅色三角形。
We know that the end point coordinate is x, y, so the vertical height of the triangle is y, the horizontal width is x.
我們知道終點坐標是x,y,所以三角形的垂直高度是y,水平寬度是x。
And, using Pythagoras theorem, we can write r squared equals x squared plus y squared.
並且,使用畢氏定理,我們可以寫出 r ²= x ²+y ²。
So far, so easy.
到目前為止,很簡單。
Now, w're going to look at this triangle highlighted here in red and we want to determine the angle alpha.
現在,我們要查看這凸顯的紅色三角形,並確定α角。
In order to do that, we need to use the cosine rule.
為了做到這一點,我們需使用餘弦定理。
And, if you’re a little rusty on the cosine rule, here is a bit of a refresher.
如果你對餘弦定理有點陌生,這裡有一些複習。
We have an arbitrary triangle.
我們有一個任意三角形。
We don’t have any right angles in it and we’re going to label the length of this edge as A and the angle opposite that edge, we’re going to label as little a.
我們沒有任何直角,我們將這條邊的長度標記為 A,與該邊相對的角度,我們標記為小 a。
And, we do the same for this edge and this angle, and this edge and this angle.
並且,我們對這個邊、這個角,及這個邊、這個角做同樣的事。
So, all together, the sides are labelled capitals A, B and C, and the angles are labelled little a, little b, and little c.
因此,所有邊都標記為大 A、B 、 C,角標記為小 a、 b 、 c。
So, the cosine rule is simply this relationship here.
所以餘弦定理就是這種關係。
It’s a bit like Pythagoras’ theorem except for this extra term on the end with the cos a in it.
就像畢氏定理一樣,只是多了 cos a。
Now, let’s apply the cosine rule to the particular triangle we looked at a moment ago.
現在,將餘弦定理應用於剛才的特定三角形。
It’s pretty straightforward to write down this particular relationship.
寫出這種特殊關係很簡單。
We can isolate the term cos alpha which gives us the angle alpha that we’re interested in.
我們可分離出 cos α,只需要得知αα角度作為條件。
And, it’s defined in terms of the constant link lengths, A1 and A2 and the position of the end effector, x and y.
而且,它是根據恆定鏈接長度 A1 和 A2 以及末端執行器的位置 x 和 y 定義的。
We can write this simple relationship between the angles alpha and Q2.
我們可寫出角度 α 和 Q2 之間的簡單關係。
And, we know from the shape of the cosine function that cos of Q2 must be equal to negative of cos alpha.
而且,從餘弦函數的形狀知道,Q2 的 cos 必須等於 cos α 的負值。
This time, let’s just write an expression for the cosine of the joined angle Q2.
這次,為連接角 Q2 的餘弦寫一個表達式。
Now, we’re going to draw yet another red triangle and we’re going apply some simple trigonometry here.
現在,我們將繪製另一個紅色三角形,並在此處應用一些簡單的三角函數。
If we know Q2, then we know this length and this length of the red triangle.
如果我們知道 Q2,那麼我們就知道這個長度和這個紅色三角形的長度。
We can write this relationship for the sine of the joined angle Q2.
我們可在連接角Q2寫出正弦關係。
Now, we can consider this bigger triangle whose angle is beta and this side length of this triangle is given here in blue.
現在,我們考慮更大的三角形,它的角是β,這個三角形的邊長用藍色表示。
And, the length of the other side of the triangle is this.
而且,三角形另一邊長度是這個。
So, now we can write an expression for the angle beta in terms of these parameters here.
現在,我們可以用這些參數來寫一個β角的運算式。
Going back to the red triangle that we drew earlier, we can establish a relationship between Q1 and the angle beta.
回到之前的紅色三角形,可建立出Q1和β的關係。
Introduce yet another angle, this one gamma and we can write a relationship between the angle gamma and the tooltip coordinates x and y.
放入另一個角度ɣ,可寫出角度ɣ和提示框座標x和y間的關係。
Now, we can write a simple relationship between the angles that we’ve constructed, gamma and beta and the joined angle we’re interested in which is Q1.
現在,我們可建立出角度β、ɣ與連接角Q1間的關係。
And, the total relationship looks something like this.
而且,整個關係看起來像這樣。
Quite a complex relationship, it gives us the angle of joined one, that’s q1 in terms of the end effector coordinates y and x, and a bunch of constants, a1 and a2, and it’s also a function of the second joint angle, Q2.
這是一個非常複雜的關係,它給出了一個連接角度Q1,關於末端效應器座標y和x,還有一組常數a1、a2,也是第二個連接角度Q2的函數。
So, let’s summarize what it is that we have derived here.
所以,總結我們在這裡得出了什麼。
We have an expression for the cosine of Q2 and we have an expression for Q1.
我們有Q2餘弦方程式與Q1方程式。
Now, the cosine function is symmetrical about 0.
餘弦函數在0對稱。
So, if we know the value of the cosine of q2, then there are two possible solutions a positive angle and a negative angle.
所以,如果我們知道Q2的餘弦值,可能有兩個解一個是正角度,一個是負角度
We’re going to explicitly choose the positive angle. Which means that I can write this expression here.
我們要明確選擇正角度。也就是說我可以在這裡寫這個算式。
And now, we have what we call the inverse kinematic solution for this two-link robot.
現在,我們用逆向運動學來解決雙連桿機構。
We have an expression for the two joined angles, Q1 and Q2 in terms of the end effector pose x and y, and a bunch of constants.
我們得到了兩個連接角的運算式,Q1和Q2表示末端效應器姿勢x和y,即一組常數。
You notice that the two equations are not independent.
你要注意這兩個方程不是獨立的。
The equation for Q1, in fact, depends on the solution for Q2.
實際上,Q1方程式取決於Q2的解。
In this case, q2 is negative and we’re going to write the solution for q2 with a negative sign in front of the inverse cosine.
在這個例子中,q2是負數,我們要在反餘弦Q2前加上負號。
Now, we need to solve for Q1, so we’re going to introduce this particular red triangle, the angle beta that we solved previously, and the angle gamma which is defined in terms of y and x.
現在,我們要解Q1,所以我們要放入這個特殊的紅色三角形,之前解過的β角,和定義為y和x的ɣ角。
Now, we write a slightly different relationship between Q1, gamma and beta, different to what we had before.
現在,我們在Q1,ɣ和β間寫一個的關係,和我們之前的不同。
There’s a change of sign involved.
在這裡涉及到符號的變化。
Then, we can substitute all that previous equation and come up with this expression for q1.
Again, there is a change of sign here.
這裡的符號再次發生了變化。
Previously, this was a negative sign.
之前,這是一個負號。
And, here in summary form is the solution for the inverse kinematics of our two-link robot when it is in this particular configuration, where Q2 is negative.
並且,這裡總結我們的雙連桿機構處於這種特定配置時的逆運動學解決方案,其中 Q2是負值。
Let’s compare the two solutions, the case where Q2 is positive and the case where Q2 is negative.
讓我們比較兩種解決方案,Q2為正和Q2為負的情况。
w14 <<
Previous Next >> w16