13.08.2018 Views

[Studies in Computational Intelligence 481] Artur Babiarz, Robert Bieda, Karol Jędrasiak, Aleksander Nawrat (auth.), Aleksander Nawrat, Zygmunt Kuś (eds.) - Vision Based Systemsfor UAV Applications (2013, Sprin

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A Distributed Control Group of Mobile Robots 169<br />

Hav<strong>in</strong>g such <strong>in</strong>fo and the orientation of the robot <strong>in</strong> angles 0° is right, 90° is up,<br />

180° is right and 270° is down), we can calculate distance to the edge <strong>in</strong> forward<br />

and backward orientations us<strong>in</strong>g trigonometric formulas, that differ a little <strong>in</strong> four<br />

orientation quadrants: 0° 90°, 90° 180°, 180° 270°, 270° 360°; but use<br />

the same considerations, thus i present only one quadrant of 0° 90°.<br />

Fig. 14. M<strong>in</strong>imal distances from the edges<br />

It is most easy to <strong>in</strong>terpret it graphically <strong>in</strong> the 0° 90°quadrant shown at Figure<br />

15. We have two cases. The ray shot forward at angle of robot orientation can<br />

either <strong>in</strong>tersect with the top edge at Figure 15(a), or side edge at Figure 15(b). We<br />

do not have knowledge about this fact, but when we use the trigonometric functions<br />

we do not have to know.<br />

(a) Top edge <strong>in</strong>tersection<br />

(b) Side edge <strong>in</strong>tersection<br />

Fig. 15. Forward and backward distance calculation<br />

<br />

<br />

<br />

s<strong>in</strong> , cos (14)<br />

<br />

<br />

s<strong>in</strong> , cos (15)<br />

<br />

This is because when we take the m<strong>in</strong>imum of <br />

or<br />

<br />

, we always choose<br />

<br />

<br />

the result of cos<strong>in</strong>e as <br />

<br />

<br />

<strong>in</strong> case 15(b) and the result of s<strong>in</strong>e <strong>in</strong> case<br />

<br />

15(a) otherwise, which are the correct values of distance to the edge <strong>in</strong> forward

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

Saved successfully!

Ooh no, something went wrong!