Submitted version of the thesis - Airlab, the Artificial Intelligence ...
Submitted version of the thesis - Airlab, the Artificial Intelligence ...
Submitted version of the thesis - Airlab, the Artificial Intelligence ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
B.4. Motion Simulator 131<br />
fill (m arr1(1 ,:) , m arr1 (2 ,:) , ’g ’ );<br />
text(v txt1 (1) , v txt1 (2) , ’v {t1} ’ );<br />
end<br />
if (vn(1) ˜= 0)<br />
line ([ R robot∗cosA , R robot∗cosA+vn(1)∗s1∗cosA ] ,[ R robot∗sinA , R robo<br />
sinA+vn(1)∗s1∗sinA] , ’Color ’ ,[0 1 0])<br />
<strong>of</strong>fset1 = [ R robot∗cosA+vn(1)∗s1∗cosA; R robot∗sinA+vn(1)∗s1∗sinA ];<br />
if (vn(1)∗s1∗cosA < 0)<br />
M = m rot(pi/2+alpha );<br />
else<br />
M = m rot(−pi/2 + alpha );<br />
end<br />
m arr1 = M∗m arr + [ <strong>of</strong>fset1 <strong>of</strong>fset1 <strong>of</strong>fset1 ];<br />
v txt1 = M∗v txt + <strong>of</strong>fset1 ;<br />
fill (m arr1(1 ,:) , m arr1 (2 ,:) , ’g ’ );<br />
text(v txt1 (1) , v txt1 (2) , ’v {n1} ’ );<br />
end<br />
% ruota 2<br />
if (vt(2) ˜= 0)<br />
line([−R robot∗cosA , −R robot∗cosA+vt(2)∗s1∗sinA ] ,[ R robot∗sinA , R ro<br />
∗sinA+vt(2)∗s1∗cosA] , ’Color ’ ,[0 1 0]);<br />
<strong>of</strong>fset1 = [−R robot∗cosA+vt(2)∗s1∗sinA; R robot∗sinA+vt(2)∗ s1∗cosA ];<br />
if (vt(2)∗s1∗sinA < 0)<br />
M = m rot(−pi−alpha );<br />
else<br />
M = m rot(−alpha );<br />
end<br />
m arr1 = M∗m arr + [ <strong>of</strong>fset1 <strong>of</strong>fset1 <strong>of</strong>fset1 ];<br />
v txt1 = M∗v txt + <strong>of</strong>fset1 ;<br />
fill (m arr1(1 ,:) , m arr1 (2 ,:) , ’g ’ );<br />
text(v txt1 (1) , v txt1 (2) , ’v {t2} ’ );<br />
end<br />
if (vn(2) ˜= 0)<br />
line([−R robot∗cosA , −R robot∗cosA−vn(2)∗s1∗cosA ] ,[ R robot∗sinA , R ro<br />
∗sinA+vn(2)∗s1∗sinA] , ’Color ’ ,[0 1 0])