14.11.2012 Views

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 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

128 Appendix B. Documentation <strong>of</strong> <strong>the</strong> programming<br />

function [vt , om, vn] = TriskarOdometry(R robot , R wheel , alpha , v F ,<br />

v L , omega, plot)<br />

% − R robot : robot radius (by mean <strong>of</strong> distance <strong>of</strong> <strong>the</strong> wheels from <strong>the</strong><br />

% center <strong>of</strong> <strong>the</strong> robot) [mm]<br />

% 25 cm in our case −− 250 mm<br />

% − R wheel: wheel radius [mm]<br />

% 24.6000 mm yaricap<br />

% − alpha : angle <strong>of</strong> <strong>the</strong> front wheels [ rads ] (in our case alpha = pi/6)<br />

% − vF: frontal speed setpoint [mm/s] −−−x axis<br />

% − vL: lateral speed setpoint [mm/s] , > 0 if oriented to right −y axis<br />

% − omega: angular velocity setpoint [rad/s] > 0 if CCW<br />

% − plot : draw a plot with all vectors (1 = plot , 0 = don’ t plot )<br />

%<br />

% this function returns :<br />

% − vt : vector <strong>of</strong> tangential wheel velocities [mm/s]<br />

% − vn: vector <strong>of</strong> ”sliding” velocity <strong>of</strong> <strong>the</strong> wheels due to rollers [mm/s] ,<br />

% > 0 if directed from <strong>the</strong> center to <strong>the</strong> extern<br />

% − omega w: angular velocity <strong>of</strong> <strong>the</strong> wheels [mm/s] , > 0 if CW looking at<br />

% <strong>the</strong> wheel from <strong>the</strong> center <strong>of</strong> <strong>the</strong> robot<br />

%<br />

% You can call that function like :<br />

% [ vt ,omega w,vn] = TriskarOdometry (250, 24.6 , pi/6,1000,1000,0,1)<br />

cosA = cos(alpha );<br />

sinA = sin(alpha );<br />

v = [v F , v L , omega∗R robot ] ’<br />

MF = [−cosA sinA −1;<br />

cosA sinA −1;<br />

0 −1 −1]<br />

ML = [ sinA cosA 0;<br />

sinA −cosA 0;<br />

−1 0 0];<br />

vt = MF∗v;<br />

om = vt/R wheel ;<br />

vn = ML∗v;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!