rcs: the nbs real-time control - nist

33
RCS: The NBS Real - Time Control System Anthony J. Barbera National Bureau of Standards Washington. District of Columbia M.L. Fitzgerald National Bureau of Standards James S. Albus National Bureau of Standards Leonard S. Haynes National Bureau of Standards Ab st rac t The National Bureau of Standards, Industrial Systems Division designed the Real - time Control System where high - level goals are decomposed through a succession of levels, each producing strings of simpler comnands to the next lower level. The bottom level generates the drive signals to the robot, gripper, and other actuators. Each control level is a separate process with a limited scope of responsibility, independent of the details at other levels, thus providing a foundation for future modular, ''plug compatible " hardware and software for robots and real - t i me sensory interactive control applications. To aid in specifying the required task decomposition and task processing, a programing language and program development environment were inplemnted. Programs at each control level are expressed as state tables, and the programing environment permits the generation, editing, emulation, and evaluation of these state tables. The control system i s completely interactive, allowing the system to run freely, or be single - stepped to any level of detail. By acceptance of this artlcle. the Publlsher and/or reciplent acknowledges the U.S. Government's rlght to retam a nonexclusive. royalty -free license In and to any copyrlght covermg thls paper. 19 -1

Upload: others

Post on 15-Feb-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RCS: The NBS Real-Time Control - NIST

RCS: The NBS Real -Time Control System

Anthony J. BarberaNational Bureau of Standards

Washington. District of Columbia

M.L. FitzgeraldNational Bureau of Standards

James S. AlbusNational Bureau of Standards

Leonard S. HaynesNational Bureau of Standards

Ab s t rac t

The National Bureau o f Standards, Indus t r ia l Systems Div is ion designed the

Real - time Control System where high - level goals are decomposed through a

succession o f l eve l s , each producing s t r i n g s o f simpler comnands t o the nextlower leve l . The bottom l e v e l generates the dr i ve s igna ls t o the robot,gr ipper, and other actuators. Each cont ro l l e v e l i s a separate process wi th a

l im i ted scope o f responsibi l i ty , independent o f the de ta i l s a t other levels,

thus prov id ing a foundation f o r fu tu re modular, ''plug compatible " hardware and

software f o r robots and r e a l -timesensory i n t e r a c t i v e control appl icat ions.

To aid i n specifying the required task decomposition and task processing, aprograming language and program development environment were inplemnted.Programs a t each cont ro l l e v e l are expressed as s t a t e tables, and the

p rog ram ing environment permits the generation, edi t ing, emulation, and

eva lua t i on o f these s t a t e tables. The con t ro l system i s completely

in te rac t i ve , a l lowing the system t o run freely, o r be single - stepped t o anyl e v e l o f de ta i l .

By acceptance of this artlcle. the Publlsher and/or reciplent acknowledges the U.S.Government's rlght to retam a nonexclusive. royalty -free license In and to anycopyrlght covermg thls paper.

19-1

Page 2: RCS: The NBS Real-Time Control - NIST

1. INTRODUCTION

The theory behind t h e NBS Rea l - t ime C o n t r o l System (RCS) has been underdevelopment f o r a lmost a decade. References 1 t o 5 document t h a t research. A paperdescr ib ing the implementat ion d e t a i l s o f RCS i s i n preparat ion. The f o l l o w i n g paperd e s c r i b e s t h e use rs v iew of the c o n t r o l system, including an example o f a c u r r e n tr o b o t app l i ca t i on . F i g u r e 1 shows t h e ma jo r components o f RCS. These componentscan be descr ibed i n terms of a user en t r y mechanism, h i e r a r c h i c a l l y execu t ingc o n t r o l l eve l s , common memory, communications, and a d iagnos t i c module.

1.1 DATA, STATE TABLE, AND PROGRAM EDITORS

O n the r igh t s ide o f f igure 1 are the Data Form E d i t o r , S t a t e Tab le E d i t o r , andProgram Edi to r . These e d i t o r s represent th ree l e v e l s a t which a user can i n t e r a c twith RCS. Fo r en t r y o f , o r changes i n data, a user uses the data fo rms system.Using a s e t o f forms, p a r t d e s c r i p t i o n s , names, and l o c a t i o n s o f machines, f i x t u r e s ,e tc . , are entered. The data so en te red i s e n t i r e l y d i s t i n c t f r o m t h e a p p l i c a t i o nalgorithms. Separat ing t h e task d e s c r i p t i o n f r o m the data s p e c i f i c a t i o n helps makethe c o n t r o l algor i thms d i r e c t l y t rans fe r rab le t o many d i f f e r e n t workstat ions andapp l i ca t ions by a change i n t h e data base d e s c r i p t i o n o f the p a r t s and w o r k s i t e .The data forms are d e t a i l e d i n s e c t i o n 3.2.

I n RCS, app l ica t ion algorithms a r e spec i f i ed v i a s t a t e tab les, which p r i m a r i l yper form task decomposition, and procedures ca l l ed by these s t a t e tab les which primar -i l y per fo rm computation. For a given appl icat ion, most programming will be done v i at h e s t a t e tab les alone. T h i s will c o n t r o l the sequence o f , and c o n d i t i o n s underwhich various procedures will be cal led. The S t a t e Table E d i t o r prov ides a conve-nient t o o l f o r ed i t i ng s ta te tables. S ta te tables are described i n d e t a i l i ns e c t i o n 2.8.

For major changes t o RCS app l ica t ion codes it may be necessary t o add o r modifyprocedures as we l l . A Program E d i t o r i s provided f o r t h i s purpose. The s p e c i f i clanguage i n which these procedures are w r i t t e n i s ca l l ed SMACRO, a general purpose," f u l l power, " programming language. SMACRO i s discussed i n s e c t i o n 2.8.

The d e t a i l s o f the e d i t o r s a r e very convent ional and will n o t be d iscussedfurther i n t h i s paper. An RCS users manual which will contain these d e t a i l s i si n preparat ion.

1.2 CONTROL LEVELS

Complex c o n t r o l systems are b u i l t i n RCS by implementing h i e r a r c h i c a l con t ro ll e v e l s . Each c o n t r o l l e v e l represents a we l l - de f ined clearly - bounded c o n t r o l func-t i o n with a smal l number o f inpu ts and outputs. Commands input a t the h ighes t l e v e la r e decomposed i n t o sequences o f subtasks which are passed as commands t o the nextlower l e v e l i n t h e hierarchy. This same procedure i s repeated a t each l e v e l unt i l ,a t the bottom o f the hierarchy, a set o f outputs i s generated t o actuators , i n t e r -locks, and s i g n a l l i n e s t o cause t h e necessary ex terna l response. The complexi ty a tany l e v e l i n the h ie ra rchy i s he ld within manageable l i m i t s , regard less o f t h ecomplexi ty o f the e n t i r e s t ruc tu re . Current ly , f o r robot c o n t r o l , t h r e e r o b o t

19-2

Page 3: RCS: The NBS Real-Time Control - NIST

LI

Y

c

19-3

Page 4: RCS: The NBS Real-Time Control - NIST

independent c o n t r o l l e v e l s have been implemented and f u l l y tes ted . These t h r e el e v e l s , c a l l e d t h e TASK, E-MOVE, and PRIMIT IVE l e v e l s a r e d i scussed i n s e c t i o n 2.2.Below t h e PRIMITIVE l e v e l t h e r e i s a gener i c i n t e r f a c e t o any r o b o t , and be low t h a tt h e r e a r e two r o b o t dependent c o n t r o l l e v e l s . The robot dependent l e v e l s o f thec o n t r o l system a r e beyond t h e scope o f t h i s paper.

1.3 COMMON MEMORY

Each o f the func t i ona l elements o f RCS can access a common memory. The systemd i c t i o n a r y , f o r m s sys tems data, and communication b u f f e r s r e s i d e i n t h i s commonmemor y.1.3.1 Data Dic t ionary

The system d i c t i o n a r y i s by f a r t h e l a r g e s t p a r t o f the common memory, s t o r i n ga l l o f the var iab les , procedure, and s t a t e tables within the system. Named va r i -ables, named procedures, named s t a t e tab les, l i s t s o f va r iab les , and l i s t s o fprocedures, a r e a l l s t o r e d i n the data dic t ionary. The user can v i e w o r change t h eva lue o f any var iab le , o r l i s t o f variables', can c a l l f o r ' t h e execut ion o f any pro -cedure, a l i s t o f procedures, o r execute one cyc le o f any s t a t e table, a l l by typingthe re levant var iab le , procedure, l i s t , o r s t a t e t a b l e name. The data d i c t i o n a r y i ss t r i c t l y o f f l i n e , and i s n o t r e f e r e n c e d during t h e a c t u a l execut ion o f c o n t r o ll e v e l s . The data d i c t i o n a r y will be discussed further i n sec t i on 3.3.

1.3.2 Data

The p a r t and l o c a t i o n data which the user e n t e r s i n t o the forms i s t a b u l a r i z e dby the forms systems and stored i n the data p o r t i o n o f common memory. None o f thes t a t e tab les o r procedures con ta in data, a l l data i s re fe renced f rom t h e commonmemory o n l i n e j u s t b e f o r e the data i s ac tua l l y needed.

1.3.3 Communication Bu f fe r s

The communication b u f f e r s a r e t h e common memory b u f f e r s used f o r a l l t r a n s f e r o fdata betweeen every c o n t r o l l eve l , every sensory system, and the in te r faces t o therobot , gr ipper, and other ex terna l systems.

1.4 COMMUNICATIONS EDITOR

As described above, a l l intercommunication occurs v i a b u f f e r s s t o r e d i n commonmemory. Data source and des t ina t ions are spec i f i ed v i a the communications e d i t o r byg i v i n g the var iab le l i s t name o f the data source and i t s l oca t i on , and t h e va r i ab l el i s t name o f t h e d e s t i n a t i o n and i t s locat ion. The communication system executessynchronously each and every cycle. The Communications E d i t o r i s further decr ibedi n s e c t i o n 3.1.

1.5 DIAGNOSTIC SYSTEM

RCS prov ides a user f r i e n d l y , power fu l Diagnost ic System. Because a l l datacommunication occurs through common memory every c o n t r o l cycle, t h e current s t a t e oft h e machine i s ava i lab le f rom the common memory a t any time. By accessing t h i s data,the D i a g n o s t i c System can prov ide rea l - t ime readout o f values, t r a n s f e r any valuest o e x t e r n a l systems, etc . The Diagnost ic System a l s o makes a l o g o f the s ta tus ofthe communications b u f f e r s and can a c t u a l l y s tep the system through these prev iousmachine s ta tes t o loca te the source o f a problem. Included i n the Diagnos t i c System

19-4

Page 5: RCS: The NBS Real-Time Control - NIST

i s a v e r y power fu l D i s p l a y E d i t o r and Graphics I n t e r f a c e which suppor t s r e a l - t i m ep l o t t i n g o f v a r i a b l e s , v e c t o r s , e tc . The Diagnost ic System i s discussed i n s e c t i o n 4.

2. CONTROL LEVELS

A t t h e h i g h e s t l e v e l o f RCS, input commands p r o v i d e an o v e r a l l g o a l f o r t h esys tem t h a t i s rqached through a sequence o f subgoals passed down t o the next l o w e rl e v e l , which i n turn, fur ther decomposes those subgoals t o be executed by l o w e rc o n t r o l l e v e l s . The output o f each l e v e l depends on t h e command be ing processed,t he p resen t s t a t e o f the environment as i n d i c a t e d by sensory feedback data, thei n t e r n a l s t a t e of t h e c o n t r o l l e v e l , and s t a t u s feedback f r o m t h e l o w e r l e v e l .

2.1 STRUCTURE OF A CONTROL LEVEL

The a tomic unit within a c o n t r o l l e v e l i s a func t i ona l l y bounded module, as showni n f i g u r e 2. T h i s module c o n s i s t s o f inputs, a process, and outputs. Each funct ion -a l l y bounded module i s given a name, shown i n quotes t o ind i ca te it i s an A S C I Istring, and the module can be executed a t any t i m e by typing tha t name on t h e t e r m i -nal. Input va r i ab les can be changed by typing <var iab le namesnew value> and t h evalue o f any var iable can be in ter rogated by typing <name ?>.Func t i ona l l y boundedmodules a r e executed i n f u l l y compiled machine code form; hence, t h e i n t e r a c t i v ec a p a b i l i t y does n o t severe ly impa i r e f f i c i ency .

Func t i ona l l y bounded modules can be grouped within an execut ing owner w i t h i t sown name, as shown i n f i g u r e 3. Typing the name o f the owner causes the f u n c t i o n a l l ybounded modules t o be executed i n t h e order l i s t e d . The e s s e n t i a l concept i s t okeep modules d i s t i n c t even when they will be executed together.

Execut ing owners are grouped i n t o c o n t r o l l e v e l s . The s t r u c t u r e o f a c o n t r o ll e v e l , shown i n f igu re 4, i s gener ic and every l e v e l has the i d e n t i c a l s t r u c t u r e . Ac o n t r o l l e v e l c o n s i s t s o f a preprocess funct ion, a s t a t e tab le funct ion, and a pos t -process function. Every con t ro l l e v e l i s executed every cycle. The preprocessfunc t ions are used t o combine and/or conver t incoming data i n t o a format s u i t a b l ef o r the r e s t o f the l eve l . The postprocessing func t ions convert output data i n t oformats requ i red f o r o ther systems. Dec is ion process ing i n a c o n t r o l l e v e l i sdone by a s t a t e tab le ( r e f 2). As shown i n f i g u r e 4, the l e f t s i d e o f the tab le i sa l i s t o f cond i t ions which t e s t the relevant s t a t e o f the wor ld as determined f r o mthe input var iables and in te rna l machine state. Exac t ly one l i n e o f t h i s t a b l e mustmatch with the re levan t s t a t e o f the world. I n th i s case, the ouput proceduresl i s t e d on the r igh t side o f that s t a t e tab le l i n e a r e executed. S t a t e tab les willbe descr ibed i n more d e t a i l l a t e r . For t h e present, we n o t e s e v e r a l c h a r a c t e r i s t i c so f s t a t e tab les which are not present i n procedural so f tware programs.

a.

b.

The NBS Robot C o n t r o l System does not r e q u i r e interrupts. The s t a t e tab leinputs are examined each cycle. I f a p a r t i c u l a r input c o n d i t i o n r e q u i r e s imme-d i a t e a t t en t i on , t h i s can be r e f l e c t e d i n t h e s t a t e tab le , and because thes t a t e tab le i s examined every cyc l e it i s guaranteed t h a t whatever a c t i o n i srequ i red will be i n i t i a t e d within a maximum o f 1 cyc le t ime. It would o f coursebe p o s s i b l e f o r a user t o w r i t e conventional sof tware which produced the samer e s u l t , a l s o wi thout id te r rup ts , but t h e NBS C o n t r o l System s t r u c t u r e s h idesmuch o f the necessary d e t a i l f r o m the user, and ensures consistency i n complexapp l i ca t i on code.

A la rge percentage o f the code f o r robot appl icat ions will e f f e c t recovery fromvar ious undes i rab le events. Us ing s t a t e t a b l e s organized i n t o c o n t r o l l e v e l s asdescribed, a d d i t i o n a l s i t u a t i o n s can be handled by adding l i n e s t o the s t a t etable. With convent ional s o f t w a r e a u s e r must f i r s t f i g u r e o u t where i n t h e

19-5

Page 6: RCS: The NBS Real-Time Control - NIST

INPUT PROCESS OUTPUT

Figure 2. Functionally Bounded, Named ModuleFunctionally Bounded Modules are Independently Executable

INPUT

0INPUT

INPUT I]INPUT

I

nII PROCESS 2

I PROCESS 4 I

OUTPUT

OUTPUT00 OUTPUT

OUTPUT

Executing Owner “any name”P Process 1P Process 2P Process 3P Process 4

Figure 3. Executing Owner “any name” Procedures are Combined Together Under theOwner Name Yet Remain Distinct, Understandable, and Independently Executable

19-6

Page 7: RCS: The NBS Real-Time Control - NIST

1100Preprocess

Input outputState Procedures

mState-TablePostprocess

Executing Owner TASK LEVEL

eo Preprocesseo State-Tableeo Postprocess

THE ENTIRE CONTROL LEVEL IS EXECUTED ONCE EACH CYCLE.

Figure 4. Structure of a Control Level

COMMAND

CONTROLDECISION

PROCESSEDSENSORYFEEDBACK

PROCESSED

Figure 5. Hierarchical Control Levels Linked Togetherto Form a Complex Control System

19-7

Page 8: RCS: The NBS Real-Time Control - NIST

code t h i s p a r t i c u l a r s i t u a t i o n may occur , and changes and/or patches may havet o be made i n many p laces i n the code. S ta ted d i f f e r e n t l y , s t a t e t a b l e s i s o l a t ethose opera t ions that a r e r e q u i r e d f o r each s p e c i f i c s i t u a t i o n , and l e t thea p p l i c a t i o n des igner think i n t h i s high l e v e l manner - what t o do i n eachcase, independent o f i f then, loop , o r o t h e r s o f t w a r e c o n t r o l s t r u c t u r e s .

c. S t a t e t a b l e s sepa ra te t h e i s s u e o f when a f u n c t i o n i s performed f r o m t h efunct ion i t s e l f . T h i s a t t r i b u t e o f s t a t e tab les i s s y n e r g i s t i c with t h e i n t e r -a c t i v e s t a t e t a b l e s mechanizat ion which l e t s one execute s i n g l e f u n c t i o n a l l ybounded modules o r l i s t s o f func t iona l ly bounded modules independently. Onecan debug the f u n c t i o n s and t h e s t a t e t a b l e s which c a l l the f u n c t i o n s indepen -den t l y . Again, it i s p o s s i b l e t o design convent ional so f tware such that t h ec o n t r o 1 ) f l o w p o r t i o n o f t h e a l g o r i t h m s c a l l p rocedures t o p e r f o r m the computa -t i o n . One can then develop the c o n t r o l f l o w code, leaving stubs f o r a l l t heprocedures, e tc . , ach iev ing some o f advantages o f the NBS c o n t r o l system. AgainRCS hides those d e t a i l s f r o m the user and ensures consistency.

d. On the negative side, s t a t e tab les tend t o hide the sequence o f execution.E x p l i c i t s p e c i f i c a t i o n o f next s t a t e s andlor s t a t e t r a n s i t i o n graphs can h e l pa l l e v i a t e t h i s s h o r t f a l l .

F i g u r e 5 shows t h e combinat ion o f c o n t r o l l e v e l s t o f o r m more complexh ie rach i ca l s t ructures. Every cyc le each l e v e l executes i t s preprocessing, ' s t a t etab le , and postprocess ing funct ions. Each c o n t r o l l e v e l decomposes input commandsit receives i n t o output subcommands which it sends t o the l e v e l below, w h i l e repor t -ing s t a t u s back t o t h e l e v e l above. A l l a lgor i thms a r e b u i l t us ing symbol ic v a r i a b l e s ,which are attached t o data during execut ion, a t the p o i n t the data i s required. Thei n t e r f a c e between any two l e v e l s i s i d e n t i c a l i n mechanisms, hope fu l l y prov id ing afoundation € o r future modular, "plug compatible " hardware and s o f t w a r e f o r r o b o t i c sand other rea l - t ime sensory i n t e r a c t i v e c o n t r o l appl icat ions. Figure 6 shows t h eTASK, ELEMENTAL -MOVE (E-MOVE), and PRIMITIVE l e v e l s as they are c u r r e n t l y implemented.The commands and data t o each l e v e l and t o the v i s i o n system are shown, as i s t h es t a t u s and data back f r o m each leve l .

2.2 DETAILS OF THE CONTROL LEVELS

2.2.1 TASK Leve l

The TASK l e v e l develops a sequence o f high l e v e l goal p o i n t s using o b j e c t andl o c a t i o n po in t names provided i n i t s command f rom the workstation.

Commands from the WORKSTATION t o the TASK LEVEL are:

ACQUIRE (OBJ [ a t A] )

From i t s cur ren t pos i t ion , the robo t will go t o p o s i t i o n A, (SOURCE), and graspt h e named ob jec t , (OBJ). I f no l o c a t i o n A i s s p e c i f i e d , then the o b j e c t will beacquired f r o m the robo t ' s cur ren t loca t ion ;

MOVE ([OBJ f r o m A] t o B)

The robo t will acquire the named ob jec t f rom l o c a t i o n A, (SOURCE), and will moveit t o B (DEST), but will n o t re lease the object. I f (OBJ f rom A) i s no t speci f ied,t h e r o b o t will move f rom i t s cur ren t p o s i t i o n t o 8.

19-8

Page 9: RCS: The NBS Real-Time Control - NIST

STATUS =

STATION

busy, done, failedreason for failure

COMMANDS

TRANSFER (OBJ from A to B [end at C])ACQUIRE (OBJ a1 A)RELEASE [end at C]CLEAR [drop at B] [end at C]MOVE ([OBJ] [from A] to B)

COMMANDSLOCATE (OBJ)PICKUP (OBJ)MOVE-TO (NAMED -LOCATION)MOVE.TO -OBJ (NAMED -LOCATION)

Status= busy, done, failedreason tor failure

RELEASE (OBJ)

Status =busy, done, fail

c

E-MOVEVISION

SYSTEMCOMMANDS

GOT0 (POINT)GOTHRU (POINT)

Commands

LINE-FLASH (OBJ, SURFACE NORMAL) APPROACH.POSITION -FINGERS (OBJ)DEPART -POSITION -FINGERS (OBJ)IMMED-GRASP (0BJ)

RETURNS MEASURED DISTANCETO OBJECT

RETURNS X AND Y OFFSETOF CENTROID AND PROBABILITY

FLOOD-FLASH (OBJ, DISTANCE) PAUSE

OBJECT IN VIEW IS SPECIFIEDOBJECT

Status= busy, done. failed

f-lPRIMITIVE

ruason lor mllure \ POSITION (OPENING)

RETURNS GRIPPEROPENING

reason forfailureCOORDINATED JOINT

GRIPPER CONTROLSYSTEM

Figure 6. Commands -to Each Level of Robot Control System

19-9

Page 10: RCS: The NBS Real-Time Control - NIST

RELEASE [end-at A I

The r o b o t will r e l e a s e t h e o b j e c t it i s hold ing a t i t s present p o s i t i o n and movet o p o s i t i o n A. I f A i s n o t s p e c i f i e d , the r o b o t will move t o t h e "SAFE" p o s i t i o nassoc ia ted with i t s cur ren t l o c a t i o n (e.g., i f t h e r o b o t i s a t the f i x t u r e it willmove t o the f i x t u r e s a f e l o c a t i o n a few cent imeters above t h e f i x t u r e ) .

TRANSFER ([OBJ f r o m A] t o B [end -at C ] )

The r o b o t will acqui re the named o b j e c t f rom l o c a t i o n A, (SOURCE), r e l e a s e it a tp o s i t i o n 8 (DEST), and move t o C (END-AT). I f (OBJ f rom A) i s n o t s p e c i f i e d , and i fthe robo t i s already holding an ob jec t , that o b j e c t will be moved t o B. I f(end-at C) i s no t spec i f i ed the sa fe p o s i t i o n f o r B will be used as the end-atl o c a t ion.

CLEAR (drop - at A [end-at B ] )

The robot will go t o p o s i t i o n A and re lease the p a r t it i s cu r ren t l y holding.Then it will end-at B. I f B i s unspeci f ied t h e safe pos i t i on o f A i s used.

F igu re 7 shows the sequence o f the above commands issued by the WORKSTATION t othe TASK l e v e l o f the RCS t o manufacture a box, a sample p a r t which has beenmanufactured automat ica l ly a t NBS. The MOVE, RELEASE, ACQUIRE, and TRANSFER com-mands are commands f rom the workstat ion t o the TASK l e v e l o f the con t ro l system.Ths o ther l i n e s i n f igu re 7, are commands t o t h e v i s e and t o the machine t o o lcon t ro l l e r .

2.2.2 E-MOVE Level

The TASK l e v e l i ssues commands t o the E-MOVE l e v e l t o implement t h e commandsf rom the WORKSTATION. I n general, t h e E-MOVE l e v e l develops a t r a j e c t o r y betweenthe l a s t commanded high l e v e l goal p o i n t and the current goal point. A t r a j e c t o r ymay be simply a s t ra ight l i n e between two goal po in t s , o r more complex, involv ingdeparture, in termediate , and approach t r a j e c t o r i e s , The commands f rom t h e TASK l e v e lt o the E-MOVE l e v e l are:

LOCATE (OBJ)

F i r s t , t he gr ipper i s opened f u l l y t o a l l ow t h e robo t v i s i o n an unobstructedv iew o f t h e scene. Then the robot will analyze t h e scene cu r ren t l y i n i t s view.Using the v i s i o n system, it will i d e n t i f y t h e s p e c i f i e d ob jec t and determine i t so r i en ta t i on . The robo t will then c lose t h e g r i ppe rs t o t h e approach opening f o rtha t ob jec t . F i n a l l y t h e robot i s pos i t ioned such that c l os i ng t h e gr ippers willgrasp the object . The database prov ides the phys ica l c h a r a c t e r i s t i c s o f the namedOBJ t o t h e v i s i o n system. The d e t a i l s o f the recogn i t ion a lgor i thm a r e de f ined i nt h e v i s i o n system. I f the s p e c i f i e d ob jec t cannot be i d e n t i f i e d , a l o c a t e f a i l u r ei s re tu rned t o t h e TASK l e v e l .

PICK-UP (OBJ)

The gr ipper i s c losed unt i l t h e gripping f o r c e on t h e o b j e c t reaches thep r e s p e c i f i e d value. The lower l e v e l will return a grasp f a i l u r e i f t h e f i n a l g r ipperopening i s no t within t h e requ i r ed tolerance. The ob jec t s i z e i s acquired f r o m thedatabase and the gr ipper opening i s par t o f t h e s ta tus data passed up f r o m theGr ipper C o n t r o l l e r .

19-10

Page 11: RCS: The NBS Real-Time Control - NIST

I-U

Zwn

N

Y7 I

~

II 1 n

0cX0

Q

m

r0-C0.-1

iucv)

cX0mWY

9

E2u,

E9UWmsYW

>2

19-1 1

Page 12: RCS: The NBS Real-Time Control - NIST

MOVE-TO (LOCATION)

The r o b o t i s moved f r o m t h e cur ren t l o c a t i o n t o the named d e s t i n a t i o n l o c a t i o n ,The MOVE-TO command success ive ly accesses the p o i n t s a long the d e s i r e d t r a j e c t o r y ,commanding the PRIMIT IVE l e v e l t o GOTHRU each p o i n t u n t i l t h e l a s t p o i n t , a t whicht i m e a GOTO command i s issued t o GOTO that l a s t po int .

MOVE-TO-OBJ (OBJ, NAMED-LOCATION)

MOVE-TO-OBJ i s e x a c t l y t h e same as MOVE-TO except t h a t the approach opening f o rthe named ob jec t i s accessed f r o m t h e database and be fo re moving, t h e g r i p p e r s a r eopened t o the approach opening o f the s p e c i f i e d ob jec t .

RELEASE (OBJ)

The RELEASE command opens t h e gr ipper t o the re lease opening s p e c i f i e d i n t h edatabase f o r the s p e c i f i c OBJ a t i t s current locat ion.

PAUSE

Each l e v e l has a pause command. When rece ived, it passes a "pause " down, and adone back up t o the l e v e l above.

The E-MOVE l e v e l i s the on ly l e v e l that i s cu r ren t l y i n te r f aced w i th the v i s ionsystem. The v i s i o n system i s capable o f many complex operat ions inc lud ing v i s u a lservoing a t f rame r a t e s , and comparison o f the current image with t h e expected imageas determined f r o m a wor l d model. Current ly , however, only two v i s i o n commands areused by t h e c o n t r o l system. They are:

FLOOD-FLASH (OBJ , EXPECTED RANGE)

The name o f the OBJ and the expected range o f the ob jec t a re passed t o t h ev i s i o n system. The v i s i o n system accesses the v i s i o n database t o acqui re the f e a t u r evalues o f the object , and compares these fea tu res t o t h e o b j e c t o r o b j e c t s i n i t sf i e l d o f view. It loca tes the image o f the co r rec t ob jec t and re tu rns the x and yo f f s e t i n mm i n camera coordinates o f t h e o b j e c t and t h e r o l l angle o f the o b j e c t .It a l s o re tu rns the range o f the ob jec t based upon an assumed surface or ien ta t ion .

LINE-FLASH (OBJ, EXPECTED RANGE, EXPECTED SURFACE-NORMAL-VECTOR)

Upon r e c e i v i n g t h i s command, the v i s i o n system takes a 2 - l i n e s t r uc tu redl ight picture. This p i c t u r e reveals the range and surface o r i e n t a t i o n o f t h eobserved object. I f the measured sur face o r i e n t a t i o n and range do n o t match witht h e expected sur face o r i e n t a t i o n and range, then the v is ion system re tu rns a " l i n e -f l a s h f a i l " . Otherwise it returns the measured range. Severa l o f the t e s t p a r t smanufactured i n the NBS experimental f ac to ry have iden t i ca l top surface dimesionsand can only be dist inguished by t h e i r thickness. The l i n e f l ash command i s used t ov e r i f y that the co r rec t pa r t was being observed. Ranges could b e resolved t o -2%.T h i s y ie lds , f o r t h e viewing distance used, approximately lmm. reso lu t ion . Surfaceo r i e n t a t i o n can be determined t o approximately 2%. The v i s i o n system funct ionedwithout problem i n a l l o f the ambient l ight cond i t ions experienced, and con ta inshardware and a lgor i thms t o he lp a l l e v i a t e problems usua l ly encountered i n dea l ingwith highly r e f l e c t i v e parts.

19-12

Page 13: RCS: The NBS Real-Time Control - NIST

2.2.3 PRIMIT IVE L e v e l

The PRIMITIVE l e v e l i s the l e v e l which i n t e r f a c e s wi th t h e r o b o t and g r i p p e r .The NBS c o n t r o l sys tem f u l l y suppor ts having m u l t i p l e systems ( t h e robot and theg r i p p e r c o n t r o l l e r f o r example) funct ioning s imul taneous ly . The PRIMIT IVE l e v e lgene ra tes i n t e r m e d i a t e p o i n t s along a t r a j e c t o r y d e f i n e d by t h e E-MOVE l e v e l , andpasses these p o i n t s t o t h e r o b o t dependent c o n t r o l l e v e l s . The E-MOVE l e v e l a l s opasses t o t h e P R I M I T I V E l e v e l a p o i n t e r t o t r a j e c t o r y parameters i nc lud ing maximuma c c e l e r a t i o n , speed, e t c .

GOTO (POINT)

The GOTO command will cause the robot t o move i n a s t r a i g h t l i n e t o t h e d e s i r e dpoint . As it nears t h a t p o i n t i t d e c e l e r a t e s and s tops a t t h e d e s t i n a t i o n p o i n t .

GOTHRU (POINT)

The GOTHRU command i s i d e n t i c a l t o t h e GOTO command except tha t the robo t doesnot dece le ra te as it approaches the commanded po in t . A "done" i s re tu rned t o t h eE-MOVE l e v e l when t h e r o b o t comes within a breakpoin t d i s tance o f t h e s p e c i f i e ddes t ina t ion . The E-MOVE l e v e l then sends the next po in t w h i l e robot cont inues t omove.

APPROACH-POSITION-FINGERS (END-EFFECTOR-PARA-PTR)

The system database inc ludes an end - e f fec to r parameter t a b l e which s p e c i f i e sthe approach opening, departure opening, and g r i p opening f o r each par t . The E-XOVEl e v e l passes a p o i n t e r t o t h i s t a b l e t o the PRIMITIVE l e v e l . The APPROACH -POSITION -FINGERS command passes a command and data t o the gr ipper c o n t r o l l e r t o open thegr ipper t o the approach -opening o f a s p e c i f i c ob ject . I f t h e gr ipper , f o r somereason, cannot ca r r y out that command, a " g r ip f a i l u r e " i s r e p o r t e d t o t h e E-MOVEl e v e l .

DEPARTURE -POSITION-FINGERS (END-EFFECTOR-PARA-PTR)

DEPARTURE -POSITION -FINGERS i s the same as t h e APPROACH -POSITION -FINGERS exceptt h a t the departure -opening i s passed t o t h e gr ipper c o n t r o l system ins tead o f theapproach -opening.

IMMED-GRASP (END-EFFECTOR-PARA-PTR)

T h i s command d i r e c t s t h e gr ipper c o n t r o l l e r t o c lose t h e gr ipper un t i l thed e f a u l t f o r c e o f 100 l b s i s encountered on the f ingers. Then the par t s i z e pointedt o by END-EFFECTOR-PARA-PTR i s checked against the cu r ren t f i nge r spacing of t h egr ipper . I f t h e two values do n o t match within to lerance, t h e PRIMITIVE l e v e lr e t u r n s a *'grip f a i l u r e " t o the E-MOVE level .

PAUSE

Reports done t o t h e l e v e l above, and d i r e c t s the lower l e v e l t o PAUSE.

2.2.4 Below the PRIMITIVE Leve l

2.2..4.1 Robot I n t e r f a c e

The PRIMIT IVE l e v e l prov ides the robo t nine numbers every cyc le . These ninevalues are the x, y, z coordinates of the cen te r of the w r i s t p l a te , de f i n ing i t s

19-13

Page 14: RCS: The NBS Real-Time Control - NIST

p o s i t i o n i n space; the x, y, z va lue o f a unit v e c t o r p o i n t i n g no rma l t o the wristp l a t e de f i n ing i t s o r i e n t a t i o n , and t h e x, y, z va lue o f a uni t v e c t o r d e f i n i n g th er o t a t i o n o f the w r i s t p l a t e . T h i s s p e c i f i c a t i o n o f the p o s i t i o n o f the r o b o t isunambiguous, and may be s u f f i c i e n t l y generic that it ( o r a s i m i l a r i n t e r f a c e ) canprov ide t h e b a s i s f o r a standard a t some t i m e i n the f u t u r e . The c o o r d i n a t i o n o fj o i n t m o t i o n t o ach ieve t h e r e q u i r e d pose i s r o b o t dependent and may be per fo rmed bvthe robo t c o n t r o l l e r , o r by another c o n t r o l l e v e l .

2.2.4.2 Gr ippe r I n t e r f a c e

Current ly, only t w o commands are being used.

POSITION (GRIPPER -OPENING, FORCE, SPEED)

This command will servo t h e gripper t o the s p e c i f i e d opening a t the S p e c i f i e dspeed. I f the f o r c e on t h e f i nge rs exceeds the s p e c i f i e d f o r c e b e f o r e the g r i ppe rsa re within t o l e r a n c e o f the s p e c i f i e d opening, a " g r i p f a i l u r e " i s re turned.

GRASP (GRIPPER-OPENING, FORCE, SPEED)

The gr ippers are c losed a t the s p e c i f i e d speed un t i l t h e f o r c e on t h e f i n g e r sexceeds the s p e c i f i e d force. The gr ipper c o n t r o l l e r cont inua l ly r e t u r n s t h e cur ren tgripper -opening.

2.3 EXAMPLE

I n order t o b e t t e r understand the task decomposition performed by t h e TASK,E-MOVE, and PRIMITIVE l e v e l s consider the command

TRANSFER FLAG FROM TRAY TO FIXTURE

passed t o the TASK LEVEL. Th is command would be decomposed i n t o :

MOVE-TOLOCATEPICKUPMOVE-TORELEASEMOVE-TO

TRAYFLAGFLAGFIXTUREFLAGFIXTURE-SAFE

These commands would then be implemented by the E-MOVE leve l .

The E-MOVE l e v e l must decompose each o f these commands i n t o s t i l l f i n e rcommands. The most complex o f these commands i s MOVE-TO TRAY so we will describethat command's decomposition.

A t some previous t ime, a user o f RCS would have entered data i n t o the formssystem. Th i s data would speci fy geometry o f each part, l o c a t i o n o f each point ,approach and departure paths t o be f o l l o w e d t o / f r om named loca t ions , and in te rmed ia tet r a j e c t o r i e s . The E-MOVE l e v e l would successively access the departure t r a j e c t o r yfrom i t s cur ren t loca t ion , t h e in te rmed ia te t r a j e c t o r y , and the approach t r a j e c t o r yt o the f ina l goal po in t , issuing GOTHRU and GOTO commands t o the PRIMITIVE l e v e lf o r each o f those po in ts . When the l a s t GOTO has been completed by the PRIMITIVEl e v e l , the E-MOVE l e v e l has completed i t s task and it r e t u r n s a done s t a t u s t o theTASK l e v e l .

19-14

Page 15: RCS: The NBS Real-Time Control - NIST

. . . . . . .

WI-

2v)I-XWx.. , .

. . . .

W

-1r

WI-:IncXW

f. . . .

I

0. . . . . . . . . .. . . . . .

wa dv)

2 2. . . . . . . . . .8. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . .

n

dIf_s{$

rjv)

e *. . . .

s a 6%w,Y. . . . . . . . . . . . . . . . . .. . . . . . . .

N

w-1

r

s . . . . . . . .N.... . . . .

ct

wzw 3fs0

. . . . . . . . .. . . . . . . .

Jcna d< <n u

s s s%Yw,. . . . . . . . . . . . . . . . . . .. . . . ....

0

W

3 . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . .

19-15

Page 16: RCS: The NBS Real-Time Control - NIST

The PRIMIT IVE l e v e l c a l l s an RCS f u n c t i o n (STLINE) t o c a l c u l a t e a s t r a i g h t l i nepath between the c u r r e n t l o c a t i o n and the goa l passed t o t h e PRIMIT IVE l e v e l f romE-MOVE. The move c a l c u l a t e d i s t h a t t o be made by the end p o i n t o f t h e r o b o t hand,but i n add i t ion , t h i s l e v e l c a l c u l a t e s the m o t i o n t o be made by the r o b o t w r i s t andf i nge rs t o cause a smooth t r a n s i t i o n f r o m the present o r i e n t a t i o n t o that o f the g o a lp o i n t .

2.4 STATE TABLES

As has been d e s c r i b e d p r e v i o u s l y , t h e task decomposi t ion within a c o n t r o l l e v e li s p r i m a r i l y per fo rmed through a s t a t e tab le . Each p o s s i b l e command t o a c o n t r o ll e v e l will have a corresponding s t a t e t a b l e which will execute when that command i sreceived.

To b e t t e r understand the way in which s t a t e t a b l e s a r e used, we exp la i n t h eACQUIRE s t a t e t a b l e i n some d e t a i l .

Looking a t f i g u r e 8, the input v a r i a b l e s i n t h e upper l e f t o f t h e s t a t e t a b l eare the " tab le t e s t var iab les " which represent feedback var iab les f rom the lowerl e v e l and f r o m sensory systems, as w e l l as the values o f i n t e r n a l va r iab les . Everycyc l e o f the c o n t r o l system each o f these va r i ab les i s compared wi th the t e s t condi -t i o n s i n each and every l i n e o f the s t a t e table. A l i n e i s s a i d t o match the t a b l et e s t v a r i a b l e i f every input va lue i n that l i n e matches the t a b l e t e s t v a r i a b l e ' svalue. I f no l i nes , o r more than one l i n e matches, a STATE-TABLE e r r o r has occured.'If e x a c t l y one l i n e matches then t h e procedures i n the output s e c t i o n o f tha t l i n eare executed. Figure 9 shows most o f the procedures c a l l e d by ACQUIRE. There areno r e s t r i c t i o n s as t o what a procedure must o r must not do. However, they willgenera l l y pass commands t o the next lower l e v e l s i n t h e h ie ra rchy , process sensorydata, pass s ta tus back t o the higher levels, and se t the in te rna l machine s t a t e . I nthe cur ren t RCS, procedures are coded i n an NBS developed language c a l l e d SMACRO.However, any language would be su f f i c ien t .

We must emphasize that we have no i n t e r e s t a t t h i s t ime in de f in ing a standardlanguage f o r programming such procedures. I n fact, given today's sta te - of - the - ar t ,we be l i eve any such e f f o r t would f a i l . Ins tead we are pursuing standard i n t e r f a c e s ,and a standard structure based on h ie ra rch ica l decomposition and communicating l e v e l so f t h e hierarchy. The language used f o r s p e c i f i c computation seems t o be o fsecondary Importance. Because t h e use o f SMACRO I s n o t a pr imary issue, we will n o tpresent the syntax o r features o f SMACRO. Some SMACRO procedures (with obvious meaningwill be shown, but on ly f o r the purpose o f explaining what i s done.

The tab le t e s t var iab les determine when commands should be executed. The tab let e s t var iables f o r the s t a t e tab le ACQUIRE are:

- new command.

True, i f and on ly i f a new command has been received f r o m the l e v e l above. Whenany command i s sent, a command number i s incremented and sent along with thecommand. This incremental -command -number i s used by a l e v e l t o t e l l i f acommand i s new. A preprocessing r o u t i n e which executes each and every cyc les e t s the new-command f lag i f a new incremental -command -number i s received.

- ref.-command -in

The command received by a lower l e v e l i s echoed back.

- s ta tus - in

19-16

Page 17: RCS: The NBS Real-Time Control - NIST

COMMANDRELATEDPROCEDURES

*X SET-SOURCE

source-locpt-plr-in = > locpt-plr-outobi-ptr-in = > obj-ptr-out

source-locpl-ptr-in = > remember -current-locfalse = > apoint-pos-flag

PRINT" SET-SOURCE "

end-routine

#X LOCATE

obj-ptr-in = > obj-ptr-outsource-locpt-plr-in = > locpl-ptr-outlocate = > output-commandPRINT" LOCATE "

end-routine

#X MOVE-TOobi-ptr-in => obj-ptr-outmove-lo = > output-commrndPRINT" MOVE-TO "

end-routino

X# MOVE-TO-OBJobj-ptr-In > obj-ptr-outmove-to-o => output-commandPRINT" MOVE-TO-OBJ "

end-routine

#X PICKUPobj-ptr-In => obj-ptr-oulpickup = > output-commandPRINT" PICKUP "

true = > obi-acquirdobi-ptr-in = > obi-now-in-gripprobj-now-in-grippr = > gripp~ -obj - ptr -out - l- om~ocall REMOVE-FROM-BUFFER-DB

end-routine

STATUSRELATEDPROCEDURES

X# EXECUTING

executing => status-reportPRINT" executing = >slatus -report "

end-routine

#X DONE

done = > status-reponPRINT" done = >status-repot-l"

end-routine

## PIC = > FAILURE

pic = >failurePRINT" PIC =>FAILURE "

falro = > obi-acquirednull-obi = > obi-now-in-grippornull-obj = > grippod-obj-plr-oul-to-omove

md-routlne

I#CMD= >FAILURE

cmd => failurePRINT" CMD = >FAILURE "

ond-roullno

#IMOVE = >FAILURE

movo => failurePRINT" MOVE= >FAILURE "

null-loc. = > romombor -current-loc

ond-routino

Figure 9. SMACRO Procedures Used by ACOUIRE

19-17

Page 18: RCS: The NBS Real-Time Control - NIST

The s ta tus o f t h e lower l e v e l : Execut ing, Done, o r Fa i led.

cur - s t a t e

A n i n t e r n a l v a r i a b l e used f o r sequencing through t h e s t a t e s o f a s t a t e t a b l e .S p e c i f i c s t a t e v a r i a b l e s a r e n o t requ i red. S e v e r a l o f t h e s t a t e t a b l e s used i nthe November R u n d i d n o t use a s t a t e v a r i a b l e f o r sequencing.

loc - o f - ob j

The ACQUIRE command gives the l o c a t i o n o f t h e o b j e c t t o be acquired. Thedatabase i s accessed t o de te rm ine i f v i s i o n i s r e q u i r e d t o l o c a t e t h e p a r t a tt h a t l o c a t i o n . I f v i s i o n i s r e q u i r e d , t a b l e t e s t v a r i a b l e loc - o f - ob j = v i s i o n -reqd, o the rw ise loc - of - obj does n o t equal vision - reqd.

ob j - acquired

T h i s f l a g i s an i n t e r n a l f l a g which will be t r u e i f the re i s c u r r e n t l y an o b j e c ti n the r o b o t gr ipper .

Source -spec.

T h i s f l a g will be f a l s e i f the SOURCE l o c a t i o n has n o t been s p e c i f i e d .

When t h e ACQUIRE command i s f i r s t rece i ved , t a b l e - t e s t - v a r i a b l e new-commandwill be true, ref-command -in will be "pause ", and s ta tus - in w i l l be "done". Onlyl i n e s 1, 2, 3, o r 4 o f s t a t e t a b l e ACQUIRE cou ld possib ly match.

Assuming the ACQUIRE command was legal , e i t h e r l i n e 1 o r 4 will match dependingon loc - of- obj . I f loc - of - obj equals vis - reqd then v i s i o n i s required. L i n e 4matches, and command MOVE-TO i s issued t o the E-MOVE l e v e l . (Note tha t MOVE-TOi s i t s e l f a procedure but i t s e f f e c t i s simply t o i s s u e t h e MOVE-TO command.) I nt h e case tha t the SOURCE l o c a t i o n i s a p a l l e t o f some type, a sector - number will besent f rom the WORKSTATION as p a r t of the ACQUIRE command, and t h e robo t will move t ot h e c o r r e c t viewing pose f o r that sec to r . T h i s will be addressed further i n sec-t i on 3.2. Procedure 2-NEXTSTATE s e t s cur - state t o 2. While t h e robot i s moving,the s ta tus - in value will be "executing " and l i n e 15 will match. Eventual ly ther o b o t will reach t h e s p e c i f i e d goa l po in t , t h e E-MOVE l e v e l will r e p o r t s t a tus - in =done, and l i n e 6 will match. The var iab le cur - state will be s e t t o 3, and procedureLOCATE commands the E-MOVE l e v e l t o l o c a t e the s p e c i f i e d o b j e c t us ing v is ion .LOCATE re turns t h e x and y o f f s e t s and r o l l angle which will place the r o b o t g r i p p e rd i r e c t l y over the ob jec t , al igned w i t h the ax is o f the object. Whi le LOCATE i sexecut ing, the TASK l e v e l s t a t e tab le f o r ACQUIRE will again match on l i n e 15.When LOCATE completes, s ta tus - in will equal done, and l i n e 7 will match. The pro-cedures executed i n l i n e 7 will s e t t h e NEXTSTATE t o 5, and will execute procedurePICKUP. PICKUP passes an ob jec t - po in te r down t o t h e E-MOVE l e v e l so t h e PICKUPcommand can use the database t o determine the expected s i z e o f the ob jec t t o begrasped and compare it with t h e ac tua l f i n g e r spacing a f t e r the grasp operat ion;passes t h e command PICKUP t o the E-MOVE l e v e l ; se ts t rue i n t o ob jec t - acqu i redbecause as soon as t h e pickup completes, an o b j e c t will be i n the gr ipper ; ands e t s an o b j e c t p o i n t e r t o i n d i c a t e what i s c u r r e n t l y i n t h e gripper.

When the E-MOVE l e v e l r e p o r t s the PICKUP command i s done, l i n e 8 o f the ACQUIREs t a t e t a b l e matches and the ACQUIRE command i s complete. A PAUSE i s sent down t othe next lower l e v e l , a DONE i s r e p o r t e d back t o the WORKSTATION, and the next s t a t ei s s e t t o t h e done-state. From then on, l i n e 9 will match u n t i l a new command i sreceived.

19-18

Page 19: RCS: The NBS Real-Time Control - NIST

When ACQUIRE i s a new command and the loc - of - obj i s n o t equal t o vis- reqd, thenv i s i o n i s n o t r e q u i r e d . L i n e 1 will match, and the MOVE-TO-OBJ command w i l l r e s u l ti n the g r i ppe r being opened t o t h e approach -opening o f the named o b j e c t , and t h er o b o t moving t o t h e sou rce l o c a t i o n . When the MOVE-TO-OBJ i s done, l i n e 5 matchesand f r o m t h e r e e x e c u t i o n proceeds as a l ready descr ibed f o r t h e case where v i s i o n i srequ i red .

L i n e s 10 t o 13 handle t h e s e v e r a l t ypes o f f a i l u r e s which may occur . I n t h e s es p e c i f i c cases, no e r r o r r e c o v e r y was attempted. The type o f e r r o r i s s implyr e p o r t e d t o t h e l e v e l above v i a t h e v a r i a b l e " f a i l u r e " passed t o t h e WORKSTATION.

I f , when ACQUIRE was f i r s t rece i ved , e i t h e r and o b j e c t has al ready beens p e c i f i e d o r t h e source i s n o t s p e c i f i e d , l i n e s 2 o r 3 would match because t h ecommand i s i l l e g a l . Procedure CMD=>FAILURE p r i n t s a message, and s e t s the w o r d"command " i n t o a v a r i a b l e f a i l u r e " which will be r e t u r n e d t o t h e WORKSTATION t oi n d i c a t e the type o f f a i l u r e which occurred. Procedure F-NEXTSTATE s e t s v a r i a b l ec u r - s t a t e t o a value i n d i c a t i n g a f a i l u r e . I n t h i s f a i l u r e case, l i n e 14 willmatch on the next cyc le , commanding the lower l e v e l t o PAUSE and returning a f a i l t othe l e v e l above. L i ne 14 will cont inue t o be executed u n t i l a new commmand i srece ived.

The o t h e r s t a t e t a b l e s and procedures look and funct ion s i m i l a r t o the ACQUIRE.

3. COMMON MEMORY

The communications b u f f e r s , d i c t i o n a r y , and database a l l r e s i d e i n common memory.

3.1 COMMUNICATION BUFFERS

A l l communication between the c o n t r o l l e v e l s , sensory systems, robot, g r ipper ,and o t h e r subsystems occurs v i a the common memory communications bu f fe rs . A con-venient u s e r i n t e r f a c e t o the communication system makes a l l o f t h e implementat iond e t a i l s o f communication transparent t o the user. To e f f e c t the t rans fer o f any s e to f var iab les i n any c o n t r o l l e v e l o r subsystem t o a corresponding set of v a r i a b l e si n any other c o n t r o l l e v e l o r subsystem t h e user completes the fo l l ow ing form:

Preprocess namePostprocess nameTRANSFER-FROM LEVEL BUFFERTO-DESTINATION LEVEL BUFFER

The f i r s t two names, Preprocess name and Postprocess name, p e r m i t t h e use r t os p e c i f y a l i s t o f r ou t i nes t o execute be fo re the data i s t r ans fe r red and a f t e r t h edata t r a n s f e r i s complete. The Preprocessing and Postprocessing rou t ines can be usedt o handle any s p e c i a l handshaking p r o t o c o l s required. The source o f the data i ss p e c i f i e d by giv ing the c o n t r o l l e v e l name and t h e name o f t h e l i s t o f va r i ab l es t obe t rans fe r red . The d e s t i n a t i o n f o r the data i s s i m i l a r l y s p e c i f i e d by g iv ing thel e v e l and b u f f e r names. Natura l l y , the type and number o f da ta i t e m s must be i d e n t i -c a l i n bo th source and des t i na t i on b u f f e r s but the names o f t h e da ta i tems themselvesa r e a r b i t r a r y .

A t the hardware l e v e l t h e communication system t rans fe rs data every cycle.Every c y c l e t h e source b u f f e r s a re t r a n s f e r r e d i n t o the common memory communicationbu f fe rs . The des t i na t i on b u f f e r s are updated app rop r i a te l y f r o m common memory.

F igure 10 shows the command and s t a t u s b u f f e r s t r a n s f e r r e d i n the current r o b o ta p p l i c a t i o n o f RCS.

19-19

Page 20: RCS: The NBS Real-Time Control - NIST

COMMANDS

WORK STATION

COMMANDS TOE-MOVE

1FROM

STATUS RETURNTO TASK

input-command -rar

cycle-cnt-#-ininc-command -#-ina-input-commanda-obi-namo-ina-rourccloept -namo-ina-dost-locpt-namcinr-ond-at-locpt-namo-insoctor-in

output-command-rar

cyciecnt -#-outinc-command -#-outoutput-command

locpt-ptr-outobl-ptr-out

apoint -pol-flaggrlppod-obj-ptr-out-to-o~novoWb-ptr- .mo*cout

TASK LEVEL

STATUSRETURN TOWORK STATIONI

output -status-rar

~y~io - cnt - #- stalus - ~utcycIe-cnt-#-uho-ouIinc-command-X-ocho-outref-command -whoo I a p s . d - t i m e ~ t a t ~ ~ - o ~ tstatus-reportstatus-paramatn -outputiailure

input-status-rar

cyclo-cnt-#-status-incycIo-cnt-#-~tat~s -ocho-ininc-command -#-.cho-in1.1-command-instatus-instatus-paramotu -in

4

E-MOVE

Input-sommand-war

cycltcnt -#-InInc-command4 -InInput-commmdo#-ptr-Inlocpt-ptr-Inapolnt-pos-fbggrippw-obj-ptr-Inmortabptr-in

output-comnund-ror

cyclwnt -#-outlnc-command4 -outoutput -commmdobj-ptr-outpou-plr-out~noviabptr -outtrai-p.ra-pt~-outmd-Mactor-pora-ptr-outgripw-oej-ptr-aut

COMMANDS TOPRIMITIVE1

output-status-rar

cycIMnt -X-atatua-outc~cto -cntJ-uho-outinc-command-X-ocho-outroi-emnund -rhoautus-r.portiallura

input-status-war

cycl.-cnt-#-statua-incycIo-cnt-#-stalus-.ckinInc-commmd-#-scho-inrd-command-Instotus-inIaiIuro-in

tSTATUS FROMPRIMITIVE

Figure 10. Communications

19-20

Page 21: RCS: The NBS Real-Time Control - NIST

COMMANDS TOPRIMITIVE LEVEL1input-command -var

cycle-cnt-#-ininc-command -#-ininput-commandobj-ptr-inpose-ptr-inmovtab-ptr-intra j-para-ptr-inend-effector -para-ptr-in

output-command -var

cyCI.-Cnt-#-Outinc-command -#-outoutput-commandnext-position-outstop-f

tSTATUS RETURNEDTO E - MOVE

output-status-var

cycle-cnt-#-status-outcycle-cnt-#-echo-outinc-command-(1-echo-outref-command -echoelapsed-time-status-outstatus-reportfailure

input-status-var

cycle-cnt-#-status-incyclo-cnt-#-status-who-inlnc-command -#-ocho-inref-command-Inelapsod-time-status-instatus-Instatus-parameter -indirt-to-gp

I STATUS FROM COORD. JOINT

COMMANDS TO COORDINATED JOINT LEVEL

output-gripper-roq-var

inc-command -#-grippor-outgripper-commrnd -outforce-gripper-outsize-grlppor-outvol-grippu-out

\grippor-Input-vats

grippor-inc-command -#-who-ingrip-rof-cmdgrlppor-status-Ing-status-argfingor-position-inloft-fingor-forco-inright-fingor-foro-invelocity -in

right-touch

STATUS FROM GRIPPER CONTROLLER

I~f t - to~ch

COMMAND TO GRIPPER CONTROLLER +

Figure 10. Primitive Level Communication (Continued)

19-21

Page 22: RCS: The NBS Real-Time Control - NIST

anys t a t

x-Val y-Val

X1 Y1x2 Y2x3 Y3

Although the RCS C o n t r o l l e v e l s execute once per c y c l e t h i s does not mean that

z- Val “mov-name” “pose-name‘‘

212223

l e v e l must n e c e s s a r i l y respond i n one cyc le . From the p o i n t o f v i ew o f t h ee t a b l e s and procedures, each l e v e l i s f u l l y asynchronous.

3.2 DATA-The c o n t r o l l e v e l s d iscussed above a r e on l y one- half o f an a p p l i c a t i o n s o l u t i o n ,

Def in ing the geometry o f each pa r t , and the l o c a t i o n o f each p o i n t i s a l s o importa n t .One of t h e pr imary o b j e c t i v e s o f t h e NBS C o n t r o l System i s t o ensure that , t o t h emaximum e x t e n t p o s s i b l e , commands are d a t a dr iven. Changes t o t h e p a r t geometry o rp h y s i c a l l a y o u t o f t h e workspace will not change the a lgor i thms a t a l l -- o n l y t h edata. Eventual ly , t h i s data will be ente red au toma t i ca l l y f r om manufacturingdatabases conta in ing t h e w o r k s t a t i o n layout , p a r t geometry, e t c .

The data which t h e user e n t e r s i n t o t h e system d e f i n e i n f o r m a t i o n r e l a t i n g t o :

1. Objects, their g r i p s i z e and g r i p l o c a t i o n on t h e o b j e c t , and a p o s i t i o n f r o mwhich t o v i e w each g r i p loca t ion .

2. Locations i n the workspace such as f i x t u r e s , tab les, t rays, etc. Included i nt h i s data i s the l o c a t i o n o f these po in ts , and i n the case o f a r rays o f p o i n t s

such as p a l l e t s ) t h e geometry o f the arrays.

3. T ra jec to r i es which def ine how t o move f rom one loca t i on i n the workspace t oanother.

All o f the s t a t e tab les and procedures a r e w r i t t e n using symbolic v a r i a b l e s .C o n t r o l l e v e l s attach data t o these symbolic values only when the data i s needed.The mechanisms which access the data s t r u c t u r e are system procedures, almost t o t a l l ytransparent t o users, s t a t e tab les, and c o n t r o l l e v e l procedures.

I n RCS, p o s i t i o n and par t data.are entered using a Forms System. The actualdata i s s to red i n the common memory, but a l l o f the d e t a i l s o f s t o r i n g and accessingt h i s data are transparent t o the user.

3.2.1 Poses

The most fundamental element o f data requi red f o r robo t programming i s t oassociate a s p e c i f i c p o s i t i o n and o r i e n t a t i o n i n space space with a name.

POSE FORM

name

0..

The XI, y l , 21, x2, y2, 22, and x3, y3, 23 values define the coordinates o f the robotw r i s t p l a t e , a unit vector def in ing the o r i e n t a t i o n o f the w r i s t p l a te , and a unitvec to r def in ing t h e w r i s t p l a t e ro ta t i on . Together, the coordinates o f these pointsunambiguously def ine the exact p o s i t i o n and o r i e n t a t i o n o f the robot. The n i n erequi red values can be entered by moving the robot t o the desired p o s i t i o n i n spaceand hi t t ing the “ learn“ button on t h e joys t i ck . I n t h i s case the n i n e values (x1

19-22

Page 23: RCS: The NBS Real-Time Control - NIST

t o 2 3 ) will be en te red automat ica l ly . The nine va lues can a l s o be e n t e r e d f r o mthe keyboard i f these values a r e known.

type d e l d e l d e l

Column f o u r o f the POSE-FORM can be blank o r can c o n t a i n t h e name o f a movtab le .

"movtab-name"

Movtables are used t o s p e c i f y o f f s e t s f r o m any r o b o t pose. Mov tab les will bediscussed i n more d e t a i l i n t h e nex t s e c t i o n .

W

h

The above POSE d a t a t o g e t h e r de te rm ine an exact p o s i t i o n and o r i e n t a t i o n ( c a l l e d

0 0 23 0 0

a pose) i n space. Every such d e f i n e d pose must be g iven a name. T h i s name i sen te red i n column f i v e of t h e POSE-FORM. As many poses as d e s i r e d can be en te red i nt h e POSE-FORM. Each pose name r e p r e s e n t s a pose i n space.

3.2.2 Movetables

It i s o f t e n des i r ab le t o d e f i n e p o s i t i o n s r e l a t i v e t o some s t a r t i n g pose,independent o f where i n space that s t a r t i n g pose i s . The v e h i c l e f o r s p e c i f y i n g suchr e l a t i v e o f f s e t s i s a movtable and t h e f o r m i s a MOVTAB-FORM.

MOV TAB-FORM

w, hho, wo

r

X

P i tr o l l

YYaw

z

...name

Movtables spec i f y o f f s e t s f r o m the current robot pose. Each l i n e o f MOVTAB-FORMs p e c i f i e s a s p e c i f i c move. There a r e f i v e coord inate systems which can be used t od e f i n e the o f f s e t s :

World -

Handwrist -

x, Y,

Hand o r i g i n - x, Yr o t a t e

W r i s t o r i g i n - x, y

F i n g e r r o l l - X

Trans la te t o o l p o i n t along a v e c t o r de f ined f o r t h ework space.

Trans la te t o o l po in t along a v e c t o r def ined i n t h ehand.

Ro ta te p i t c h (x ) and yaw (y) about the currentp o s i t i o n o f the f ingers, leaving t h e t o o l po in tf i x e d i n space.

Rotate i n p i t c h (x) and yaw (y) l eav ing w r i s t p o i n tf i xed i n space.

R o t a t e f i n g e r s around the center l i n e between t h ef ingers.

19-23

Page 24: RCS: The NBS Real-Time Control - NIST

A movtableRCS i n t e r p r e t sp h y s i c a l mo t ionr o b o t will make

r e f appro grasp grasp

can d e f i n e any combinat ion o f up t o e igh t t r a n s l a t i o n s and r o t a t i o n st h e l i n e s i n the o r d e r i n which they a r e l i s t e d i n the t a b l e . The '

o f the r o b o t i s t h e r e s u l t a n t o f a l l t he l i n e s o f the movtable. Theone smooth move f r o m i t s o r i g i n a l l o c a t i o n t o the r e s u l t a n t

depart

d e s t i n a t i o n .

"ob ject name " g r i p s i z e s i z e fo rce

3.2.3 O b j e c t s

s i z e

The u s e r o f RCS s p e c i f i e s the re l evan t f e a t u r e s of t h e o b j e c t s t o be manipul ated

FLAG

using t h r e e forms:

1

GRIP - SIZE, GRIP-LOCPT-MOVTAB FORM, and VIEW-LOCPT-MOVTAB FORM. F i r s t , we

FLAG

descr ibe t h e GRIP - SIZE FORM.

2

GRIP - SIZE FORM

r e f r e f r e f g r i p"ob j-name" g r i p 11 type "loc-name" "mov-name"

FLAG

0..

. 1 $$$

Column one o f GRIP-SIZE spec i f i es the ob jec tre ference g r i p IC. For each g r i p pos i t i on o fgrasp s i z e , grasp force, and depart s i z e canapproach s i z e and depart s i z e de fau l t t o the

FLAG

name, and column two s p e c i f i e s t h eeach ob jec t a gr ipper approach s i z e ,be specif ied. I f no t s p e c i f i e d , t h egripper f u l l open s ize , and t h e grasp

2

fo r ce de fau l t s t o 100 l b s i n t h e c u r r e n t l y running system. Each named ob jec t mayhave many r e f g r ip I ' s . A separate l i n e i s completed f o r each g r i p pos i t ion .

Form GRIP-LOCPT-MOVTAB FORM i s used t o spec i fy the o f f s e t s requ i red t o def ineg r i p posi t ions.

GRIP-LOCPT-MOVTAB FORM

FL-GRIP-V

FL-GRIP-VR

0.0

For each par t , and each gr ip pos i t ion , a movtable must be spec i f i ed t odef ine (as described i n sec t i on 3.2.2) the o f f s e t s f rom the ob jec t o r i g i n t othe desi red g r i p or ien ta t ion . It i s possib le that the o r i e n t a t i o n o f the robotgr ipper may be d i f f e r e n t f o r d i f f e r e n t loca t ions o f the part. For example, g r i pp o s i t i o n 1 f o r ob jec t FLAG when the FLAG i s on the bu f fe r tab le may r e q u i r e as l i g h t l y d i f f e r e n t robot gr ipper p o s i t i o n than i f the FLAG i s i n the machine t o o lf i x tu re , I f there i s a dependence, then the g r i p pos i t i on e n t r y may be qua l i f ied .

19-24

Page 25: RCS: The NBS Real-Time Control - NIST

The l o c a t i o n name where the rnovtable s p e c i f i e d i s t o be used i s e n t e r e d i n columnfour r e f "loc-name", and the r e f type of tha t l o c a t i o n (pose, l o c a t i o n p o i n t , o rarray) i s entered i n column t h r e e r e f type. The wi ld - card symbol $ $ $ can be used i ncolumn four t o i n d i c a t e " a l l l o c a t i o n s n o t o the rw ise spec i f i ed . "

r e f

I n t h e c u r r e n t l y o p e r a t i n g r o b o t system, a v i s i o n system i s mounted on the r o b o t

v- ref v- ref vu- of fset mov-ref

arm. Depending on t h e l o c a t i o n of a p a r t and on the p a r t i c u l a r r e f g r i p , i t may benecessary t o move t h e r o b o t t o a v iew pose t o observe the p a r t with the v i s i o nsystem. F o r each r e f g r i p o f each pa r t , a t each l o c a t i o n , a v iewing p o s i t i o n canbe s p e c i f i e d us ing VIEW-LOCPT-MOVTAB FORM.

"ob j-name " g r i p

VIEW-LOCPT-MOVTAB FORM

type "1oc-name" "mov-name" type range

1 arr ST-1-A GR-PIC o b j 400FLAG

"loc-name " "pose-name"

BUFF-SAFE BUF-P

"movtab-name"

BUF-SAFE-M

...

-

The ob jec t name and r e f e r e n c e g r i p 11 are en te red i n t h e f i r s t two columns o fVIEW-LOCPT-MOVTAB FORM. The expected range t o the ob jec t i s en te red i n columnseven. (Th is has been proven u s e f u l f o r v i s i o n system.) As i n the case o f g r i pp o s i t i o n s , v iew p o s i t i o n s can be further q u a l i f i e d by spec i f y i ng the name and type(columns th ree and f o u r ) o f a s p e c i f i c p a r t locat ion. The wi ld - card symbol $$$again means "every o t h e r l o c a t i o n e x p l i c i t l y l i s t ed . " Column f i v e s p e c i f i e s t h emovtable which gives the o f f s e t s f o r the v iew pos i t ion . For those l i n e s o f t h etab le which spec i fy a loca t ion , column s i x o f t h e f o r m ind i ca tes whether themovtable o f f s e t s a re with respect t o that locat ion, or w i t h respect t o the ob jec torigin.

3.2.4 Locat ion P o i n t s

A named l o c a t i o n can be defined by spec i fy ing a pose plus a movtable.LOCATION FORM i s used t o spec i fy the loca t ion and o r i e n t a t i o n associated with agiven name.

LOCATION FORM

0..

The ASCI I name o f the loca t ion po in t i s l i s t e d i n colunm one. Thespec i f i ca t i on o f the phys ica l l o c a t i o n and o r i e n t a t i o n associated with that name i sentered i n columns two and three. Column two i s the name o f a pose, and columnthree spec i f i es a movtab name. That movtable gives o f f s e t s f r o m t h e pose, and theresu l tan t l o c a t i o n and o r i e n t a t i o n i s then the "meaning " o f the named point .

19-25

Page 26: RCS: The NBS Real-Time Control - NIST

3.2.5 Arrays

11 # o f

aY

# o f 1 s t 2nd

Of ten , a named l o c a t i o n may n o t be a s i n g l e p o i n t i n space, but may be an a r ro f po in ts . A box o r p a l l e t which conta ins workp ieces i s an example. The cur ren tv e r s i o n o f RCS p e r m i t s one- o r two - d imens iona l a r r a y s t o be g iven a symbol ic name,j u s t as was done f o r p o i n t s . Whenever tha t symbo l i c name i s used as a source o rd e s t i n a t i o n l o c a t i o n o f the r o b o t , RCS will a u t o m a t i c a l l y a d j u s t t h e a c t u a l p o s i t i o no f the r o b o t t o t h e next fu l l p a l l e t p o s i t i o n i f a p i e c e i s be ing grasped o r t o thenext empty p o s i t i o n i f a p a r t i s being re leased.

I' array-name " dim rows

ARRAY-DIM FORM

columns "movtab " I' movtab" p res

ST-1-A 2 3 3 y-st x-st 9

-

"owner-name''

0..

member type "mem-name"

En t r y "array-name'' i s any A S C I I s t r i n g which i d e n t i f i e s t h e array. Column twos p e c i f i e s whether the array i s one- o r two-dimensions. Columns t h r e e and f o u rs p e c i f y how many d i s t i n c t elements t h e r e are i n each row, and i n each column ( f o rtwo- dimensional case). The geometry o f t h e p a l l e t i s de f ined v i a columns f i v e ands ix . These two e n t r i e s a r e t h e names o f movtables which s p e c i f y t h e v e r t i c a l andh o r i z o n t a l o f f s e t s f o r t h e array rows (and columns). F i n a l l y , t h e l a s t e n t r y i si n i t i a l i z e d t o the number o f f i l l e d l o c a t i o n s i n the p a l l e t .

BUFFER

3.2.6 Owners

arr FL-BUF-Aarr BB-BUF-Aa r r BT-BUF-Aa r r HS-BUF-A

Sect ions 3.2.7 and 3.2.8 descr ibe how t o def ine t r a j e c t o r i e s between p o i n t s .

-.

For t h i s s p e c i f i c a t i o n it i s o f t e n u s e f u l t o group a s e t o f l o c a t i o n s under a s ing leowner. T r a j e c t o r i e s can then be s p e c i f i e d t o o r f r o m any o f these p o i n t s with ones p e c i f i c a t i o n t o o r f r o m the owner. Without the a b i l i t y t o aggregate po in t s i n thismanner, the number o f t r a j e c t o r i e s necessary t o ge t f r o m any named p o i n t t o anyo t h e r would grow exponential ly. The f o r m f o r speci fy ing owners i s OWNER FORM.

OWNER FORM

b b .

Column one i s t h e owner name. Columns two and th ree g i ve the type and name o f eachmember.

3.2.7 Approach and Departure T ra jec to r i es

Spec i f i c ob jec ts and s p e c i f i c loact ions will have requirements as t o how t h erobot approaches and departs. The user must enter these values i n form AID.

19-26

Page 27: RCS: The NBS Real-Time Control - NIST

A/D FORM

--

Appr o rdept

5 20 07 200 m t b "name 2"

type "name "

acc 1 v e l 1 smoothf ac max acc

r e f-grip # 1oc-t ype

P P t path - ptbrk - dist type "name "

"1oc-name"

5 20 07 200 m t b "name 'I

dep t obj BOXT 3 $ $ $

5 20 07

dept obj BOXT

5 20 07

200 m t b "name "

3 I P t V-BLOCK

200 m tb V%A/ D-H

aPPr

.e.

a r r ST-1-A

The columns o f fo rm A I D have a header f o r m a t and data format. The headerf o r m a t

Appr o rdept type "name" r e f - g r i p # loc- type " l oc-name"

i d e n t i f i e s t h e t r a j e c t o r y . Column one i d e n t i f i e s whether it i s an approach o rdepar ture t ra j ec to r y . The next two columns i d e n t i f y the s p e c i f i c beginning ( f o rdepar ture) o r end ( f o r approach) o f t h e t r a j e c t o r y . T r a j e c t o r i e s may begin o r enda t ob jects , l o c a t i o n po in ts , arrays, o r owners. Hence, column two must i n d i c a t e oneof these f o u r types. The t h i r d column i s the name o f the l o c a t i o n po in t , array,o b j e c t , o r owners. a r r , o r obj . I f type = o b j a r e f e r e n c e g r i p # i s requ i red , andthe form ent ry may be further q u a l i f i e d by e n t e r i n g a l o c a t i o n type (array o r loca -t i o n p o i n t ) and the name o f the loca t ion . Such q u a l i f i c a t i o n permi ts the same o b j e c tand g r i p p o s i t i o n t o be approached ( o r withdrawn f rom) d i f f e r e n t l y depending onwhere t h e ob jec t i s . The wild - card symbol $$$ an again be used f o r a l l o the rw iseunspeci f ied l o c a t i o n s .

The data format f o r f o r m AID i s :

accf ac

ve1max

smoothacc b rk-d ist

P P ttype

path -pt"name "

The f i r s t four e n t r i e s spec i fy parameters o f mot ion f o r t h i s p a r t o f the t r a j e c t o r y .

Acc- fac s p e c i f i e s the maximum acce le ra t ion , vel-max s p e c i f i e s the maximumv e l o c i t y , smooth -acc spec i f i es a smoothing parameter, and brk - dist determines howc l o s e t o a goa l p o i n t the end - ef fector must come befo re the r o b o t will begin movingt o the next point i n a t r a j e c t o r y . Columns f i v e and s i x spec i f y t h e type and name oft h e s p e c i f i c t r a j e c t o r y po in t o r o f f s e t f r o m the previous reference pose. At r a j e c t o r y p o i n t s must be a pose, l o c a t i o n po in t , o r movtable.

As many t r a j e c t o r y p o i n t s as desi red may be l i s t e d f o r each t ra jec tory .

19-27

Page 28: RCS: The NBS Real-Time Control - NIST

3.2.8 In te rmed ia te T r a j e c t o r i e s

accf ac

Approach and depar ture t r a j e c t o r i e s do not s p e c i f y how t o g e t f r o m t h e l a s t

v e l smooth path - ptmax acc brk - dis t type "name *'

p o i n t of a depar ture t r a j e c t o r y t o t h e f i r s t p o i n t o f an approach t r a j e c t o r y . T h i si s s p e c i f i e d wi th TRAJ FORM.

BUF-STAT

T W FORM

a r r BUFFER a r r STATION

" tra j-name" s ta r t- type " s tar t name " end- type 'Iend-name '*

1010

40 20 600 1 P t BUFF-SAFE40 20 600 l p t BUFF-SAFE

.e .

As with the approach and depar ture t r a j e c t o r i e s , e n t r i e s i n f o r m TRAJ have aheader and a data format. The header format i s :

" tr a j-name" s ta r t -type " s t a r t name" end-type "end-name''

These e n t r i e s i d e n t i f y the t r a j e c t o r y by naming the beginning and end p o i n t s o f t h emove. Column one i s a name given t o t h i s t r a j e c t o r y . Columns two through f i v eare, respec t i ve ly , the type and name o f the s t a r t and end p o i n t s o f the t r a j e c t o r y .The o n l y v a l i d types f o r t h e s t a r t and end p o i n t s a re array, l o c a t i o n po in t , o rowner.

The header format f o r TRAJ FORM has the i d e n t i c a l format, with the i d e n t i c a lse t o f l e g a l values as f o r t h e A I D FORM discussed prev ious ly since, i n both cases,the parameters o f mot ion f o r the robot, and the t r a j e c t o r y po in t s themselves must bespeci f ied.

3.2.9 Data - Control I n t e r f a c e

RCS uses the data entered i n t o the forms system t o set up an in te rna l s t ruc tu rewhich i s then referenced by system procedures. As an example, commands SRC-CALC,DEST-CALC, and END-CALC are are ca l l ed f rom the TASK l e v e l once f o r each newcommand. They use the ob jec t name, and source, dest inat ion, and end-at l o c a t i o nnames t o access the data s t ruc tu res and generate the se t o f named goal p o i n t s whichare t h e des i red path. A t the E-MOVE l e v e l , command NEXT-POINT accesses each nextp o i n t i n t h e t r a j e c t o r y un t i l t h e r e are no more points .

3.3 DICTIONARY

The third major par t o f the common memory i s the dict ionary. The d ic t i ona rycontains records f o r every variable, every procedure, every s t a t e tab le , everyl i s t o f var iab les, and every l i s t o f procedures. It i s the d ic t i ona ry which makesthe i n t e r a c t i v e fea tu res o f RCS possible. #en a procedure name i s typed on t h eterminal, f o r example, the system will l o o k i n the d ic t ionary t o l o c a t e thatprocedure name. Associated with that ent ry i s a po in te r which l o c a t e s the ac tua lprocedure. I n the above example, the procedure would then be executed.

19-28

Page 29: RCS: The NBS Real-Time Control - NIST

The reason f o r the i n d i r e c t p o i n t e r ment ioned above i s so t h a t any p rocedu recan be mod i f i ed and re loaded ( recomp i le ) . A l l r e fe rences t o the m o d i f i e d procedurep o i n t t o t h e i n d i r e c t address. When a procedure i s re loaded, t h e p o i n t e r i s updatedt o p o i n t t o t h e new d e f i n i t i o n of t h e procedure, and a l l re fe rences now, i n d i r e c t l y ,p o i n t t o t h e new d e f i n i t i o n o f the procedure. The bottom l i n e i s , t h e r e f o r e , thatthe d e f i n i t i o n of any procedure o r s t a t e t a b l e can be mod i f i ed , re loaded, and t h ee n t i r e system run wi th t h e new d e f i n i t i o n wi th no o t h e r a c t i o n s r e q u i r e d .

The u s e r shou ld i n t e r a c t wi th t h e d i c t i o n a r y on ly t o d e f i n e v a r i a b l e s , v a r i a b l eowners, f u n c t i o n a l l y bounded modules (procedures) , execut ing owners, l i s t owners,and s t a t e tab les .

A u s e r can d e f i n e a va r i ab le by enter ing VAR "name". That va r i ab le can bei n i t i a l i z e d by enter ing the i n i t i a l value and ! a f t e r t h e v a r i a b l e name.

A l i s t o f va r i ab les can be d e f i n e d by g iv ing t h e l i s t a name, f o l l o w e d by i t smembers.

VO "name o f VO"

V AR "name "

VAR "name"* a .

The values o f every member can be seen by en te r i ng SHOW "name o f VO"on the keyboard. The name o f every va r i ab le will be displayed.

To de f i ne a new procedure one enters :

p "procedure name"body o f procedure

end

A l i s t o f procedures can be defined:

eo "execut ing owner name"p namep nameeo namep name

a * *

As can be seen, executing owners can have o t h e r executing owners as members.When the name o f an executing owner i s en te red on the te rm ina l o r included on t h eprocedure s i d e o f a s t a t e table, a l l o f the procedures i n the executing owner will beexecuted i n the order l i s t e d . Th is mechanism permi ts procedures t o be combined i n t omore complex functions w h i l e s t i l l remaining d i s t i n c t , tes tab le , and i n d i v i d u a l l yexecutable.

A l i s t owner i s a bookkeeping t o o l provided the user t o include anything he/shel i k e s under a symbolic name.

l o " l i s t owner name"namenamename* a *

19-29

Page 30: RCS: The NBS Real-Time Control - NIST

Sta te Tables

S t a t e tab les a r e s t o r e d i n t h e d i c t i o n a r y by c a l l i n g up a blank s t a t e t a b l e for mand e n t e r i n g t h e cond i t i ons and procedures. One c y c l e o f the s t a t e t a b l e can beexecuted by typ ing t h e name o f t h e s t a t e t a b l e .

4. DIAGNOSTIC SYSTEM

Because o f t h e s t r u c t u r e o f the communication system, t h e r e l e v a n t machine s t a t eo f a l l processes i s a v a i l a b l e i n the common memory every c y c l e , and t h e d iagnos t i cmodule has access t o common memory data every cyc le . A l o g o f the machine s t a t e ismade, permi t t ing the NBS Con t ro l System t o be stepped so the machine s t a t e a t anyt ime can be observed. This g rea t l y f a c i l i t i e s debugging sensory i n t e r a c t i v e r e a lt i m e app l ica t ions where events happen a t unpredictable t imes and there i s usua l l y noway t o r e c r e a t e the exact sequence o f events which caused a p a r t i c u l a r problem.D iagnos t i c data can be p r i n t e d out on a convent ional terminal, t r a n s f e r r e d acrossa network t o some c e n t r a l f ac to ry c o n t r o l computer, e tc .

The Disp lay E d i t o r a l s o prov ides an i n t e r f a c e t o graphics equipment whichprovides r e a l t i m e graphical outputs o f var iab les. Th is in te rconnec t ion i s showni n f igu re 11. The Display E d i t o r i s used o f f l i n e t o spec i f y what each o f the con-nected d isp lays i s t o display, where on each screen t h i s d i sp lay o r i g i n should be,and a scale fac to r . The r e a l t i m e d isp lay implemented i n RCS, and t h e D isp lay E d i t o rforms are shown below.

Display type NUMERICVar iable "name"

x posY POS

Th i s display spec i f i ca t i on will cause the numeric value o f t h e named va r i ab le t o bedisplayed a t screen p o s i t i o n (x pos, y pos).

Disp lay type BAR GRAPHVar iab le "name"

x posY PO8

min valuemax value# p i x e l s

Th i s display spec i f i ca t i on will cause a bar graph represent ing the value of thenamed var iable t o be displayed a t screen p o s i t i o n (x pos, y pos). The next twoe n t r i e s give the min imum and maximum expected values o f the var iab le , and the l a s tentry, # p ixe ls , spec i f i es the height ( in p i x e l s ) o f the display.

Display type FUNCTION-PLOTvar iable 1 "name '*var iab le 2 "name"x posY POSmin value 1

max value 1X p i x e l s 1min value 2max value 2# p i x e l s 2

19-30

Page 31: RCS: The NBS Real-Time Control - NIST

I

0Cmm

119-31

Page 32: RCS: The NBS Real-Time Control - NIST

T h i s d isp lay s p e c i f iv a r i a b l e 2, beginning a tI/ p i x e l s e n t r i e s a r e t h e

.cat ion will cause a p l o t o f named v a r i a b l e 1 against namedscreen p o s i t i o n ( x pos, y pos). Min va lue, max value, andsame as f o r a bar graph.

D i s p l a y type K- p lo tv a r i a b l e 1v a r i a b l e 2x posY POS

max va lueruin valueII p i x e l s

A K- p lo t p l o t s a se t o f vec to rs on t h e screen. The K- p l o t func t ion can be usedt o d i sp lay a s t i c k f i g u r e robot moving on the screen, reading e x a c t l y the same dataas i s ( o r as would be i f t h e robo t i s disconnected) d r i v ing the robot. To get t h eK - p l o t func t ion t o work proper ly , the bu f fe rs which include var iab le 1 must a l soinc lude va r iab le 2 and must have data i n the s p e c i f i c order.

v a r i a b l e 1 = x coord o f v e c t o r 1x coord o f vec to r 2x coord o f v e c t o r 3...

var i ab le 2 = y coord o f vector 1y coord o f vector 2y coord o f v e c t o r 3...

I f the data values represent the x and y, x and z o r y and z coord inates o f ther o b o t j o i n t s ( f r o m the output o f the coordinated j o i n t function) then the real - timeorthographic p r o j e c t i o n o f the robot arm will be displayed. Any other s e t o f v e c t o r scan s i m i l a r l y be displayed. A more complex graphics system could be e a s i l y i n t e r -faced which could display a rea l - t ime i some t r i c v iew o f t h e robot .

As shown i n f igu re 11, the o f f l i n e display s p e c i f i c a t i o n i s t r a n s f e r r e d t o theScreen Format B u f f e r i n the Graphics In ter face and the required communicationinformat ion i s passed t o the Communications Module. I n r e a l time, the data i st r ans fe r red f r o m Common Memory t o t h e Diagnost ic Module and then t o the Data B u f f e rwithin the Graphics In te r face .

One o f the add i t i ona l f e a t u r e s soon t o be added t o the D iagnos t i c System i s thea b i l i t y t o dynamically change what i s displayed based on r e a l t ime data. I n t h i scase, the Diagnost ic Module will t e s t the r e a l t i m e data and a t the appropr ia te t ime ,t e l l the Display E d i t o r t o update the Screen Format B u f f e r i n the Graphics I n t e r f a c e .A l l o f the requ i red format information will r e s i d e i n t h e Screen Format B u f f e r anda l l of the r e a l t i m e data will be trans fer red each cycle. The d i sp lay e d i t o r w i l ls imply enable o r d isab le the displays.

5. FUTURE PLANS

A grea t dea l o f t e s t i n g and exper imentat ion i s s t i l l needed t o evaluate RCS.Based on t h i s work, many changes and extensions will be made. U l t i m a t e l y , we hopethat the subsystem i n t e r f a c e s developed through t h i s work will become t h e bas is f o rstandards leading t o "plug compatible " i n d u s t r i a l automation systems.

6. ACKNOWLEDGMENTS

Development o f the NBS Real -Time Con t ro l System i s p a r t i a l l y supported byfunding f r o m t h e Navy Manufacturing Technology Program.

19-32

Page 33: RCS: The NBS Real-Time Control - NIST

BIBLIOGRAPHY

1. Barbera, A. J., F i t z g e r a l d , M. L., and Albus , J. S., "Concepts F o r Real - TimeS e n s o r y - I n t e r a c t i v e C o n t r o l System A r c h i t e c t u r e , " Proceedings o f the Four teen thSoutheastern Symposium O n System Theory, A p r i l 1982.

2. A lbus , J. S., McLean, C. R., Barbera, A. J., F i t z g e r a l d , M. L., " H ie ra rch i ca lC o n t r o l f o r Robot i n an Automated Factory , " 13th IS IR /Robo ts 7 SymposiumProceed ings , Chicago, I l l i n o i s , A p r i l 1983.

3. Albus, J. S., Barbera, A. J., and Nagel, R. N., "Theory and P r a c t i c e ofH i e r a r c h i c a l C o n t r o l , " Twenty - third IEEE Computer S o c i e t y I n t e r n a t i o n a lConference, Sept. 1981.

4. Albus, J. S., Barbera, A. J., F i t zge ra l d , M. L., "Programming A H i e r a r c h i c a lRobot Con t ro l System ", 12th I n t e r n a t i o n a l Symposium on I n d u s t r i a l Robo ts ,P a r i s , France, June 1982.

19-33