forked from Hifzakhalid/stanford-cs223a
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcs223a-homework-2.tex
288 lines (209 loc) · 7.02 KB
/
cs223a-homework-2.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
%insert copyright here
\documentclass{exam}
\usepackage{mathtools}
\begin{document}
\title{Stanford CS223A - Introduction to robotics \\
Homework \#2}
\author{Arn-O}
\date{January 2014}
\maketitle
\begin{questions}
\question
\begin{parts}
\part
Quite a complex question that learns me the similarity transforms. The first really tricky point is that after a $T_{1}$ displacement, the frame transform is $T_{1}^{-1}$. So the transform between the frame $\{0\}$ and the frame $\{1\}$ can be written:
\begin{equation}
P\{1\} = T_{1}^{-1}P\{0\}
\end{equation}
By definition, after the first displacement:
\begin{equation}
P_{1}\{0\} = T_{1}P\{0\}
\end{equation}
And after the second displacement:
\begin{equation}
P_{2}\{1\} = T_{2}P_{1}\{1\}
\end{equation}
And the result is:
\begin{equation}
P_{2}\{0\} = T'_{2}P\{0\}
\end{equation}
The second displacement explained in the frame $\{0\}$ gives:
\begin{equation}
T_{1}^{-1}P_{2}\{0\} = T_{2}T_{1}^{-1}P\{0\}
\end{equation}
And finally:
\begin{equation}
T'_{2} = T_{1}T_{2}T_{1}^{-1}
\end{equation}
This could also be derivate from the similarity transform equation:
\begin{equation}
B = T^{-1}AT
\end{equation}
Where $T$ is the frame transform from $\{A\}$ to $\{B\}$. In this case:
\begin{equation}
T = T_{1}^{-1}
\end{equation}
\part
In this case, we use the similarity transform with $T_{3}$ after a $T'_{2}T_{1}$ displacement:
\begin{equation}
T'_{3} = (T'_{2}T_{1})T_{3}(T'_{2}T_{1})^{-1}
\end{equation}
So with the result of the first part:
\begin{equation}
T'_{3} = T_{1}T_{2}T_{3}T_{1}^{-1}T_{2}^{-1}
\end{equation}
\part
The same formula is applied again on this joint:
\begin{equation}
T'_{4} = (T'_{3}T'_{2}T_{1})T_{4}(T'_{3}T'_{2}T_{1})^{-1}
\end{equation}
So if we develop this equation:
\begin{equation}
T'_{4} = (T_{1}T_{2}T_{3}T_{1}^{-1}T_{2}^{-1}
T_{1}T_{2}T_{1}^{-1}
T_{1})
T_{4}
(T_{1}T_{2}T_{3}T_{1}^{-1}T_{2}^{-1}
T_{1}T_{2}T_{1}^{-1}
T_{1})^{-1}
\end{equation}
After the simplification:
\begin{equation}
T'_{4} = (T_{1}T_{2}T_{3})T_{4}(T_{3}^{-1}T_{2}^{-1}T_{1}^{-1})
\end{equation}
\part
From the fixed to the free end, the displacement is:
\begin{equation}
T = T'_{4}T'_{3}T'_{2}T'_{1}
\end{equation}
Which gives:
\begin{equation}
T = T_{1}T_{2}T_{3}T_{4}T_{3}^{-1}T_{2}^{-1}T_{1}^{-1}
T_{1}T_{2}T_{3}T_{1}^{-1}T_{2}^{-1}
T'_{2}T'_{1}
\end{equation}
\begin{equation}
T = T_{1}T_{2}T_{3}T_{4}T_{1}^{-1}T_{2}^{-1}
T_{1}T_{2}T_{1}^{-1}
T_{1}
\end{equation}
\begin{equation}
T = T_{1}T_{2}T_{3}T_{4}
\end{equation}
And we come to the same result.
\end{parts}
\question
\begin{parts}
\part
I did not find any easy way to draw a schematic in LaTeX.
Just a couple of comments about the choice of the frames:
\begin{itemize}
\item the frames $\{0\}$, $\{1\}$ and $\{2\}$ coincide
\item the axis of the joint 1 and 2 intersect, so the $x_{1}$ axis is placed freely
\item an extra parameter is required between the joint 2 and 3
\end{itemize}
\part
The Denavit-Hartenberg parameters are the following:
\begin{centering}
\begin{tabular}{|| c | c | c | c | c ||}
\hline
i & $a_{i-1}$ & $\alpha_{i-1}$ & $d_{i}$ & $\theta_{i}$ \\
\hline
1 & 0 & 0 & 0 & $\theta_{1}$ \\
\hline
2 & 0 & +90 & 0 & $\theta_{2}$ \\
\hline
3 & $l$ & +90 & $d_{3}$ & 0 \\
\hline
\end{tabular}
\end{centering}
\part
Let's apply the forward kinematics formula from the DH parameters:
\begin{equation}
\prescript{i-1}{i}T = \begin{bmatrix}
c\theta_{i} & -s\theta_{i} & 0 & a_{i-1} \\
s\theta_{i}c\alpha_{i-1} & c\theta_{i}c\alpha_{i-1} & -s\alpha_{i-1} & -s\alpha_{i-1}d_{i} \\
s\theta_{i}s\alpha_{i-1} & c\theta_{i}s\alpha_{i-1} & c\alpha_{i-1} & c\alpha_{i-1}d_{i} \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
This formula is applied to the several joints:
\begin{equation}
\prescript{0}{1}T = \begin{bmatrix}
c\theta_{1} & -s\theta_{1} & 0 & 0 \\
s\theta_{1} & c\theta_{1} & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
\begin{equation}
\prescript{1}{2}T = \begin{bmatrix}
c\theta_{2} & -s\theta_{2} & 0 & 0 \\
0 & 0 & -1 & 0 \\
s\theta{2} & c\theta{2} & 0 & 0 \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
\begin{equation}
\prescript{2}{3}T = \begin{bmatrix}
1 & 0 & 0 & l \\
0 & 0 & -1 & -d_{3} \\
0 & 1 & 0 & 0 \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
The matrix are multiplied to each other, from the first to the last:
\begin{equation}
\prescript{0}{3}T = \prescript{0}{1}T\prescript{1}{2}T\prescript{2}{3}T
\end{equation}
\begin{equation}
\prescript{0}{2}T = \begin{bmatrix}
c_{12} & -c_{1}s_{2} & s_{1} & 0 \\
s_{1}c_{2} & -s_{12} & -c_{1} & 0 \\
s_{2} & c_{2} & 0 & 0 \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
\begin{equation}
\prescript{0}{3}T = \begin{bmatrix}
c_{12} & s_{1} & c_{1}s_{2} & lc_{12} + d_{3}c_{1}s_{2} \\
s_{1}c_{2} & -c_{1} & s_{12} & ls_{1}c_{2} + d_{3}s_{12} \\
s_{2} & 0 & -c_{2} & ls_{2} - d_{3}c_{2} \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
\end{parts}
\question
\begin{parts}
\part
Clearly not easy to draw the axis and the perpendiculars when the joints and the axis of the robot are not aligned. The schematic may become misleading at the end. According to me, the simple way to proceed is the use the definitions of the parameters.
Notably:
\begin{itemize}
\item $\alpha_{i}$ is the angle between $z_{i}$ and $z_{i+1}$ along $x_{i}$
\item $\theta_{i}$ is the angle between $x_{i-1}$ and $x_{i}$ along $z_{i}$
\end{itemize}
So if you manage to see the $x_{i}$ and $z_{i}$ axis, you can more easily see if a parameter is null or not.
They are several ways to define the D-H parameters. In my schematic, $d_{4} = 0$ and $d_{5}$ is not null.
\part
With the configuration of my schematic, the D-H parameters are:
\begin{centering}
\begin{tabular}{|| c | c | c | c | c ||}
\hline
i & $a_{i-1}$ & $\alpha_{i-1}$ & $d_{i}$ & $\theta_{i}$ \\
\hline
1 & 0 & 0 & 0 & $\theta_{1}$ \\
\hline
2 & $a_{1}$ & $\alpha_{1}$ & $d_{2}$ & $\theta_{2}$ \\
\hline
3 & 0 & $\alpha_{2}$ & $d_{3}$ & $\theta_{3}$ \\
\hline
4 & 0 & $\alpha_{3}$ & 0 & $\theta_{4}$ \\
\hline
5 & $a_{5}$ & 0 & $d_{5}$ & $\theta_{5}$ \\
\hline
\end{tabular}
The parameters of the schematic of the homework are variable. The other parameters are fixed.
\end{centering}
\end{parts}
\end{questions}
\end{document}