forked from Hifzakhalid/stanford-cs223a
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcs223a-homework-3.tex
263 lines (204 loc) · 9.06 KB
/
cs223a-homework-3.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
%insert copyright here
\documentclass{exam}
\usepackage{mathtools}
\begin{document}
\title{Stanford CS223A - Introduction to robotics \\
Homework \#3}
\author{Arn-O}
\date{January 2014}
\maketitle
\begin{questions}
\question
Let's deal with the linear velocity first:
\begin{equation}
x_{P} = \begin{bmatrix}
L_{1}c_{1} + L_{2}c_{1}c_{3} - s_{1}d_{2} \\
L_{1}s_{1} + L_{2}s_{1}c_{3} + c_{1}d_{2} \\
-L_{2}s_{3} \\
\end{bmatrix}
\end{equation}
The derivation of this vector for each joint parameter gives:
\begin{equation}
J_{V} = \begin{bmatrix}
-L_{1}s_{1} - L_{2}s_{1}c_{3} - c_{1}d_{2} & -s_{1} & -L_{2}c_{1}s_{3} \\
L_{1}c_{1} + L_{2}c_{1}c_{3} - s_{1}d_{2} & c_{1} & -L_{2}s_{1}s_{3} \\
0 & 0 & -L_{2}c_{3} \\
\end{bmatrix}
\end{equation}
The angular velocity Jacobian can be determined using the trick of the intermediate end effector transform calculation. The missing transform being prismatic, it does not contribute
\begin{equation}
J_{w} = \begin{bmatrix}
0 & 0 & -s_{1} \\
0 & 0 & c_{1} \\
1 & 0 & 0 \\
\end{bmatrix}
\end{equation}
\question
\begin{parts}
\part
The position of the origin can be determined using simple trigonometric equations:
\begin{equation}
\prescript{0}{}P_{org} = \begin{bmatrix}
L_{2}c_{2} \\
d_{1} + L_{2}s_{2} \\
\end{bmatrix}
\end{equation}
\part
Based on the previous equation, the linear velocity Jacobian is:
\begin{equation}
J_{V} = \begin{bmatrix}
0 & -L_{2}s_{1} \\
1 & L_{2}c_{2} \\
\end{bmatrix}
\end{equation}
\part
In case of singularity, $det(J_{V}) = 0$, meaning that $L_{2}s_{1} = 0$. In this case, $\theta_{2} = k\pi$. The end effector cannot move in the direction given by the $X$ axis.
\end{parts}
\question
\begin{parts}
\part
All of the $X$ axis are aligned. The $Z$ axis are directed to the top or out of the page. In this configuration, the D-H parameters are as follow:
\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 & $\theta_{1}$ & 0 \\
\hline
2 & $-90^{\circ}$ & 1 & $\theta_{2}$ & 0 \\
\hline
3 & $90^{\circ}$ & 1 & $\theta_{3}$ & 0 \\
\hline
4 & $-90^{\circ}$ & 1 & 0 & 0 \\
\hline
\end{tabular}
\end{centering}
\part
We use the formula of the handout 3, p.4 to calculate the intermediate transforms.
\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 & 1 \\
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}
c\theta_{3} & -s\theta_{3} & 0 & 1 \\
0 & 0 & -1 & 0 \\
s\theta_{3} & c\theta_{3} & 0 & 0 \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
\begin{equation}
\prescript{3}{4}T = \begin{bmatrix}
1 & 0 & 0 & 1 \\
0 & 0 & 1 & 0 \\
0 & -1 & 0 & 0 \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
The combination of the intermediate transforms gives:
\begin{equation}
\prescript{0}{2}T = \prescript{0}{1}T\prescript{1}{2}T = \begin{bmatrix}
c_{1}c_{2} & -c_{1}s_{2} & -s_{1} & c_{1} \\
s_{1}c_{2} & -s_{1}s_{2} & c_{1} & s_{1} \\
-s_{2} & -c_{2} & 0 & 0 \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
\begin{equation}
\prescript{0}{3}T = \prescript{0}{2}T\prescript{2}{3}T = \begin{bmatrix}
c_{1}c_{2}c_{3}-s_{1}s_{3} & -c_{1}c_{2}s_{3}-s_{1}c_{3} & c_{1}s_{2} & c_{1}c_{2}+c_{1} \\
s_{1}c_{2}c_{3}+c_{1}s_{3} & -s_{1}c_{2}s_{3}+c_{1}c_{3} & s_{1}s_{2} & s_{1}c_{2}+s_{1} \\
-s_{2}c_{3} & s_{2}s_{3} & c_{2} & -s_{2} \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
\begin{equation}
\prescript{0}{4}T = \prescript{0}{3}T\prescript{3}{4}T = \begin{bmatrix}
c_{1}c_{2}c_{3}-s_{1}s_{3} & -c_{1}s_{2} & -c_{1}c_{2}s_{3}-s_{1}c_{3} & c_{1}c_{2}c_{3}-s_{1}s_{3}+c_{1}c_{2}+c_{1} \\
s_{1}c_{2}c_{3}+c_{1}s_{3} & -s_{1}s_{2} & s_{1}c_{2}s_{3}+c_{1}c_{3} & s_{1}c_{2}c_{3}+c_{1}s_{3}+s_{1}c_{2}+s_{1} \\
-s_{2}c_{3} & -c_{2} & s_{2}s_{3} & -s_{2}c_{3}-s_{2} \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\end{equation}
\part
We will use the explicit form of the Jacobian:
\begin{equation}
\prescript{0}{}J = \begin{bmatrix}
\prescript{0}{}J_{v} \\
\prescript{0}{}J_{w} \\
\end{bmatrix}
\end{equation}
For $J_{v}$, we derivate the position of the end-effector and for $J_{w}$, we use the ${Z}$ axis of the intermediate frames:
\begin{equation}
\prescript{0}{}J = \begin{bmatrix}
-s_{1}c_{2}c_{3}-c_{1}s_{3}-s_{1}c_{2}-s_{1} & -c_{1}s_{2}c_{3}-c_{1}s_{2} & -c_{1}c_{2}s_{3}-s_{1}c_{3} \\
c_{1}c_{2}c_{3}-s_{1}s_{3}+c_{1}c_{2}+c_{1} & -s_{1}s_{2}c_{3}-s_{1}s_{2} & -s_{1}c_{2}s_{3}+c_{1}c_{3} \\
0 & -c_{2}c_{3}-c_{2} & s_{2}s_{3} \\
0 & -s_{1} & c_{1}s_{2} \\
0 & c_{1} & s_{1}s_{2} \\
1 & 0 & c_{2} \\
\end{bmatrix}
\end{equation}
\part
The frame $\{0\}$ and the frame $\{1\}$ have the same origin. The conversion between the Jacobians are done with the following equation:
\begin{equation}
\prescript{0}{}J_{v} = \prescript{1}{0}R\prescript{0}{}J_{v}
\end{equation}
The rotation matrix is the inverse of the transformation matrix between the joints (in a way similar to the similarity transform).
\begin{equation}
\prescript{1}{}J_{v} =
\begin{bmatrix}
c_{1} & s_{1} & 0 \\
-s_{1} & c_{1} & 0 \\
0 & 0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
-s_{1}c_{2}c_{3}-c_{1}s_{3}-s_{1}c_{2}-s_{1} & -c_{1}s_{2}c_{3}-c_{1}s_{2} & -c_{1}c_{2}s_{3} \\
c_{1}c_{2}c_{3}-s_{1}s_{3}+c_{1}c_{2}+c_{1} & -s_{1}s_{2}c_{3}-s_{1}s_{2} & -s_{1}c_{2}s_{3}+c_{1}c_{3} \\
0 & -c_{2}c_{3}-c_{2} & s_{2}s_{3} \\
\end{bmatrix}
\end{equation}
\begin{equation}
\prescript{1}{}J_{v} =
\begin{bmatrix}
s_{3} & -s_{2}c_{3}-s_{2} & c_{2}s_{3} \\
c_{2}c_{3}+c_{1}+1 & 0 & c_{3} \\
0 & -c_{2}c_{3}-c_{2} & s_{2}s_{3} \\
\end{bmatrix}
\end{equation}
The Jacobian in the frame $\{1\}$ is more simple to analyze.
\part
More simple, but not that simple though. The singularities are given by:
\begin{equation}
det(\prescript{1}{}J_{v}) = 0
\end{equation}
\begin{equation}
\begin{split}
det(\prescript{1}{}J_{v}) & = (c_{2}c_{3}+c_{2}+1)(c_{2}^{2}c_{3}s_{3}+c_{2}^2s_{3}) - s_{3}(c_{2}c_{3}^2+c_{2}c_{3}) + (c_{2}c_{3}+c_{2}+1)(s_{2}^2s_{3}c_{3}+s_{2}^2s_{3}) \\
& = (c_{2}c_{3}+c_{2}+1)(c_{2}^2s_{3}c_{3}+c_{2}^2s_{3}c_{3}+s_{2}^2s_{3}) - s_{3}(c_{2}c_{3})(1+c_{3}) \\
& = (c_{2}c_{3}+c_{2}+1)(s_{3}c_{3}+s_{3}) - s_{3}c_{2}c_{3}(1+c_{3}) \\
& = s_{3}(c_{2}c_{3}+c_{2}+1)(1+c_{3}) - s_{3}c_{2}c_{3}(1+c_{3}) \\
& = s_{3}(1+s_{3})(c_{2}c_{3}+c_{2}+1-c_{2}c_{3}) \\
& = s_{3}(1+c_{3})(1+c_{2}) \\
\end{split}
\end{equation}
So the singularities are for $\theta_{2}=\pm180^{\circ}$, for $\theta_{3}=0^{\circ}$ and for $\theta_{3}=\pm180^{\circ}$.
\part
Singularity 1: $\theta_{2}=\pm180^{\circ}$. In this case, the arm is folded, joint 1 and 3 are aligned. The end effector can basically rotate around the $Z_{0}$ axis, and cannot move in this direction.
Singularity 2: $\theta_{3}=0^{\circ}$. The arm is outstretched, and can no longer move in the direction of the $X_{3}$ axis.
Singularity 3: $\theta_{3}=\pm180^{\circ}$. In this case, the arm is outstretched and cannot move in the direction of the $X_{3}$ axis. The end effector coincides with the joint 2, and cannot move in the direction of the $Z_{1}$ axis either.
\end{parts}
\end{questions}
\end{document}