Combining Different Types of Control Lecture 6: • We have studied local control laws. Three-Level Architectures – Each law makes simple local assumptions – Tightly-coupled closed-loop control CS 344R/393R: Robotics • How do we combine control laws? Benjamin Kuipers • How do we do high-level planning? GOFAI: Good Old-Fashioned AI Rodney Brooks (1986) “Subsumption Architecture” • Factoring the problem of acting intelligently – Sense : build an accurate description of the world • Changed the course of AI Robotics. – Plan : derive a sequence of actions that will – The Sense-Plan-Act loop is too slow, and can never provably achieve the goal have an accurate enough model. – Act : perform that sequence of actions • Use a hierarchy of fast reactive loops. • Problems with the Sense-Plan-Act cycle – Each loop capable of complete behavior. – Sensing and Acting are never perfectly accurate – Higher loops modify the behavior of lower ones. – Planning can’t consider all possibilities – [James Albus, Brains, Behavior, & Robotics , 1981] – The whole cycle is too slow. 1
Three-Level Architectures Three-Level Architectures • Reactive skills: – Control laws tightly coupled with environment – Generalized to observers and sensory transforms • Sequencing: – Select task network of currently active skills – Accomplish specified task using skill hierarchy • Planning: – Reason about goals, resources, and timing. – Symbolic AI search and planning methods. Skill Network for Skills Finding and Recognizing People • A skill can be a local control law, – or it can estimate features from sensory input, – or it can compute signals for the sequencer. • It makes a “simple-world” assumption. • A skill has several components: – Input and output specifications – Computational transform from input to output – Initialization on system setup – Enable function on skill startup – Disable function on skill shutdown. Skill Network (partial) for Navigation task 2
Sequencing Control • Assemble an appropriate network of skills. Architecture – Disable skills no longer needed – Enable and link skills needed for current task • This control • Finite state machines are a possibility: architecture – Select a skill to execute from a set of options leads to the task – Decide when the current skill should terminate hierarchy. • This is a good start, and we’ll explore it. • [Albus] – But we will need to go beyond the FSM. x = F ( x , u ) ˙ Local Control Laws y = G ( x ) A Finite State Machine u = H i ( y ) • Define a finite state machine, where – the states are control laws being applied, • A local control law is a triple: 〈 A , H i , Ω〉 – the transitions are applicability and termination – Applicability predicate A ( y ) conditions. – Control policy u = H i ( y ) • This places requirements on the dynamical – Termination predicate Ω ( y ) systems specified by the control laws – to initiate and terminate appropriately. � ( y ) � ( y ) u = H ( y ) • The finite state machine model lets us analyze global behavior. Applicability Predicate A( y ) Termination Predicate Ω ( y ) • Applicability must be defined in terms of the available sensory information y ( t ). • Termination must be defined in terms of – It means that the environment satisfies the available sensory information y ( t ). assumptions needed by the control law. • How many control laws are applicable? • Termination is not just inverse applicability. – Ideally, exactly one. – It applies in a context where the control law is – Zero? What do we do? running: decision inertia gives stability. – More than one? How do we select? 3
Interpreted FSM Model Compiled FSM Model • Assume a collection of laws: 〈 A i , H i , Ω i 〉 • Perhaps the select/compose step can be compiled into a single transition condition: • Repeat: active ( H i ) � T ij � transitionTo ( H j ) – Identify applicable control laws. T ij = � i � [ H j = select ({ H k : � k })] – Select/compose runnable control law. • Selection: e.g., by priorities … T ij = � i � [ H j = compose ({ H k : � k })] • Composition: e.g., potential field … – Run control law. • Conditions T ij are mutually exclusive. – Terminate control law. Analyzing the Transitions Issues with FSM Model • Safety : • Applicability vs selection of control law – Do we avoid the bad states? • Selection vs combination of control laws – Do we avoid getting stuck (physically)? • Sequential vs parallel combination • Liveness : • Vector addition of control laws – Do we reach the good states? • Success vs. failure termination – Do we avoid getting stuck (computationally)? • Interruption vs. continuity of execution • How many control laws are applicable? Alternative Approaches To Sequencers Reactive Action Plans: RAPS • Jim Firby, RAPS • Jim Firby’s PhD thesis (Yale, 1989) • Roger Brockett, MDL – Adaptive Execution in Complex Dynamic Worlds – Hristu-Varsakelis & Andersson, MDLe. • Widely used by NASA and others. • … there are others … • A major three-level architecture – Skills: continuous control • The right answer is not completely clear. – Sequencing: reactive behaviors – Planning: deliberation and inference – How about Lua, or Tekkotsu? 4
RAP: A Set of Methods for Processes Cause Behavior Accomplishing a Task • Behavior comes from interacting processes • Task name and arguments acting on input from the environment. • Success (termination) condition • Behavior is controlled by enabling and • Multiple methods (OR) disabling the processes. – Context (applicability) conditions • Processes detect conditions (good and bad) – Network of subtasks (AND) and send asynchronous signals. • A RAP is an AND/OR tree, – plus sequencing and signals Example RAP Problems with Simple RAPs (define-rap (arm-pickup ?arm ?thing) (succeed (ARM-HOLDING ?arm ?thing)) • Assumption: Tasks are atomic . (method (context (not (TOOL-NEEDED ?thing ?tool true))) – One subtask is processed at a time. (task-net – Each task either succeeds or fails. (t1 (arm-move-to ?arm ?thing) (for t2)) (t2 (arm-grasp-thing ?arm ?thing)))) – Success or failure is known. (method – Success or failure is well defined. (context (TOOL-NEEDED ?thing ?tool true)) (task-net • Extend to concurrency and arbitrary signals. (t1 (arm-pickup ?arm ?tool) (for t2)) (t2 (arm-move-to ?arm ?thing) (for t3)) (t3 (arm-grasp-thing ?arm ?thing))))) Concurrent Tasks Waiting for a Signal • Initiate concurrent threads of execution. (task-net (t1 (approach-target ?target) • Annotations to coordinate threads: (wait-for (at-target) :proceed) – until-end : stop this task when another ends. (wait-for (stuck) :terminate))) – until-start : stop this task when another • Initiate subtask behavior. starts. • Wait for problem-specific signals to arrive. – wait-for : pause until signal is received. • Send different signals for success and failure. • Synchronize task processing with progress in the real world. 5
Concurrent Task Net Enabling and Cleanup Tasks (task-net (t1 (approach-target ?target) • Success/failure is too limited. (wait-for (at-target) :proceed) (wait-for (stuck) :terminate)) – Failure means terminate all subtasks. (t2 (track-target ?target) – Some subtasks (cleanup) should take place (wait-for (lost-target) :terminate) (wait-for (camera-problem) :terminate) whether the main task has succeeded or failed. (until-end t1))) • Must be able to express an arbitrary signal- driven transition graph among subtasks. until-end means that when t1 terminates, process t2 is also terminated. That is, track the target until we reach it, or fail. Complex Task Net with Cleanup The Sequencing Level • Goal: Factor a complex task into a discrete (task-net (t0 (camera-on) (wait-for :success t1) (for t2)) set of interacting continuous skills. (t1 (approach-target ?target) (wait-for (at-target) t3) (wait-for (stuck) t3) • The RAP task net (until-start t3)) – Finite state transition graph. (t2 (track-target ?target) (wait-for (lost-target) t3) – AND/OR graph of subtasks, with conditions. (wait-for (camera-problem) :terminate) – Concurrent threads of task execution. (until-start t3)) – Synchronization of threads via signals. (t3 (camera-off))) • Incorporate these concepts in your code. until-start means if either t1 or t2 starts t3, – Further improvements may well be possible. the other is terminated. 6
Recommend
More recommend