Title: Reactive Systems Design 159'734
1 Reactive Systems Design 159.734
- 01257358
- H Dayal S Ranadewa
2The Components of Reactive Architecture
- Behaviours and Mechanism for merging the output
of the concurrent behaviours. - Many applications have a series of behaviours
operating in a sequence. - Ex Picking up and disposing an empty soft drink
can. - Behaviours include search for a can, move toward
the can, pick up the can, search for the recycle
bin, move toward the bin, drop the can.
3Behaviours as Objects in OOP
4Primitive Move-To-Goal Behaviour
- Ex Pick up the Trash
- Robot must move to the Red Coke Can and pick it
up and then move to the Blue Bin and drop it - Single generic behaviour would be move-to goal
(colour) - move-to-goal (goal-colour)
5Where do releasers go in OOP?
- Perception serves two purposes
- 1) To Release a behaviour
- 2) Guide the behaviour
- The Releaser it self is a perceptual schema
and can execute independently and is not bound to
a motor schema - It is common to have the releaser be part
of the behaviour. This requires a Coordinated
Control Program. Although the behaviour is always
active if the releaser is not satisfied the
coordinated control program short circuits
processing. -
-
-
-
-
6Design Methodology
7Case Study Unmanned Vehicle to Autonomously
Navigate around an outdoor course of white lines
painted on grass
- Step 1 Describe the Task
- Robot must follow a path with turns,
obstacles and a sand pit. - Step 2 Describe the Robot
- Determine the basic physical abilities of
the robot and limitations and consider the fixed
constraints. - Step 3 Describe the Environment
- This step is a key factor in determining the
situatedness of the robot and identifies the
perceptual opportunities for the behaviours
8Case Study Unmanned Vehicle to Autonomously
Navigate around an outdoor course of white lines
painted on grass
- Step 4 Describe how the robot should act in
response to its environment - Identify one or more behaviours. Identify
what the Robot should do? - Ex follow_line behaviour
- Perceptual Schema Use the white lines to
compute the centroid. - Motor Schema Convert the percept to a
command to steer the motor.
-
Behaviour Table
9Case Study Unmanned Vehicle to Autonomously
Navigate around an outdoor course of white lines
painted on grass
-
- Step 5 Refine each behaviour
- Concentrate on the design of each individual
behaviour -
- Step 6 Test each behaviour independently
- The only way to verify the perceptual schema
is to try in the real world.
10Case Study Unmanned Vehicle to Autonomously
Navigate around an outdoor course of white lines
painted on grass
- Step 7 Test with other behaviours
- Perform integration testing with the
behaviours combined in the actual environment - Ex follow_line did not work well with visual
distractions! In the presence of distractions the
robot needed to ignore vision and deploy
move_ahead. Use the sonar as a releaser for
move_ahead. Sonar releaser for move_ahead
inhibited the follow_line and the lack of a sonar
releaser inhibited move_ahead. - New Behaviour Table
11Representing a Sequence of Behaviours
- 1 Finite State Automata
- Provides a set of popular mechanisms for
specifying what - a program should be doing at a given time.
FSA can be - written as a table or a state diagram.
- 2 Scripts
- Abstract behaviours often use scripts or
related construct called skills to provide a
different way of generating logic for a seqence
of behaviours. Encourages the designer to think
of the robot ad task in terms of a screenplay. -
- 3 Skills
- Skills collect behaviour like primitives
called Reaction-Action-Packages (RAPs) into a
sketchy plan which is filled in as the robot
executes.
12Finite State Automata
- States
- current state q element of set of states K
- Initial State
- s or q0, starting state
- Transition Function
- ? a function that specifies the next state when
the stimulus ? is encountered. ? is the set of
stimuli - Final State the terminating states (F)
13FSA example
Range far
Time remaining
Time elapsed
Move ahead
Follow line
Range near
MK Follow line, Move ahead, ? Range
near, Range far, Time remaining, Time elapsed s
Follow line, F Follow line, Move ahead
14FSA example for Pick Up the Trash Behaviour
Table
15Contd. FSA example for Pick Up the Trash
16FSA for picking up and recycling Coke Cans
State Transitions
17Scripts
- Abstract Behaviours use scripts/skills to create
a generic template. - Scripts encourage the designer to think of the
robot and the tasks. - The use of scripts in robots can be thought of as
a screenplay where the actors are robots reading
the scripts. - Scripts allow improvisation and when an
exception is encountered the robot will follow
the subscript.
18Robot Script of Pick Up the Trash
19Scripts
- Skills
- sets of behaviours
- Props, Cues
- percepts, sensor inputs
- Sub-script
- exception handling
- Causal Chain
- Sequence of behaviours
- Focussing of attention
20Summary
- Reactive implementation consists of one or more
behaviours and a mechanism for combining the
output of concurrent behaviour. - Designer must develop individual behaviours and
assemble them into a sequence or abstract
behaviour - Finite State Automata offer a method of
representing the coordination logic needed to
control a sequence of behaviours - Scripts are an equivalent with a more natural
story like flow of control. - A Behaviour Table represents the releasers, motor
perceptual schemas for each behaviour. - Must fully specify the ecological niche of the
robot in order to design useful behaviours. - The control should rely on the world to inform
the robot as to what to do next rather than rely
on the program to remember and maintain state.