Background slides for invited challenge demo at Rule-ML 2017 A software agent controlling 2 robot arms in co-operating concurrent tasks Robotic agent programming in QuLog and TeleoR Keith Clark Imperial College & University of Queensland Joint work with Peter Robinson University of Queensland 1
15
Embed
A software agent controlling 2 robot arms in co-operating concurrent tasks
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Background slides for invited challenge demo at Rule-ML 2017
A software agent controlling 2 robot arms in co-operating concurrent tasks
Robotic agent programming in QuLog and TeleoR
Keith Clark Imperial College & University of Queensland
Joint work with Peter Robinson
University of Queensland
1
QuLog - LP+FP+AR Language • Flexibly typed, multi-threaded, higher order • Relation and function defining rules
• Function calls and set expression arguments in relation calls • Function rule guards can query relations • Relation rules more declarative than Prolog, closer to predicate
logic • Relations are typed and moded
• Dynamic relations defined only by facts • Used for the agent’s Belief Store
• Top layer of action rules • Update dynamic relations, fork threads, do I/O, communicate with
other Qulog, C, Python or Java processes • Inter-process comms uses our Pedro pub/sub and addressed
message router • Threads execute actions calling funs and rels as needed • Rel and fun rules cannot call actions
2
TeleoR • Development of Nilsson’s T-R robotic agent language of guard ~> action rules sequenced in parameterized procedures. • guard is a QuLog deductive query to the BS • action is a tuple of robotic actions executed in parallel or
a T-R procedure call, maybe a recursive call • TeleoR has forms of rules and actions not in T-R
– Extra rules for more fine grained behaviour control – Can combine robotic action with QuLog action sequence: action ++ qact1 ;...; qact1 – This allows communication and updates of BS as parallel non-robotic actions
• Compile time guarantee: – all rule actions are correctly typed and fully instantiated when a rule is fired
• The concept of task atomic procedures: – Used for multi-tasking sharing one or more robotic resources – No interference, no starvation, deadlock free – Compiler generates code that uses BS for co-ordination 3
Deductive Belief Store Dynamic facts
Relation and function rules
? Percepts Handler
Message Handler ag@host
Percept fact Interpretations of Sensor data
Mid-level Action control messages
Incoming Messages and replies
Control Thread
?Atomic re-evaluation of rule guards after each atomic update
tel makeTower(arm, list(block), table) makeTower(Arm,Blks,Tbl){ % Tbl is where tower must be built, tower(Blks, Tbl) ~> {} sub_tower(Blks, Tbl) & Blocks=[B,..] ~>
Entire control program 40 TeleoR rules clustered into 6 procedures.
Auxiliary procedures
13
tel moveAcrossToTable(arm, block, table) % Will fetch a block from wherever it is and put it onto the table % May need two calls to proc below using different arms to first % move the block to shared then to destination table
task_atomic oneArmMoveToTable(arm, block, table, table) % Has 3 resource args. an arm and two tables which might be the same oneArmMoveToTable(Arm, Blk, FromTab, ToTab){
not holding(Arm,_) ~> makeClear(Arm, Blk, FromTab)
holding(Arm,_) ~> put_on_table(Arm, FromTab) }
TeleoR semantics and implementation
14
• Formal State Transition Semantics • Optimized Reference Implementation
• Runtime system that implements state transition semantics • Compile time analysis ensures rule guards are not re-evaluated on BS update if no relevant change made
• Currently compiled to multi-threaded Qu-Prolog • Will soon be compiled to specialized Abstract Machine Code similar to but simpler than Warren’s Prolog AMC
Sources and software
15
Clark & Robinson, Robotic Agent Programming in TeleoR, ICRA 2015, IEEE
Clark & Robinson, Multi-tasking Robotic Agent Programming in TeleoR, Research Report, on www.doc.ic.ac.uk/~klc
Clark et al, A Framework for Integrating Symbolic and Sub-symbolic Representations, IJCAI 2016, AAAI Press
Programming Communicating Multi-tasking Robotic Agents: A Teleo-Reactive Rule Based Approach, Springer, Early 2018 first 5 chapters at teleoreactiveprograms.net including a formal operational semantics of Nilsson’s TR lang.
Clark & Robinson, Engineering Agent Applications in QuLog, Springer, 2017/8,
TeleoR and QuLog Software for Unix, Linux and OS X at http://staff.itee.uq.edu.au/pjr/HomePages/QulogHome.html