Autonomous Mobile Robots CPE 470/670 Lecture 10 Instructor: Monica Nicolescu.
-
date post
21-Dec-2015 -
Category
Documents
-
view
214 -
download
0
Transcript of Autonomous Mobile Robots CPE 470/670 Lecture 10 Instructor: Monica Nicolescu.
Autonomous Mobile RobotsCPE 470/670
Lecture 10
Instructor: Monica Nicolescu
CPE 470/670 - Lecture 10 2
Review
• The Subsumption Architecture
– Herbert, Genghis, The Nerd Herd, Tom and Jerry
– Advantages and dissadvantages
• Behavior-based control
– Definitions
– Principles of behavior-based control
– Toto: a behavior-based mapping robot
CPE 470/670 - Lecture 10 3
What Is a Behavior?
• Behavior-achieving modules
Rules of implementation
• Behaviors achieve or maintain particular goals (homing, wall-following)
• Behaviors are time-extended processes
• Behaviors take inputs from sensors and from other
behaviors and send outputs to actuators and other
behaviors
• Behaviors are more complex than actions (stop, turn-
right vs. follow-target, hide-from-light, find-mate etc.)
CPE 470/670 - Lecture 10 4
Principles of BBC Design
• Behaviors are executed in parallel, concurrently
– Ability to react in real-time
• Networks of behaviors can store state (history),
construct world models/representation and look into
the future
– Use representations to generate efficient behavior
• Behaviors operate on compatible time-scales
– Ability to use a uniform structure and representation
throughout the system
CPE 470/670 - Lecture 10 5
An Example Task: Mapping
• Design a robot that is capable of:
– Moving around safely
– Make a map of the environment
– Use the map to find the shortest paths to particular places
• Navigation & mapping are the most common mobile
robot tasks
CPE 470/670 - Lecture 10 6
Map Representation
• The map is distributed over different behaviors
• We connect parts of the map that are adjacent in the
environment by connecting the behaviors that
represent them
• The network of behaviors represents a network of
locations in the environment
• Topological map: Toto (Matarić ’90)
CPE 470/670 - Lecture 10 7
Toto’s Controller
CPE 470/670 - Lecture 10 8
Landmark Detection
• Keep track of what was sensed and how it was
moving
– meandering cluttered area
– constant compass direction, go straight left, right walls
– moving straight, both walls corridor
CPE 470/670 - Lecture 10 9
Building a Map
• Each landmark was stored in a behavior
• Whenever a new landmark was discovered a new behavior was added
• Adjacent landmarks are connected by communication wires
• This resulted in a topological representation of the environment, i.e., a topological world model
CPE 470/670 - Lecture 10 10
Toto’s Mapping Behaviors
• Each landmark was stored
in a behavior
• Each such landmark
behavior stored
(remembered) some
information
– landmark type (wall,
corridor, irregular)
– compass heading
– approximate length/size
– some odometry
my-behavior-type: corridor
my-compass-direction: NV
my-approximate-location: x,y
my-approximate-length: length
whenever received (input)
if input(behavior-type)= my-
behavior-type
and input (compass-direction)
= my-compass-direction
then
active <- true
CPE 470/670 - Lecture 10 11
Localization
• Whenever a landmark is detected,
its description (type, compass
direction, etc.) is sent to all
behaviors in parallel the one
that matches becomes active
• When nothing in the map matches
a new place/landmark was
discovered and added to the map
• If an existing behavior was
activated, it inhibited any other
active behaviors
CPE 470/670 - Lecture 10 12
Getting Around
• Toto can use the map to navigate
• The behavior that corresponds to
the goal sends messages (spreads activation) to all of its neighbors
• The neighbors send messages to
their neighbors in turn
• So on, until the messages reach
the currently active behavior
• This forms path(s) from the
current state to the goal
CPE 470/670 - Lecture 10 13
Path Following
• Toto did not keep a sequence of behaviors
• Instead, messages were passed continuously
– Useful in changing environments
• How does Toto decide where to go if multiple
choices are available?
– Rely on the landmark size: behaviors add up their own
length as messages are passed from one behavior to
another give path length
– Choose the shortest path
• Thus, one behavior at a time, it reached the goal
CPE 470/670 - Lecture 10 14
Toto - Video
CPE 470/670 - Lecture 10 15
Expression of Behaviors
• Example:
– Going from a classroom to another
• What does it involve?
– Getting to the destination from the current location
– Not bumping into obstacles along the way
– Making your way around students on corridors
– Deferring to elders
– Coping with change in the environment
CPE 470/670 - Lecture 10 16
Stimulus-Response Diagrams
• Behaviors are represented as a general response to
a particular stimulus
move-to-class
avoid-object
dodge-student
stay-right
defer-to-elder
COORDINATOR
class location
detected object
detected student
detected path
detected elder
Actions
CPE 470/670 - Lecture 10 17
Finite State Acceptor Diagrams
• Useful for describing
aggregations and sequences
of behaviors
• Finite state acceptor:– Q: set of allowable behavioral
states
: transition function from
(input, current state) new
state
– q0: initial state
– F: set of accepting (final) states
Start Journey Lost
At-class
move error
reached-class
other not-at-class all
all
CPE 470/670 - Lecture 10 18
Formal Methods
• Have very useful properties for the programmer
– Can be used to verify designer intentions
– Provide a framework for formal analysis of the program,
adequacy and completeness
– Facilitate the automatic generation of control systems
– Provide a common language for expressing robot
behaviors
– Provide support for high-level programming language
design
CPE 470/670 - Lecture 10 19
Situated Automata
• Kaelbling & Rosenschein (’91)
• Controllers are designed as logic circuits
• Capable of reasoning
• REX: Lisp-based language– First language to encode a reactive systems with
synchronous digital circuitry
• Gapps: goals are specified more directly– Achievement, maintenance, execution
– Logical boolean operators are used to create higher-level
goals generate circuits
CPE 470/670 - Lecture 10 20
Situated Automata
(defgoalr (ach in-classroom)
(if (not start-up)
(maint (and (maint move-to-classroom) (maint avoid-
objects)
(maint dodge-students)
(maint stay-to-right-on-path)
(maint defer-to-elders)
)
)
)
)
CPE 470/670 - Lecture 10 21
Discrete Behavioral Encoding
• The behavior consists of a set finite set of (situation, response) pairs
• Rule-based systems
IF antecedent THEN consequent
• Condition-action production rules (Nilsson ’94)– Produce durative actions: “move at 5m/s” vs. “move 5 m”
• The Subsumption Architecture
(whenever condition & consequent)
(defbehavior name & inputs outputs declarations
processes)
CPE 470/670 - Lecture 10 22
Continuous Behavioral Encoding
• Continuous response provides a robot an infinite
space of potential reactions to the world
• A mathematical function transforms the sensory
input into a behavioral reaction
• Potential fields
– Law of universal gravitation: potential force drops off with
the square of the distance between objects
– Goals are attractors and obstacles are repulsors
– Separate fields are used for each object
– Fields are combined (superposition) unique global field
CPE 470/670 - Lecture 10 23
Potential Fields
2distance
1Force Ballistic goal
attraction fieldSuperposition of two fields
CPE 470/670 - Lecture 10 24
Potential Fields
• Advantages
– Provide an infinite set of possibilities of reaction
– Highly parallelizable
• Disadvantages
– Local minima, cyclic-oscillatory behavior
– Apparently, large amount of time required to compute the
entire field: reaction is computed only at the robot’s position!
CPE 470/670 - Lecture 10 25
Motor Schemas
• Motor schemas are a type of behavior encoding
– Based on neuroscience and cognitive science
• They are based on schema theory (Arbib)
– Explains motor behavior in terms of the concurrent control
of many different activities
– Schemas store how to react and the way the reaction can
be realized: basic units of activity
– Schema theory provides a formal language for connecting
action and perception
– Activation levels are associated with schemas, and
determine their applicability for acting
CPE 470/670 - Lecture 10 26
Visually Guided Behaviors
• Michael Arbib & colleagues constructed computer models of
visually guided behaviors in frogs and toads
• Toads & frogs respond visually to
– Small moving objects feeding behavior
– Large moving objects fleeing behavior
• Behaviors implemented as a vector field (schemas)
– Attractive force (vector) along the direction of the fly
• What happens when presented with two files simultaneously?
– The frog sums up the two vectors and snaps between the two
files, missing both of them
CPE 470/670 - Lecture 10 27
Motor Schemas
• Provide large grain modularity
• Schemas act concurrently, in a cooperative but
competing manner
• Schemas are primitives from which more complex
behaviors (assemblages can be constructed)
• Represented as vector fields
CPE 470/670 - Lecture 10 28
Examples of Schemas
• Obstacle avoid and stay on corridor schemas
Rd
SdRRS
dSSd
Vmagnitude
0
2/2/
2/
WdGW
dWdP
Vmagnitude
CPE 470/670 - Lecture 10 29
Schema Representation
• Responses represented in uniform vector format
• Combination through cooperative coordination via
vector summation
• No predefined schema hierarchy
• Arbitration is not used
– each behavior has its contribution to the robot’s overall
response
– gain values control behavioral strengths
• Here is how:
CPE 470/670 - Lecture 10 30
The Role of Gains in Schemas
• Low gain • High gain
CPE 470/670 - Lecture 10 32
Foraging Example
CPE 470/670 - Lecture 10 34
Schema-Based Robots
• At Georgia Tech (Ron Arkin)• Exploration
• Hall following
• Wall following
• Impatient waiting
• Navigation
• Docking
• Escape
• Forage
CPE 470/670 - Lecture 10 35
Behavior Coordination
• Behavior-based systems require consistent
coordination between the component behaviors for
conflict resolution
• Coordination of behaviors can be:
– Competitive: one behavior’s output is selected from
multiple candidates
– Cooperative: blend the output of multiple behaviors
– Combination of the above two
CPE 470/670 - Lecture 10 36
Competitive Coordination
• Arbitration: winner-take-all strategy only one response chosen
• Behavioral prioritization
– Subsumption Architecture
• Action selection/activation spreading (Pattie Maes)
– Behaviors actively compete with each other
– Each behavior has an activation level driven by the robot’s
goals and sensory information
• Voting strategies (DAMN architecture, Rosenblatt)
– Behaviors cast votes on potential responses
CPE 470/670 - Lecture 10 38
Cooperative Coordination
• Fusion: concurrently use the output of multiple behaviors
• Major difficulty in finding a uniform command
representation amenable to fusion
• Fuzzy methods
• Formal methods
– Potential fields
– Motor schemas
– Dynamical systems
CPE 470/670 - Lecture 10 39
Emergent Behavior
The resulting robot behavior may sometimes be
surprising or unexpected
emergent behavior
CPE 470/670 - Lecture 10 40
Wall Following
• A simple wall following controller:
– If too close on left-back, turn left
– If too close on left-front, turn right
– Similarly for right
– Otherwise, keep straight
• If the robot is placed close to a wall it will follow
• Is this emergent?
– The robot has no explicit representations of walls
– The controller does not specify anything explicit about
following
CPE 470/670 - Lecture 10 41
Emergence
• A “holistic” property, where the behavior of the robot
is greater than the sum of its parts
• A property of a collection of interacting components
– A robot’s interaction with the environment
– The interaction of behaviors
• Often occurs in reactive and behavior-based
systems (BBS)
• Typically exploited in reactive and BBS design
CPE 470/670 - Lecture 10 42
Flocking
• How would you design a flocking behavior for a
group of robots?
• Each robot can be programmed with the same
behaviors:
– Don’t get too close to other robots
– Don’t get too far from other robots
– Keep moving if you can
• When run in parallel these rules will result in the
group of robots flocking
CPE 470/670 - Lecture 10 43
Emergent Behavior
• Emergent behavior is structured behavior that
is apparent at one level of the system (the
observer’s point of view) and not apparent at another (the controller’s point of view)
• The robot generates interesting and useful behavior
without explicitly being programmed to do so!!
• E.g.: Wall following can emerge from the interaction
of the avoidance rules and the structure of the
environment
CPE 470/670 - Lecture 10 44
Components of Emergence
• The notion of emergence depends on two
components
– The existence of an external observer, to observe the
emergent behavior and describe it
– Access to the internals of the controller, to verify that the
behavior is not explicitly specified in the system
• The combination of the two is, by many researchers,
the definition of emergent behavior
CPE 470/670 - Lecture 10 45
Unexpected & Emergent Behavior
• Some argue that the description above is not
emergent behavior and that it is only a particular
style of robot programming
– Use of the environment and side-effects leads to the novel
behavior
• Their view is that emergent behavior must be
truly unexpected, and must come to a surprise to
the external observer
CPE 470/670 - Lecture 10 46
Expectation and Emergence
• The problem with unexpected surprise as property
of behavior is that:
– it entirely depends on the expectations of the
observer which are completely subjective
– it depends on the observer’s knowledge of the
system (informed vs. naïve observer)
– once observed, the behavior is no longer
unexpected
CPE 470/670 - Lecture 10 47
Emergent Behavior and Execution
• Emergent behavior cannot always be designed in advance and
is indeed unexpected
• This happens as the system runs, and only at run-time can
emergent behavior manifest itself
• The exact behavior of the system cannot be predicted
– Would have to consider all possible sequences and combinations
of actions in all possible environments
– The real world is filled with uncertainty and dynamic properties
– Perception is affected by noise
• If we could sense the world perfectly, accurate predictions could
be made and emergence would not exist!
CPE 470/670 - Lecture 10 48
Desirable/Undesirable Emergent Behavior
• New, unexpected behaviors will always occur in any
complex systems interacting with the real world
• Not all behaviors (patterns, or structures) that
emerge from the system's dynamics are desirable!
• Example: a robot with simple obstacle avoidance
rules can oscillate and get stuck in a corner
• This is also emergent behavior, but regarded as a
bug rather than a feature
CPE 470/670 - Lecture 10 49
Sequential and Parallel Execution
• Emergent behavior can arise from interactions of the
robot and the environment over time and/or over space
• Time-extended execution of behaviors and interaction with the environment (wall following)
• Parallel execution of multiple behaviors (flocking)
• Given the necessary structure in the environment and
enough space and time, numerous emergent
behaviors can arise
CPE 470/670 - Lecture 10 50
Architectures and Emergence
• Different architectures have different methods for dealing with emergent behaviors: modularity directly affects emergence
• Reactive systems and behavior-based systems exploit emergent behavior by design– Use parallel rules and behaviors which interact with each
other and the environment
• Deliberative systems and hybrid systems aim to minimize emergence– Sequential, no interactions between components, attempt
to produce a uniform output of the system
CPE 470/670 - Lecture 10 51
Readings
• M. Matarić: Chapters 17, 18