MTB_robot_pick_and_place delete GUI <<
Previous Next >> W16
Movie subtite
We saw this simple two-link robot in the previous lecture about forward kinematics.
我們在上一堂關於正向運動學看到簡單的二連桿機構。
The tooltip pose of this robot is described simply 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 the top of our robot.
我們將在我們的機構覆蓋紅色三角形。
We know that the end point coordinate is x, y, so the vertical height or 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^2=x^2+y^2。
So far, so easy,
到目前為止很簡單。
Now, we’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 to 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對邊的角度標記為小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.
所以,餘弦定理在這裡是一種簡單的關係。(A^2=B^2+C^2-2BCcos(a)
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 like lengths, A1 and A2 and the position of the end effector, x and y,
然而,它是根據恆定鍵接長度A1和A2以及末端執行x和y。
We can write the simple relationship between the angles alpha and Q2.
我們可以寫出α與Q2之間簡單的關係。
And, we known 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 the 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’re constructed, gamma and beta and the joined angle we’re interested in which is Q1.
現在,我們可以寫出建構角度之間的簡單關係,γ和β以及我們感興趣的連接角Q1。
And, 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 the 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, that 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 com up with this expression for Q1.
然後,我們可以替代之前的所有等式並得出這個表達式對於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-like 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為正的形況是否定的。
MTB_robot_pick_and_place delete GUI <<
Previous Next >> W16