02/13/08 15-494 Cognitive Robotics 1Architectures for Robot Control15-494 Cognitive RoboticsDavid S. Touretzky &Ethan Tira-ThompsonCarnegie MellonSpring 200802/13/08 15-494 Cognitive Robotics 2Why Is Robot Control Hard?Coste-Maniere and Simmons (ICRA 2000):●High-level, complex goals–Assemble this water pump–Cook my breakfast●Dynamic (changing) environment●Robot has dynamic constraints of its own(don't fall over)●Sensor noise and uncertainty●Unexpected events (collisions, dropped objects, etc.)02/13/08 15-494 Cognitive Robotics 3Approaches To Control1.Hierarchical: classic sense-plan-act●“Top-down” approach●Start with high level goals, decompose into subtasks●Not very flexible2.Behavioral●“Bottom-up” approach●Start with lots of independent modules executing concurrently, monitoring sensor values and triggering actions.●Hard to organize into complex behaviors; gets messy quickly.3.Hybrid●Deliberative at high level; reactive at low level02/13/08 15-494 Cognitive Robotics 4Levels of Control ProblemRobots pose multiple control problems, at different levels.●Low-level control:–Example: where to place a leg as robot takes its next step–Generally, continuous-valued problems–Short time scale (under a second); high frequency loop●Intermediate level control:–Navigating to a destination, or picking up an object.–Continuous or discrete valued problems–Time scale of a few seconds●High level control:–What is the plan for moving these boxes out of the room?–Discrete problems, long time scale (minutes)02/13/08 15-494 Cognitive Robotics 5Low-Level Control Issues●Real-time performance requirement–Code to issue motor commands or process sensor readings must run every so many milliseconds.●Safety: avoid states with disastrous consequences–Never turn on the rocket engine if the telescope is uncovered.–Never fail to turn off the rocket engine after at most n seconds.–Therac-25 accident (see IEEE Computer, July 1993)–Safety properties sometimes provable using temporal logic.●Liveness: every request must eventually be satisfied●Deadlock-free02/13/08 15-494 Cognitive Robotics 6“Reactive” Architectures●Sensors directly determine actions.●In its most extreme form, stateless control.●“Let the world be its own model.”●Example: light-chasing robot:light detectorsmotors,wheelslight source(behavior chase-light :period (1 ms) :actions ((set left-motor (right-sensor-value)) (set right-motor (left-sensor-value))))02/13/08 15-494 Cognitive Robotics 7Overriding a Behavior●If robot loses sight of the light, turn clockwise until the light comes back into view.light sourcelight detectorsmotors,wheels0?(behavior chase-light :period (1 ms) :actions ((set left-motor (right-sensor-value)) (set right-motor (left-sensor-value))))(behavior find-light :overrides (chase-light) :test (0? (+ (left-sensor-value) (right-sensor-value))) :actions ((set left-motor 0.5)))02/13/08 15-494 Cognitive Robotics 8Light Chasing in aState Machine Formalism●States treated as equal alternatives.●State is discrete, but control signal is continuous.●“Find Light” has to know which state to return control to when the light is found.●Usually not parallel (but can be).ChaseLightFindLightLost lightFound light02/13/08 15-494 Cognitive Robotics 9Rod Brooks' Subsumption Idea●In 1986 Rod Brooks proposed the “subsumption” architecture, a kind of reactive controller.●Robot control program is a collection of little autonomous modules (state machines).●Hierarchy of layers of control.●Some modules override (subsume) inputs or outputs of lower layer modules.02/13/08 15-494 Cognitive Robotics 10Genghis: Six-Legged Walker02/13/08 15-494 Cognitive Robotics 11Hannibal (Breazeal)Three Distinct Insect Gaits:(1) slow wave, (2) ripple,(3) tripod02/13/08 15-494 Cognitive Robotics 12Coping With a Noisy World●URBI (Baillie, 2005) provides a ~ operator to test if a condition has held true for a certain duration.●Onleave test is true when condition ceases to hold.●You can build astate machinefrom theseprimitives.02/13/08 15-494 Cognitive Robotics 13Guarded Commands vs.Finite State Machineswhenever (foo_test) foo_action;at (bar_test) bar_action; onleave baz_action;fooguardfooactionfoo testNullTransbarguardbaractionbar testbazaction! bar testNullTrans02/13/08 15-494 Cognitive Robotics 14Why Is Complex State Bad?●Can be expensive to compute (vision)●Error-prone: what if you make a map, and it's wrong?●Goes stale quickly: the world constantly changes●But...–Non-trivial intelligent behavior can't be achieved without complex world state.–You really do need a map of the environment.–Can't use a subsumption architecture to play chess.–Or even chase a ball well...02/13/08 15-494 Cognitive Robotics 15Chase Ball 1●Cooperation between two simple processes:–Point the camera at the ball–Walk in the direction the camera is pointing●Each process can execute independently.●Purely reactive control.02/13/08 15-494 Cognitive Robotics 16Chase Ball 2●If we lose sight of the ball, must look for it.●Now we introduce some internal state:TrackBallFollowHeadPanHeadLost sightRotateBodyTimeoutTimeout Found ball02/13/08 15-494 Cognitive Robotics 17Chase Ball 3●More intelligent search: direction of turn should depend on where the ball was last seen.●Now we need to maintain world state (ball location).02/13/08 15-494 Cognitive Robotics 18Chase Ball 4●Must avoid obstacles while chasing the ball.–May need to move the head to look for obstacles.–Attention divided between ball tracking and obstacle checking.●May need to detour around obstacles.–Subgoal “detouring” temporarily overrides “chasing”.●Where will the ball be when the detour is completed?–Mapping, trajectory extrapolation...Say “goodbye” toreactive control!02/13/08 15-494 Cognitive Robotics 19Mid-Level Control:Task Control Languages●Takes the robot through a sequence of actions to achieve some simple task.●Must be able to deal with failures, unexpected events.●There are many architectures for mid-level control. Various design tradeoffs:–Specialized language vs. extensions to Lisp or C–Client/server vs. publish/subscribe communication model–Provide special exception states, or treat all states the same?–How to provide for and manage concurrency.●Lots of languages/tools: RAPs, TCA, PRS, Propice, ESL, MaestRo, TDL, Orccad, ControlShell,
View Full Document