Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 UDK - UDC 681.586:007.52 Izvirni znanstveni članek - Original scientific paper (1.01) Položajno zaznavalo za premični robot Position Sensor for a Mobile Robot Rajko Mahkovic (Fakulteta za računalništvo in informatiko, Ljubljana) V prispevku predstavljamo izvirno položajno zaznavalo za premični robot. Zaznavalo je namenjeno natančnemu merjenju položaja premičnega robota. Sestavljajo ga merilno kolesce, absolutni kodirnik za merjenje robotove smeri gibanja in relativni kodirnik za merjenje dolžine opravljene poti. Podajamo matematično izpeljavo razmerja med spreminjanjem smeri merilnega kolesca, njegove prevožene razdalje in spremembo robotovega položaja v kartezičnem koordinatnem sistemu. Obravnava je razdeljena na dve stanji: ko je merilno kolesce usklajeno s smerjo premikanja robota in ko ni usklajeno. Predstavljeni so eksperimentalni rezultati na dveh vrstah poti premičnega robota: vožnji v obliki osmice in vožnji po dolgem in ozkem hodniku. Rezultati kažejo, da je predlagano položajno zaznavalo tako natančno, kakor klasična rešitev z dvema merilnima kolescema, nameščenima na vsako stran od pogonskega kolesa. Položajna napaka zaznavala na omenjenih poteh, dolgih 20 m, v obliki osmice, in 120 m v primeru hodnika, znaša manj ko 0,4 odstotka prevožene poti. Položajnemu zaznavalu moramo določiti vrednosti štirih parametrov: obseg merilnega kolesca, ničelni kot zasuka, odmaknjenost merilnega kolesca in oddaljenost mesta namestitve zaznavala od referenčne točke premičnega robota. © 2007 Strojniški vestnik. Vse pravice pridržane. (Ključne besede: mobilni robot, položajna zaznavala, merilni sistemi, odometrija) A new position sensor is presented, designed for accurate measurements of the relative position of a mobile robot. It consists of a measurement wheel, an absolute optical encoder for measurements of the robot's orientation and a relative encoder for measurements of the distance covered by the robot. A mathematical description of the relation between the measurement wheel's orientation alteration, the distance that has been covered and the change of the robots' position in the Cartesian coordinate system is given. The discussion is divided into two situations: the first, in which the measurement wheel is aligned with the current robot's path, and the second, in which it is not. In the experiments the robot was sent to drive along a figure-of-eight-shaped path and along a long and narrow corridor. The results prove that the proposed sensor is as accurate as the classical solution of two additional measurement wheels, mounted on each side of the driving wheels. The error in the position remains below 0.4% of the travelled path for both types of paths. The position sensor needs to be calibrated with the values of four parameters: the circumference of the measurement wheel, the initial offset (the angle of the absolute encoder corresponding to the zero orientation of the robot), the eccentricity of the measurement wheel, and the distance between the sensor and the reference point of the robot. © 2007 Journal of Mechanical Engineering. All rights reserved. (Keywords: mobile robots, position sensors, measurement systems, odometry) 0 UVOD 0 INTRODUCTION OdometriČne merilne metode, merilne metode, ki temeljijo na merjenju prevožene poti, so, kakor kaže, še vedno dovolj natančno in ceneno sredstvo za določanje trenutnega položaja premičnega robota. Vrsta metod [1], ki določajo absolutno lego robota, sicer zagotavlja poznavanje njegove lege, vendar le Odometric measurement methods, i.e., methods based on the covered-path measurement, still seem to be a reasonably accurate and cheap means of supplying a mobile robot with its position. There are many methods [1] for determining a mobile robot’s absolute position; however, only at specific 285 Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 na posebnih mestih delovnega prostora. Navadno moramo za to poseči v delovni prostor robota, z nameščanjem, recimo, nalepk, dejavnih oddajnikov ali pa se zanesti na razpoznavanje njegovih krajevnih značilnosti (stene, vrata, predmeti itn.) Zelo primerne so, na primer, Voronoijeve točke posplošenega istoimenovanega diagrama delovnega prostora [6]: ne samo, da dajejo rekalibracijo robotove lege, osvežimo lahko tudi njegovo usmeritev. Ob tem, da je gibanje v delovnem prostoru načeloma najbolj varno, saj je Voronoijev diagram krčenje praznega prostora, zato je robot pri premikanju vzdolž Voronoijevega diagrama najbolj oddaljen od ovir, kot je to le mogoče. Pri delu z notranjimi premičnimi roboti imamo običajno na voljo njihovo absolutno lego le v posameznih točkah prostora, za premik od ene absolutne lege do druge pa se odločimo za neko relativno merilno metodo. Odometrija se v ta namen izkaže kot primerna izbira, njena najbolj natančna izvedba, uporaba dodatnih merilnih kolesc, pa kot poceni in učinkovita relativna merilna metoda ([4] in [5]). Taka merilna kolesca se običajno namesti na levo in desno stran pogonskih koles premičnega robota. Ker se je pokazalo, da je namestitev takih merilnih kolesc tako konstrukcijsko, kakor gibalno (premični robot se ne more premikati vzvratno) precej omejujoče, smo želeli poiskati tako konstrukcijo merilnega kolesca, ki za robota ne bi bila tako omejujoča, ne bi bila tako odvisna od razlik v izdelavi merilnih kolesc, a bi še vedno ohranila vse prednosti odometrije. Razlika v, na primer, obsegu merilnih kolesc se tako na koncu izraža kot zasuk v usmeritvi robota; ta poleg tega lahko nastane dodatno tudi zaradi daljše prevožene poti enega od kolesc, ker se pač kolesca kotalita po različno ravnih podlagah. 1 POLOŽAJNO ZAZNAVALO Položajno zaznavalo na sliki 1 sestavljata relativni optični enkoder za merjenje prevožene poti, zapis premika, in absolutni optični kodirnik za merjenje trenutne robotove usmeritve, kodirnik smeri. Zasnova kodirnika poti ni običajna: namesto osvetlitve skozi masko, ki pri kolesu pač ni izvedljiva, smo uporabili odboj od maske, nalepljene na merilno kolesce. Maska, izjedkana iz plošče za izdelavo električnih tiskanih vezij, ima tri sledi: zunanji dve s po 180 zarezami na zasuk sta fazno premaknjeni za 90° (tak fazni premik mask je pri kodirnikih običajen način za podvojitev ločljivosti). positions of the working space. Nevertheless, some kind of intervention in the working space is necessary for them to be applied, e.g., the placement of labels, active transmitters, or recognition of the local features of the working space (walls, doors, various objects, etc.). For example, Voronoi points of the generalized Voronoi diagram could serve for this purpose [6]: not only the robot’s position, but also its orientation could be recalibrated. In addition to this, the motion of the robot is safer, since the Voronoi diagram is a retraction of the free space, which guarantees that the robot is as far from obstacles as possible. An indoor mobile robot is supplied, as already mentioned, with its absolute position only at specific places of the working space; to move among these places it needs to rely on a kind of relative measurement method. Odometry has proved to be a quite effective choice, especially in its most accurate implementation, with the use of additional measurement wheels ([4] and [5]). Such measurement wheels are normally placed to the right- and left-hand sides of the robot’s driving wheels. Unfortunately, such wheels turn out to be awkward to mount, and they restrict the movements of the robot. Therefore, it was our intention to find such a construction of an additional measurement wheel that would not depend so strongly on the differences between both wheels (which actually introduce positional errors), yet it would still preserve all the advantages of odometry. The difference, for instance, in wheels’ circumferences manifests itself as an additional turn in the orientation of the robot; the same effect could be produced by the difference in the lengths of the paths the measurement wheels travel along, caused by an uneven floor. 1 POSITION SENSOR The position sensor in Figure 1 consists of a relative optical encoder, designed to measure the traversed path, a distance encoder, and an absolute optical encoder, applied to measure the robot’s changes in orientation, a steering encoder. The design of the distance encoder is not the common one: instead of lighting through the glassy mask, which is not applicable on the wheel, the reflection from the mask, glued directly on the wheel, is used. The mask, etched from an electronic circuit board, has three tracks: the outer two, with 180 lines around the circumference, are shifted in phase by 90° (this phase 286 Mahkovic R. Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 Sl. 1. Zaznavalo sestavljata kodirnik smeri in kodirnik premika Fig. 1. The sensor consists of a steering encoder and a distance encoder Tretja sled ima vsega eno označbo, ki je uporabljena za izhodišče merjenja po krogu, primerjalni sunek. Merilno kolesce se, kakršen koli že je njegov začetni zasuk, med vožnjo postopno poravna s smerjo vožnje; glede na os kodirnika smeri je namreč nameščeno izsredno. Med vožnjo se torej iz prevožene razdalje in trenutne smeri izračunava premik robota v kartezičnem koordinatnem sistemu. Matematični opis merilnega sistema podajamo v nadaljevanju. Izkaže se, da moramo obravnavo pravzaprav razdeliti na dva primera: prvič, da je merilno kolesce v smeri vožnje poravnano, in drugič, da merilno kolesce v smeri vožnje robota še ni poravnano. V nadaljevanju bomo obravnavali najprej zahtevnejši drugi primer, pri katerem torej merilno kolesce ni poravnano s smerjo vožnje; predvidevamo, da nam bo obravnava tega primera ponudila zadosten vpogled tudi za obravnavo primera, pri katerem je merilno kolesce poravnano. 2 NEPORAVNANO MERILNO KOLESCE (NMK) Predpostavimo, da se robot giblje vzdolž krožnega dela poti. Referenčno točko robota bomo označili s T , središčno točko kodirnika smeri z B . 1x xJ dotikališče merilnega kolesca s tlemi A ; pri čemer shift is commonly applied in optical encoders to double the resolution); the third track has only one line, used to mark the position of each full turn of the wheel, the reference pulse. The measurement wheel, whatever its initial orientation, aligns gradually with the direction of the path; because it is mounted eccentrically in terms of the axis of the orientation encoder. During the movements, the traversed distance and the current orientation determine the change of the position in the Cartesian coordinate system. A mathematical description of the measuring system is given below. It turns out that the discussion should be divided into two situations: the first, in which the measurement wheel is aligned with the orientation with the robot, and the second, in which it is not. The following discussion will first focus on the second, more demanding situation, in which the measurement wheel is not aligned with the orientation of the robot; we believe this case will also give us sufficient insight into the former. 2 NON-ALIGNED MEASUREMENT WHEEL (NMW) Let us suppose the mobile robot moves along a circular arc. We denote the reference point of the robot by T1x, the centre of the steering encoder by Bx, the contact point of the measurement wheel with the Položajno zaznavalo za premični robot - Position Sensor for a Mobile Robot 287 Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 Sl. 2. Geometrijska oblika premika za NMK Fig. 2. Geometrical illustration of NMW-type movements x označuje indeks položaja pred premikom robota (1) in po premiku (2). Dolžini \AXBX\ in \A2B2\ pomenita premik c, označen na sliki 1, a pa razdaljo med referenčno točko robota in osjo kodirnika smeri (dolžini \TnBx\ in \TUB2\ ). Ko se, na primer, referenčna točka robota premakne po krožnem loku z ukrivljenostjo K iz T11 vT12, se središče enkoderja smeri premakne po krožnem loku z ukrivljenostjo Kb iz B1 v B2, dotikališče merilnega kolesca pa iz A1 v A2 Pri tem referenčna točka robota opravi premik po krožnem loku A/, smer oziroma usmeritev robota pa se spremeni za A0. Če bi bilo nadalje, merilno kolesce že poravnano glede na smer vožnje, bi A1 in A2 ležali na krožnem loku s polmerom K1 Predpostavimo, da je premik dovolj majhen, da lahko vzamemo, da ^2 leži kar na daljici ÄJ}1. Premik A/1 je pri tem razdalja, izmerjena z kodirnikom poti. (Vidimo, da sta Mb in M krožna loka, medtem ko je A/1 daljica.) Točko E določimo tako, da dobimo enakokraki trikotnik AA2B2E. floor by Ax, where x denotes the index of the position before the movement (1) and after the movement (2). The straight lines |A1B1| and |A2B2| are the eccentricity c from Figure 1, whereas a is the distance between the robot’s reference point and the centre of the steering encoder (straight lines |T11B1| and |T12B2| ). As, for example, the robot’s reference point moves along a circular arc with the curvature K from T11 to T12, the centre of the steering encoder moves along the circular arc with the curvature Kb from B1 to B2, whereas the contact point of the measurement wheel moves from A1 to A2. During this movement, the robot’s reference point moves along the arc Dl, while the change in the orientation of the robot amounts to DQ. Furthermore, if the measurement wheel was aligned with the path of the movement, the points A1 and A2 would lie on the circular arc with curvature K1. Let us presume that the movement is small enough to assume that A2 lies on the straight line A1B1 . The length Dl1 is the distance measured by the distance encoder. (Note that Dlb and Dl are circular arcs, whereas Dl1is a straight line.) Point E is determined in such a way that an isosceles triangle, DA2B2E, is formed. 2.1 Izračun spremembe robotove usmeritve 2.1 Calculation of the change in the robot’s orientation Iz enakih pravokotnih trikotnikov AS’ 71151 in AS’ T12B2 lahko izračunamo kot r. We calculate the angle r from the observation of two rectangular triangles DS’T11B1 and AS’r1252: r = arccos(a/r6) (1). 288 Mahkovic R. Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 Kota a in a izračunamo iz enakokrakih Next, angles «and a are calculated from the trikotnikov AS’B1B2 in AA2B2E: isosceles triangles AS’B^ and AA2B2E: a = (tf-A0)/2 a -(ti-y)/2 S tem pa že lahko izračunamo vse tri kote v And now, all three angles in the triangle trikotniku AA2B2B1 : A^A can be determined: E = n/2-A®/2-p-ß2 rt = Ti/2-A®/2 + p + ß1 y = A® + Aß kjer je zly?razlika med končnim kotom ß2 in začetnim where Aß denotes the difference between the an-kotom ß1. Po določitvi še vseh treh stranic trikotnika gles after, ß2, and before, ß1, the movement. After the AA2B2B1, lahko na njem uporabimo sinusni izrek: sides of the triangle AA2B2B1 are established, the sine theorem can be applied to it: 2rtsin(A0/2)___________c___________________c-Al1 sin(A0 + A^) ~ sin(Tr/2-A®/2 + p + ß1)~ sin(Tr/2-A®/2-p-ß2) (2). Iz razmerja prvih dveh ulomkov že lahko By limiting the changes Aß and A® towards dobimo diferencialno enačbo, tako da pošljemo zero, the relation of the first two fractions supplies spremembi Aß in A0 proti nič. Zavedati pa se us with the differential equation. However, we have moramo, da če hkrati pošljemo Aß in A® proti nič, to keep in mind that sending both differences to bodo vse izpeljane enačbe veljale le v primeru, če je zero simultaneously implies that all the derived equa- kodirnik smeri neporavnan v smeri vožnje. Dobimo tions will hold only to the NMW situation. The fol- naslednjo diferencialno enačbo: lowing equation is obtained: rbd® c d® + dß cos(/? + p) orb cos(ß+ p)d® = cd® + cd ß (3), iz katere izrazimo d®: from which d® can be determined: ar\ c n d& = rbcos(ß + p)-c dß (4). Po integraciji leve strani enačbe od 0 do A0 After the integration of the left-hand side in desne strani od ß1 do ß2 ter zapisu ukrivljenosti from 0 to A0 and the right-hand side from ß1 to ß2, namesto obratne vrednosti polmera krožnega loka and the use of the curvature Kb = 1/rb is introduced, Kb = 1/rb, dobimo enačbo spremembe usmeritve the equation that gives the change of the robot’s robota orientation can be written as: A0 = , b ln +(n) -(H1) (5), kjer sta 1~cKb *-(A)$+(#) where in 0_ (#) = (1 + cKb) tan {^] - 1^K, 2 and ^+(ßi) = (1 + cKb)tan^] + ^Kl 2.2 Izračun prevožene poti merilnega kolesca 2.2 Calculation of the length measured by the meas- urement wheel Prevožena pot merilnega kolesca Al1 je sicer The length measured by the measurement wheel A/1 podatek, ki ga preberemo iz kodirnika premika, toda is data read directly from the distance encoder; how- Položajno zaznavalo za premični robot - Position Sensor for a Mobile Robot 289 Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 potrebujemo njegovo povezavo s preostalimi spremenljivkami v merilnem sistemu. Postopek izračuna je podoben zgornjemu izračunu spremembe robotove usmeritve, le da tokrat uporabimo trikotnik ABfiß. Najprej izračunamo vse trikotnikove notranje kote: ever, it should be related to the other system variables. The procedure we will use is somewhat similar to the one above, except that triangle ABfi2E is observed this time. All three angles are determined first: ^ \ \6 \ \ V y y' / ^^--"r -^v1 \ W)\ S"1 X' S x X Sl. 3. Geometrijska oblika premika za PMK Fig. 3. Geometrical illustration of the AMW-type movements Pri izpeljavi enačb si pomagamo s podobnimi trikotniki: The appropriate equations are derived from similar triangles: AS'Tfi * ABAG * AS'AE * ABT1E Izraza za ukrivljenost krožnic K in K1 izpeljemo, ker sta kota ZS'Tfi in ABAG prava, iz osnovnih trigonometričnih funkcij: K Since the angles ZS%G and ABAG are rectangles, the expressions for the curvatures K and K1 can be obtained using trigonometric functions: sin(j9) K a cos(/?) - c Jfcos(g) 1 + Jfcsin(/) Nadalje torej lahko izračunamo spremembo The expressions for the change of the orien- smeri A0 in spremembo premika Al, saj velja tation A0and the distance A/ can then be written: A0 A/ Al1 Al1K1 Al1Kcos(ß) 1 + Kcsin(ß) Al_A@_M1K1_ A/1cos(g) K K 1 +Kc sin(ß) (7) (8). 4 IZVEDBA SKUPNEGA MERILNEGA SISTEMA (NMK IN PMK) 4 REALIZATION OF THE ENTIRE MEASUREMENT SYSTEM (NMW AND AMW) Enačba (6) podaja razmerje med ukrivljenostjo Kb, začetnim kotom ß1, končnim kotom ß2 in razdaljo, ki jo prevozi merilno kolesce A/1. Vrednosti ß1, ß2 in Al1 so znane, izračunati pa je treba Kb, najbolje kar skupaj z odmaknjenostjo, ker se pač pojavljata skupaj. Enačbo (6) delimo s c in damo obe strani v eksponent. Upoštevamo še kosinus vsote kotov in vpeljemo novo spremenljivko F: cos(/?1 +arccos(— cKb)) - —cKb cc Eq. (6) determines the relationship among Kb, the starting angle L, the final angle Ä and the length of the straight line Al1, covered by the measurement wheel. The values ß1, ß2 and Al1 are known, whereas Kb should be calculated, conveniently together with the eccentricity, since they appear together. We divide Eq. (6) by c and put both sides in the exponent. After the cosine of the sum of the angles is taken into account, we introduce a new variable, F: cos(ß1) - sin(/?1) sin(arccos(— cKb)) c Položajno zaznavalo za premični robot - Position Sensor for a Mobile Robot 291 Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 F cK cK sin(arccos(^)) 1-Rl,)2 Dobimo enačbo: The following equation is obtained: c__________F_____ iz katere izrazimo F: Sedaj lahko iz (10) izračunamo cK : cF from which F can be expressed: Lsin(/?2)-sin(/?1) L(-cos(j02)-1)--cos(A) + 1 cKb = + (Ta enačba ima dve rešitvi, +cKh in -cKh. Prav tako dobimo dve rešitvi tudi iz enačbe za p (1), skupaj imamo torej štiri kombinacije vrednosti p and cKy) 4.1 Postopek merjenja cKb follows from Eq. (10): F 1+(!F) 2 (9). (10). (11). (Since this equation has two solutions, +cKb and –cKb, and two more are obtained from the equation for r E q . (1), we are left with four combinations of r and cKb.) 4.1 Measurement procedure 1. Iz kodirnika smeri preberemo trenutno vrednost kota L, iz kodirnika premika pa premik A/1. 2. Če je trenutni kot zasuka merilnega kolesca ß2 enak zasuku iz prejšnje meritve ß1, je merilno kolesce poravnano v smeri vožnje, primer PMK, zato izračunamo A0 in A/ iz (7) in (8). Sicer nadaljujemo s točko 3. 3. Izračunamo vrednost cKh ((10) in (11)). 4. Določimo kot = arccosVdn. 5. Preverimo kateri par {(+p,+cKb),(+p,- cK), (–p,+ cKb),(–p,- cK)} ustreza (6). 6. Pravi par vstavimo v enačbo (5) in izračunamo spremembo kota A0. 7. Iz spremembe kota A0 določimo premik Al: . Če je sprememba kota A0 enaka nič, premični robot vozi naravnost, merilno kolesce pa se poravnava v smer vožnje: medtem ko se referenčna točka robota premakne za, recimo, l, se odmaknjenost merilnega kolesca zmanj ša z ß1 na ß2 Premik l je podan z enačbo: ,_ ftan(A/2) [tan(&/2) (natančna obravnava poravnavanja kolesca je podana v [3]). • Sicer iz spremembe A0 in ukrivljenosti Kb izračunamo premik referenčne točke robota A/ (glej trikotnika AS’ 71^ in AS’ 7^ na sliki 2): 1. Read current values: the value of angle ß2 from the steering encoder, and the length A/1 from the distance encoder. 2. If the current angle ß2 is equal to the angle ß1, from the previous measurement, the AMW case applies; A0 and A/ are calculated from Eq. (7) and Eq. (8). Otherwise we proceed with point 3. 3. Calculate^ (Eq. (10) and Eq. (11)). 4. Determine p= arccos(a/c cK). 5. Check which pair among {(+P,+cKb),(+p,- cKb), (–A+ cKb),(–p,- cKb)} correspond to Eq. (6). 6. Put the corresponding pair into Eq. (5) and calculate the change of orientation A0. 7. From A0 calculate Al: • If the change of the orientation A0 is zero, the mobile robot drives along a straight line, while the measurement wheel is still aligning with the direction of the drive: if the reference point moves by, for example, /, the nonalignment of the measurement wheel is decreased from ß1 to ß The move / is defined by the equation: (the complete explanation is given in [3]). Otherwise, calculate the movement of the robot’s reference point A/, using A0 and the curvature Kb (observe the triangles AS’T11B1 andAST1252 in Fig.2): c 292 Mahkovic R. Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 Al = A0, 8. Iz spremembe kota A0 in premika Al izračunamo z uporabo dobro znanih razmerij spremembo položaja premičnega robota v kartezičnem koordinatnem sistemu. 5 DOLOČITEV PARAMETROV POLOŽAJNEGA SISTEMA Opisano položajno zaznavalo zahteva določitev vrednosti štirih parametrov: odmaknjenost c, ničelni kot ß0 (kot, ki ga kaže kodirnik smeri pri vožnji naravnost), obseg merilnega kolesca o1 oddaljenost položajnega zaznavala od referenčne točke robota a. Na začetku moramo te parametre seveda določiti ročno, toda tako dobljene vrednosti so le grobe ocene; natančnejše vrednosti določimo tako, da robot vozi po poteh, pri katerih se vpliv posameznih parametrov čim bolj osami. Pri vožnji naravnost, na primer, parameter a ne vpliva kaj dosti, vsak od preostalih treh pa vpliva drugače. Za določitev vrednosti parametrov smo zato izbrali prav vožnjo naravnost. Ob njej smo spremljali potek robotove lege in graf usmeritve robota 0. Grafi izmerjenih leg robota in njegove usmeritve so potrdili, da odmaknjenost c vpliva samo na začetku, ko merilno kolesce še ni poravnano, da ničelni kot ßn določa nagib spreminjanja kota 0 (ki bi pri vožnji naravnost sicer moral ostati stalen) ter da obseg kolesca o1 ne vpliva bistveno na spreminjanje 0, občutno pa vpliva na dolžino poti. Podrobnejše rezultate parametrične analize si lahko ogledamo v [3], kjer je tudi razloženo, zakaj mora biti vrstni red določanja parametrov naslednji: c, ß0 in o1 Parameter a določimo z vožnjo po krogih. Ker je položajno zaznavalo zasnovano na relativnem merjenju, se njegova napaka neprestano povečuje, zato je zelo pomembna ocena njegovih parametrov. V našem primeru so končne vrednosti parametrov bile: ß0 = 196,708°, c = 0,04014 m, o1 = 0,2985 m in a = 0,5678 m. Vse so bile seveda pridobljene programsko, na temelju testnih voženj robota. 8. The change of the robot’s position in the Cartesian coordinate system is calculated from A0 and Al using the well-known relations. 5 DETERMINATION OF THE PARAMETERS OF THE SENSOR The position sensor requires the determination of four parameters: the eccentricity c, the zero angle ß0 (the angle, the steering encoder reports when the robot is moving straight ahead), the circumference of the measurement wheel o1, and the distance from the position sensor to the reference point of the robot a. At the beginning these parameters have to be determined manually, yet these are only coarse approximations of the real values; the finer values are obtained by letting the robot move along the kind of paths on which the impact of the individual parameter is isolated as much as possible. If the robot moves along the straight line, for example, parameter a does not have much influence, while each of the remaining affect the movement in their own way. That is why we chose exactly this type of movement to determine the parameters values. The robot’s position and the graph of its orientation were observed carefully along the path. The graphs of these positions and orientations proved that the eccentricity c has an impact at the beginning only, when the measurement wheel is still not aligned, that zero angle L determines the inclination of the 0 graph, which should stay constant, when moving straight ahead- constant, and that circumference of the wheel o1 does not have an observable impact on the graph 0, but it does have a substantial influence on the length of the paths. Detailed results of the parametric analysis can be found in [3], where the explanation as to why the order of the parameter determination should be c, ß0 and o1, is given. The parameter a is determined by the circular paths. Since the presented sensor is based on relative measurements, its error grows without bounds, so a correct estimation of the parametric values is crucial. The final values in our case were: ß0 = 196.708°, c = 0.04014 m, o1 = 0.2985 m and a = 0.5678 m. All of them were, of course, obtained from the dedicated software that analyzed the paths of the robot Položajno zaznavalo za premični robot - Position Sensor for a Mobile Robot 293 Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 6 REZULTATI 6 RESULTS Položajno zaznavalo smo preizkusili na The position sensor was tested on our own lastnem premičnem robotu (si. 4). Premični robot je mobile robot, Fig.4. The robot was equipped with bil opremljen z dvema merilnima sistemoma. Ob two measuring systems. To the left and to the right pogonskih kolesih zadaj je imel pritrjen par pomožnih of the driving wheels there was a pair of additional merilnih kolesc, ki zagotavljajo tudi za več ko red measurement wheels, which guarantee an order more velikosti [4] natančnejšo lego, kot jo dobimo na accurate position than the one calculated from the podlagi kodirnikov, pritrjenih na samih pogonskih readings of the encoders mounted directly on the kolesih, spredaj pa v prispevku predstavljeni driving wheel shaft; in the front, the presented posi- pozicijski merilnik (si. 4a). Podlaga so bila gladka tla tion sensor can be observed, Fig.4a. The floor was iz linoleja (si. 4b). smooth, made of linoleum, Fig.4b. Položajno zaznavalo smo preizkušali na dveh The position sensor was tested on two types vrstah poti: na prvi (si. 5a), smo robota programirali, of paths: on the first (Fig.5a), the robot was pro-da je vozil “osmico”, torej štiri leve in štiri desne grammed to make 8 turns, i.e., four left and four right zavoje; na drugi (si. 5b), smo preverili vožnjo turns; on the second (Fig. 5b), the robot moves along naravnost, po dolgem in ozkem hodniku. a long and narrow corridor. a) b) SI. 4. V preizkusih uporabljeni premični robot: a) zadaj, ob pogonskih kolesih, klasični par dodatnih merilnih kolesc; spredaj, v prispevku predstavljeno zaznavalo; b) vožnja v laboratoriju Fig. 4. The mobile robot from the experiments: a) at the back, on each side of the driving wheels, a pair of classical measurement wheels, at the front, the proposed sensor, b) the drive in the laboratory a) b) Sl. 5. Dve vrsti poti: a) osmica, b) dolg in ozek hodnik Fig. 5. Two types of paths: a) a figure-of-eight path, b) a long and narrow corridor 294 Mahkovic R. Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 6.1 Prva vrsta poti: osmica 6.1 The first type: figure-of-eight path V tem primeru naj bi se robot, potem ko je na približno trimetrskem kvadratu opravil osem zavojev za 90°, vrnil v izhodiščno točko. Namen tega testa je bil preverjanje položajnega merilnika ob zavijanju. Dolžina poti je bila približno 20 m, robotovo napako po desetih preizkusih pa vidimo na sliki 6a. Napaka je nekoliko večja v vzdolžni smeri (Y), kot v prečni smeri (X), vendar še vedno precej majhna (<0,4%), tudi za skupino robotov s pomožnimi merilnimi kolesi [2]. The robot was supposed to come back to the starting point, after accomplishing eight 90° turns on a square of 3m x 3m. The purpose of the test was to examine the behaviour of the sensor when a lot of turning is involved. The length of the path was approximately 20m; the positional error after ten trials can be seen in Fig.6. The error is somewhat bigger in the longitudinal (Y) than in the lateral (X) direction, but it is still reasonably small (<0.4%), even for the group of robots with additional measurement wheels [2]. 6.2 Druga vrsta poti: hodnik 6.2 The second type: corridor Glavni problem dolgih in ozkih poti, kakršen je hodnik pred laboratorijem (si. 5b), je natančnost ničelnega kota ß0 kodirnika smeri, ki na usmeritev robota vpliva najbolj. Nenatančen povzroči vrtenje izračunanih poti, zato se pri tako dolgih poteh robot kaj lahko znajde v bližnjih stenah. Naše ocene za ß0 so se tako z že omenjenih 196,708° znižale na 196,617°, dokler se robotu pri 196,608° končno ni uspelo vrniti skozi vrata laboratorija na izhodiščni položaj; po prevoženih približno 120 m. Relativna napaka je tudi v tem primeru ostala <0,4% (si. 6hK_____________________________ Ay[cm] Ax[cm] a) The main problem with long and narrow working places, like the corridor in front of the lab, Fig. 5b, is the accuracy of the zero angle ß0 of the steering encoder, which has the strongest impact among all the parameters. An inaccurate ß0 results in the rotation of the paths, and the robot can quickly find itself hitting the walls. Our starting estimations for the ß0 values were reduced from the value already mentioned 196.708°, to 196.617°, until the robot finally at 196.608° managed to re-enter through the lab door to the approximate starting position; after a 120-m-long journey The relative error also remained <0.4% in this case (Fig. 6b). Št. preizkusa Exp. no. Dx [m] Dy [m] 1 -0,101 -0,309 2 0,079 0,430 3 0,024 0,261 4 0,068 0,372 b) SI. 6. Napaka po opravljenih testnih poteh: a) napaka robotove lege po prevoženih osmicah; b) napaka robotove lege po vožnjah v hodniku Fig. 6. Position error after the tests: a) position error after the figure-of-eight turns ; b) position error after the journey in the corridor 7 SKLEPI 7 CONCLUSIONS Predstavili smo rezultate položajenja premičnega robota z izvirnim odometričnim položajnim zaznavalom, zasnovanim na samo enem dodatnem The results of the experiments with a new odometrical position sensor, designed with one additional measuring wheel only, are presented. The Položajno zaznavalo za premični robot - Position Sensor for a Mobile Robot 295 Strojniški vestnik - Journal of Mechanical Engineering 53(2007)5, 285-296 merilnem kolescu. Položajno zaznavalo sestavljata absolutni kodirnik za merjenje usmerjenosti merilnega kolesca in relativni kodirnik za merjenje prevožene poti. Preizkusi so pokazali, da je predlagano zaznavalo v natančnosti povsem primerljivo običajni rešitvi z dvema dodatnima merilnima kolescema ob pogonskih kolesih. Njegova prednost pa je v tem, da ga lahko namestimo na poljubnem mestu na robotu, zato je uporabnik z njegovo namestitvijo bistveno manj omejen. Pravzaprav bi lahko robota opremili celo z več takimi zaznavali in njihove rezultate povprečili. Težavo pri uporabi pa pomeni razmeroma zamudno določanje vrednosti štirih parametrov: ß0, c, o1 in a. Na prvi pogled se zdi, da bi bila lahko težava, ali pa vsaj omejitev, morebitna neporavnanost med usmerjenostjo robota in izmaknjeno nameščenim merilnim kolescem zaznavala ob vklopu robota: izkaže se, da matematični opis v primeru NMK povsem zadovoljivo podaja položaj tudi v tem primeru. Kako je merilno kolesce zasukano, torej ni treba skrbeti niti pred prvo vožnjo. sensor consists of an absolute encoder, which measures the orientation of the measuring wheel, and of a relative optical encoder, which measures the length of the path. Experiments proved the proposed sensor to be completely comparable to the classical solution with two measurement wheels mounted on each side of the driving wheels. However, it has the advantage that it can be mounted at an arbitrary place around the robot, so the user is far less restricted in terms of its use. In fact, one could equip the robot with even more position sensors and average their results. The main problems associated with its use relate to the determination of its four parameters, b0, c, o1 and a. At first sight it appears that the problem might be a possible misalignment of the orientation of the robot and the eccentrically mounted measuring wheel; however, it turned out that the discussion given in the case of NMW also holds good in this example. The actual orientation of the measuring wheel is not a problem, even before the first run. 8 LITERATURA 8 LITERATURE [1] J.Borenstein, H.R.Everett, L.Feng (1996) Navigating mobile robots-systems and techniques, A K Peters, Wellesley, Massachusetts. [2] J.Borenstein, L.Feng (1994) UMBmark - a method for measuring, comparing and correcting dead-reckoning errors in mobile robots, Technical Report UM-MEAM-94-22, University of Michigan. [3] M.Blatnik (1996) Navigacija mobilnega robota z enim merilnim kolesom, Diplomsko delo, Fakulteta za računalništvo in informatiko, Ljubljana. [4] Z.Fan, J.Borenstein, D.Wehe, Y.Koren (1995) Experimental evaluation of an encoder trailer for dead-reckoning in tracked mobile robots. Proc. of the 10th IEEE Int.Syposium on Intelligent Control. [5] J.Borenstein (1994) Internal correction of dead-reckoning errors with smart encoder trailer, Proc. of International Conf. on Intelligent Robots and Systems (IROS’94), Munich, Germany, September 12-16, 1994, str. 127-134. [6] RMahkovic, TSlivnik (2000) Constructing the generalized local Voronoi diagram from laser range scanner data, IEEE Transactions on Systems, Man, and Cybernetics, let.30, št.6, str.710 - 719, 2000. [7] N.S.V.Rao, S.Kareti, S.S. Iyengar (1993) Robot navigation in unknown terrains: Introductory survey of non-heuristic algorithms. Tecnical report, ornl/tm-12410, Oak Ridge National Laboratory, Oak Ridge, Tennessee, 37831. Avtorjev naslov: doc. dr. Rajko Mahkovic Univerza v Ljubljani Fakulteta za računalništvo in informatiko Tržaška 25 1000 Ljubljana rajko.mahkovic@fri.uni-lj.si Author’s Address: Doc. Dr. Rajko Mahkovic University of Ljubljana Faculty of Computer and Information Science Tržaška 25 1000 Ljubljana, Slovenia rajko.mahkovic@fri.uni-lj.si Prejeto: Received: 15.3.2006 Sprejeto: Accepted: 25.4.2007 Odprto za diskusijo: 1 leto Open for discussion: 1 year 296 Mahkovic R.