© Strojni{ki vestnik 46(2000)5,309-317 © Journal of Mechanical Engineering 46(2000)5,309-317 ISSN 0039-2480 ISSN 0039-2480 UDK 007.52.001.41 UDC 007.52.001.41 Strokovni ~lanek (1.04) Speciality paper (1.04) [olski robot SLR 1500 - razvoj in simulirni program The SLR 1500 Training Robot - Development and Simulation Program Juraj Urí~ek - Viera Poppeová - Róbert Zahoranský Šolski robot SLR 1500 je bil razvit na Univerzi v Žilini in na IQM Zvolen (Slovaška) za pouk robotike na visokih olah in univerzah. Njegov razvoj povezuje programiranje, tehnično kibernetiko, reševanje problemov vodenja, razvoj krmilnih sistemov za industrijske robote in delovanje numerično krmiljenih strojev. Šolski robot SLR 1500 ima rotacijske členke. Ima pet prostostnih stopenj, tri od njih so namenjene za zagotavljanje lege orodja v prostoru, preostali dve določata njegovo usmeritev glede na predmet, ki ga premika. © 2000 Strojniški vestnik. Vse pravice pridržane. (Ključne besede: roboti učeči, razvoj robotov, programi simulacijski, kinematika robotov) The SLR 1500 training robot was developed at the University ofŽilina and at IQM Zvolen (Slovakia) for the teaching of robotics at high schools and universities. Its design incorporates assistance with the programming, the technical cybernetics, solving the drive control problems, the design of the control system for industrial robots and operation of NC machines. The SLR 1500 training robot has an angular design. It has five degrees of freedom and three of them serve to position the end effector in space and the remaining two determine its orientation with respect to the object being manipulated. © 2000 Journal of Mechanical Engineering. All rights reserved. (Keywords: training robots, development of robots, simulation programs, robot kinemtics) 0 UVOD Kinematična struktura šolskega robota SLR 1500 je sestavljena iz rotacijskega telesa, dveh ročic in zapestnega mehanizma. Vsi deli so povezani z rotacijskimi členki, tako da ročici nista v isti ravnini, ampak se premikata ena glede na drugo. Takšna konstrukcija dovoljuje izjemno veliko območje vrtenja posamezne ročice (sl. 1). Parametri robota: število prostostnih stopenj: 5 ponovljiva natančnost lege : 0,25 mm za ponovni gib ročice v eni smeri največji vodoravni doseg od rotacijske osi enote: 640 mm največji rotacijski kot vrtilne enote: 330° največji rotacijski kot spodnje ročice: 165° največji rotacijski kot zgornje ročice: 270° največji rotacijski kot zapestja: 300° največji prečni rotacijski kot zapestja: 270° največja delovna hitrost vrtilne enote, spodnje ročice: 130°/s zgornje ročice: 130°/s prečna rotacija zapestja: 130°/s rotacije zapestja: 300°/s pozicioniranje: koračni števci 0 INTRODUCTION The kinematic structure of the SLR 1500 robot consists of a rotational waist, two arms and a wrist mechanism. All parts are connected with rota-tional joints in such a way that the arms are not in the same plane but are moved with respect to each other. Such a design allows an extremely large rotational range of the individual arms (Fig. 1). The robot parameters: number of degrees of freedom: 5 repeatable positional accuracy: 0.25 mm for repeated arm movement in one direction maximum horizontal range from the axis of the rotational unit: 640 mm maximum rotation angle of the rotational unit: 330° maximum rotation angle of the lower arm: 165° maximum rotation angle of the upper arm: 270° maximum rotation angle of the wrist: 300° maximum lateral rotation angle of the wrist: 270° maximum operational speed of the rotational unit, lower arm: 130°/s upper arm: 130°/s wrist pitch: 130°/s wrist rotation: 300°/s positioning: incremental counters stran 309 - - - - J. Urí~ek - V. Poppeová - R. Zahoranský: [olski robot - The Training Robot Sl. 1. Dimenzije in območja vrtenja elementov kinematike šolskega robota SLR 1500 Fig.1. Dimensions and ranges of the SLR 1500 training robot kinematic elements rotation Sl.2. Šolski robot SPL 1500 Fig. 2. The SPL 1500 training robot Krmilni sistem robota obsega računalnik z vmesnikom RS 232C. Za računalnik je bila potrebna posebna programska oprema za upravljanje krmilnega sistema. Zahtevam krmilnega sistema je ustrezal programski jezik RAMAS [2]. Ta programski jezik je bil razvit v VUKOV Prešov družbi (Slovaška) za programiranje APR-20 The control system of the robot consists of a computer with an RS 232C interface. For this computer, special software was required for the functions of the control system. The needs of the control system were satisfied with the RAMAS programming language [2]. This programming language was developed in the VUKOV Prešov company (Slovakia) grin^SfcflMISDSD ^BSfiTTMlliC | stran 310 J. Urí~ek - V. Poppeová - R. Zahoranský: [olski robot - The Training Robot industrijskega robota s krmilnim sistemom RS-4A. Njegovi ukazi se lahko delijo v več skupin: urejevalnik ukazov, navodila in ukazi za gibanja, tehnološki, krmilni, aritmetični, logični, čakalni ukazi, nato ukazi, ki so namenjeni za ustavljanje, pomožni ukazi in drugi. 1 SIMULIRANJE Izraz simuliranje običajno pomeni opazovanje in študij obnašanja sistema in temelji na modelu sistema. Sistem sestoji iz urejenega para množic, pri katerem ena od množic pomeni predmete (točke, komponente itn.), druga pa opisuje razmerja med njimi. Grafični model, ki bi predstavljal obnašanje resničnega robota zelo natančno, bi bil zelo zahteven in neučinkovit. Za simuliranje ne potrebujemo informacij o barvi, hrapavosti ali materialu. Vse bolj pa zahtevamo podatke o izmerah, obliki in značilnosti kinematičnih elementov in seveda o kinematičnih značilnostih razmerja med njimi. Kar je pomembno za simuliranje robota, je torej opis lege elementov glede na dejavnosti robota, za katere je namenjen. Najsi bo to pobiranje predmeta, premikanje zadnjega elementa z ene točke k drugi (z nedoločeno potjo ali z linearno interpolacijo) ali simuliranje njegovega ročnega krmilja. Za simuliranje robota je bila potrebna informacija o izmerah in značilnostih njegovih kinematičnih elementov. Po poenostavitvi zapletenega simulirnega problema smo opravili naslednje poddejavnosti: določitev kinematične sestave končnih točk v prostoru, tridimenzionalno predstavitev posameznih komponent robota na računalniškem zaslonu, rešitev interpolacije za prostorske premike robota in problem urejanja programa v posebnem jeziku. Za predstavitev komponent robota so bila uporabljena mnogokotna telesa. Gibanje se izvede po vstopu v programski ukaz s parametri koordinat premika končne točke. Iz teh koordinat so najprej izračunane koordinate robota (rotacije posameznih členkov) in nato se vsi elementi začnejo premikati v ustrezno smer z največjo hitrostjo. Če je tirnica določena, potem jo tvori interpolator. Interpolacija nadomesti dano tirnico s sistemom koračnih premikov v smeri koordinatnih osi tako, da se izračunana tirnica najbolje ujema z izvirno zahtevano tirnico. Ta tirnica mora zadostiti zahtevam po natančnosti. Še več, od interpolacijske metode pričakujemo zanesljivost, natančnost, preprostost in hitrost interpolacije. Poznamo dva standardna interpolacijska postopka: digitalno diferencialno interpolacijo (DDI - DDA), ki temelji na diferencialnih enačbah krivulje, for programming the APR-20 industrial robot with the RS-4A control system. Its commands can be di-vided into several groups: editing commands, move instructions and commands, technological, control, arithmetical, logical, waiting, interruption serving, help commands and others. 1 SIMULATION By simulation, we generally understand the observation and study of a system’s behaviour based on its model. The system consist of an ordered pair of sets, where one of the sets represents the objects (items, components and so on) and the other describes the relations between them. A graphical model, which would represent the behaviour of a real robot in great detail would be very difficult and also ineffective. For a simulation we do not need information about the colour, rough-ness, or material. Rather we require information about the dimension and shape and the character of the ki-nematic elements and of course about the kinematic character of the relationship between them. What is important for a robot simulation is therefore the de-piction its element position with respect to activities the robot is performing. Either the picking up of an object, moving the end element from one point to an-other (with no trajectory specification or with linear interpolation) or the simulation of its manual control. For the simulation of the robot information about the dimensions and the characteristics of its kimenatic elements was required. After the simplifi-cation of the complex simulation problem, the follow-ing main subtasks were encountered: determination of the kinematic structure end points in space, 3D rep-resentation of the individual robot components on the computer screen, the interpolation solution for the robot’s 3D movement, and the problem of program editing in a special language. Polygonal bodies were used for the representation of the robot components. The movement is executed after entering a program instruction with the coordinate parameters of the movement end point. From these coordinates the robot coordinates are first calculated (rotations of individual joints) and then all the elements start to move with the maximum speed in the appropriate direction. If the trajectory is specified, then it is generated by interpolator. The interpolation replaces a given trajectory with a system of incremental movements in the direction of the coordinate axes in such a way that the resulting trajectory is in maximum accordance with the originally requested trajectory. This trajectory must satisfy the requirements for precision. Moreover, from the interpolation method we expect the reliability, ac-curacy, simplicity and speed of interpolation. We recognise two standard interpolation procedures: digital differential interpolation (DDA) which is based on the differential equation of the | gfin=i(gurMini5nLn 00-5_____ stran 311 I^BSSIfTMlGC J. Urí~ek - V. Poppeová - R. Zahoranský: [olski robot - The Training Robot ki pomeni tirnico, in neposredno računanje funkcije (NRF - DFC), ki temelji na analitičnih izrazih krivulje. Za simuliranje rokovanja s predmetom mora biti omogočeno odpiranje in zapiranje prijemala. Za predstavitev te operacije uporabljamo vrednost notranjega parametra, ki je namenjen za odpiranje / zapiranje prijemala in hkratno sprostitev / prijemanje predmeta. Stavčni prepis v jezik RAMAS bo torej: FLAG + F0, da se prijemalo zapre in FLAG - F0, da se odpre. Simuliranje ročnega krmiljenja daje občutek o robotovem gibanju v delovnem okolju. To je vrtenje robota okrog vodoravne osi, vrtenje posameznih ročic okoli lastnih osi, vrtenje prijemalnega mehanizma okoli stranske in vzdolžne osi in tudi odpiranje in zapiranje prijemala. Dalje, ročno krmiljenje robota dovoljuje, da si predstavljamo delovni doseg robota in njegove mejne lege. Gibanje v posamezno smer se sproži s pritiskom na tipke računalniške tipkovnice. Po poenostavitvi zapletenega simulirnega problema naletimo na naslednje glavne podnaloge: - določitev kinematične zgradbe končnih točk v prostoru; - prostorska predstavitev posameznih komponent robota na računalniškem zaslonu (transformacija prostora v ravnino z ohranitvijo vidnosti); - rešitev z interpolacijo za robotove prostorske gibe; - problem urejanja programa v jeziku RAMAS, njegov zapis, shranjevanje, nalaganje in izvajanje simuliranja. Ustvarjanje algoritma sledi razčlembi problema v manjše in preprostejše podprobleme, za katere je laže najti rešitev. Podproblemi so opisani v diagramu poteka. Domnevati je bilo mogoče, da je glavni simulirni program zmožen izpeljati nalogo. Kasneje so bila ta dela do potankosti izvedena v programskem jeziku PASCAL. Težava se pojavi pri razumevanju programa, ker krmilni jezik RAMAS in programski ukazi za simulirni program niso združljivi. Program RAMAS je ASCII tekstovna datoteka urejena v poljubnem urejevalniku besedila. Morali smo razviti komponento, ki bo rabila za prilagoditev (prevod) programa RAMAS seznamu ukazov, ki jih bo simulirni program razumel. Algoritem za ta prevajalnik temelji na diagramu poteka. Na temeljih tega diagrama poteka smo izdelali podprogram v jeziku PASCAL, ki prebere program RAMAS, vrstico za vrstico, odkriva ukaz in sledeč njegovim značilnostim in parametrom, pokliče primeren postopek, ki izvede dejavnost natanko po navodilih. Kot interpolacijski postopek, ki najbolj ustreza našim potrebam, je bila izbrana metoda DDI. Glede na neposredno računanje iz funkcije je njena ^BSfiTTMlliC | stran 312 curve which represents the trajectory and DFC (Di-rect functional calculation), which is based on the analytical expression of the curve. For the simulation of object manipulation it must be possible to ensure opening and closing of the end effector. For the representation of this operation we use a value of internal flag, which will stand for open-ing / closing of the gripper and at the same time, release / pick-up of the object. The syntactical transcription in the RAMAS language will be then: FLAG +F0 to close the gripper and FLAG -F0 to open the gripper. The simulation of manual control gives an idea about the robot’s movement in the working area. This is the robot’s rotation around the horizontal axis, the individual arms rotation around their axes, the gripper mechanism rotation around the lateral and transverse axes and also the opening and closing of the gripper. Further, the manual control of the robot allows us to imagine the robot’s working range and its boundary positions. The movement in an individual direction is realised by pressing keys on the computer keyboard. After the simplification of the complex simulation problem we encounter the following main sub-tasks: - determination of the kinematic structure end points in space; - 3D representation of individual robot components on the computer screen (space transformation to a plane with visibility preservation); - interpolation solution for robot 3D movement; - problem of program editing in RAMAS language, its writing, saving, loading and execution of the simulation. The algorithm creation follows the practice of problem decomposition into smaller and simpler sub-problems, for which the solution is easier to find. The sub-problems are described in the flow diagram. The main simulation program was supposed to be able to execute these tasks. Later, these tasks were in detail worked out in the PASCAL programming language. Since the controlling language is RAMAS and the language instruction for the simulation program are not compatible, we have a problem of program interpretation. The RAMAS program is an ASCII text file edited in an arbitrary text editor. We have had to de-velop a component, which would serve for adaptation (translation) of the RAMAS program to a list of in-structions understandable by the simulation program. The algorithm for this translator is based on a flow chart. On the basis of this flow chart we have created a subprogram in the PASCAL language, which reads the RAMAS program, line by line, de-tects the instruction and following its character and parameters, it calls an appropriate procedure, which executes an action particularly for this instruction. As an interpolation procedure, which best suits our needs, the DDA method was chosen. Its advantage with respect to direct functional calculation is that the DDA J. Urí~ek - V. Poppeová - R. Zahoranský: [olski robot - The Training Robot prednost v tem, da interpolator DDI neposredno izračuna funkcijo s stalnimi koraki tirnice. S tem načinom nastaja gibanje iz sunkov in njihovo pogostnost, ki so poslani posamezni osi. Če imamo dve točki, A(xA, yA , zA) in B(xB, yB , z), mora interpolator tvoriti tirnico med njima z delitvijo tirnice na n odsekov. Na enak način tudi deli na n odsekov tirnico v posamezni osi. Izmere posameznih korakov po osi i, i, i so določene. x y z Interpolator doseže končno točko giba v vsako smer po izvedbi ustreznega števila korakov. Večje ko je število sunkov na časovno enoto, manjši je korak (inkrement) in natančnost premika je potem večja. Krmilni sistem mora tudi rešiti obratno transformacijo z interpolacijo kartezičnih koordinat v robotske koordinate z visoko frekvenco. Manj zahteven primer je, če naj bi končni element dosegel končno točko brez opisa tirnice. Za začetne in končne točke se izračunajo lokalne koordinate robota A(cp1A,