cogarch-kortenkamp

Download Report

Transcript cogarch-kortenkamp

Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Hierarchical Architectures for
Controlling Real-World Agents
David Kortenkamp
Pete Bonasso
NASA Johnson Space Center
Metrica Inc./TRACLabs
[email protected]
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Robot Architectures
• Sense  Plan  Act: Shakey 1969
• Subsumption: Brooks 1986
• Want power of deliberation and speed of
reactivity
• Hybrid architectures [Erann Gat “Three
Layer Architectures” in Artificial
Intelligence and Mobile Robots 1998]
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
3T
memory
interpreter
task1
subtask
subtask
task2
task3
10s sec.
persistent state
and choices
projection
1 sec.
memory of
immediate actions
no projection
1/10 sec.
limited state
limited projection
World
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Multi-agent
simulation
IVHM
Planner
path
planner
scheduler
Planner
Planner
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
3T at JSC
• Particular instantiation
of hybrid architecture
– Skill manager
– RAPS
– Adversarial Planner
• Robotic and nonrobotic applications
• User interaction
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Skills
to RAPS
sensor
sensor
actuator
• Small pieces of C code
that do something
• Data passed from one
skill to another
• Actions and events
• Skill manager
– Handles scheduling of
skills
– Handles data transfer
between skills
– Handles comms with
second tier
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
RAPS
RAP Memory
Agenda
task
sub-task
sub-task
primitive
primitive
wait-for
RAP Library
RAP
Interpreter
to/from skills
• Jim Firby’s Reactive
Action Packages [Firby
1989]
• Library of tasks
• Conceptual memory
• Run-time
decomposition of tasks
via context
• Tasks bottom-out in
activation of skills
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Example RAP
(define-rap (bioreactor-startup ?configuration)
(language-mappings
(applicability (and (isa ?object i-bwp-system)
(or (isa ?state i-stand-alone-drain-state)
(isa ?state i-on)
(isa ?state i-stand-alone-reject-state)
(isa ?state i-integrated-state)
(isa ?state i-innoc-no-feed-state))))
(method integrated-or-stand-alone
(context (and (not (= ?configuration innoc-no-feed))
(manual-valve-position pbbwpskm bio_innoc ?value ?error)
(= ?value open)
(default-timeout ?to)
(nominal-pump-speed pbbwpskm recycle ?nmrc)))
(task-net
(sequence
(t0 (stop-watchdog pbbwpskm))
(t0-1 (kill-monitors monitor-bioreactor))
(t1 (configure-bwp-valves ?configuration))
(t2 (set-pump-speeds start)
(update-bwp-text ?configuration))
(t2-2 (start-watchdog pbbwpskm))
(t3 (install-goal (quote (monitor-bioreactor ?configuration)) 3 => ?mgoal)))))
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Language in RAPS
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Adversarial Planner (AP)
•
•
•
•
Non-linear, hierarchical task net (HTN) planner developed at MITRE
Multi-agent
Some scheduling
Leaves of plan are matched to top-level RAPS in RAP library
– RAPS provides abstraction from low-level for planner
• Execution monitoring
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
AP Example
(Operator replace-crystals
:purpose (state crystals replaced)
:agents (?robot ?human)
:constraints ((instance-of ?robot ‘robot)
(instance-of ?human ‘human))
:preconditions ((state bay opened))
:plot (sequential
(covers
(monitor-crystals ?robot in-monitor)
(display ?human monitored))
(crystals ?robot are-replaced))
:effects ((state crystals replaced)))
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Integrated Application
• Four skill managers
• RAPS (100s of RAPS >
50,000 lines of Lisp code)
• Scheduler
• 24/7 autonomous
operation
• 18 months of operation
• AI Magazine next issue
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Skills
------------------------------------------------------Skills -- for the RO agent
---------------------------------Name
RO
Type
device
Params
interval
Outs
none
Function: A device skill that gets all the sensor values and provides them to the other skills. Also sends commands to the pumps
and valves. Also every interval seconds, this skill broadcasts a data message with the values of all the channels listed above to
the IPC server so that clients (e.g., a logging facility) can access them (see the IPC structure at the end of this document).
Name
Type
Params
Outs
valve_position
query
valve (process/pps_select)
value (for process:primary/secondary/purge/off/unknown;
for pps_select:pps/tank/reject/off/unknown), and result (okay or Err)
Function: Checks V02 or V03. One of lines V02_i1 through V02_i3 or V03_i1 through V03_i3 will be hi, and the rest will be low. If
all are low, the result is off. Any other pattern is unknown.
Name
Type
Params
valve_at
event
valve (process/pps_select), value (for
process:primary/secondary/purge/off; for
pps_select:pps/tank/reject/off)
Outs
result (okay/ERR)
Function: Waits for V02_i1 through V02_i3 or V03_i1 through V03_i3 to indicate value (see the valve_position skill). When the
condition is achieved the event returns result.
Name
Type
Params
turn_valve
block
valve (process/pps_select), value (for
process:primary/secondary/purge/off;
for pps_select:pps/tank/reject/off)
Outs
none
Function: Sets one of V02_o1 through V02_03 to hi the rest to low, except for off when all lines will be set lo.
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
RAPs
(define-primitive-event (valve-at ?agent ?valve ?open-closed ?error)
(event-definition (:valve_at (:valve . ?valve) (:value . ?open-closed)))
(event-values :bound :bound :bound :unbound))
(define-rap (turn-valve-p ?agent ?valve ?open-closed ?timeout)
(succeed (and (valve-position ?agent ?valve ?value ?error)
(= ?value ?open-closed)))
(timeout ?timeout)
(method
(primitive
(enable (:turn_valve (:valve . ?valve) (:value . ?open-closed))
(wait-for (valve-at ?agent ?valve ?open-closed ?result)
:succeed (?result))
(disable :above)
))
)
(define-rap (processing-start ?stage ?adjust-time)
...
(method purge
(context (and (= ?stage purge)
(valve-position roskm pps_select ?old-pos ?error)
(= ?old-pos pps)
(nominal-pump-speed roskm feed ?wwsp)
(default-timeout ?dto)))
(task-net
(sequence
(t1 (syringe-pump-p roskm start feed ?wwsp 30))
(t2 (water-flowing-p roskm stop recirc 0 ?dto))
(t3 (turn-valve-p roskm pps_select reject ?dto))
(t4 (turn-valve-p roskm process purge ?dto))
(t5 (turn-valve-p roskm pps_select tank ?dto)))))
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Scheduler
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Learning in 3T
• Intra-tier learning
• Inter-tier learning
– Planning  RAPS
– RAPS  behaviors
• Automatic activation of behaviors
– Behaviors  RAPS
– RAPS  Planning
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Motivation in 3T
• Goals and motivations come from outside or are
pre-built for the specific application
– Ideally motivations would come into the top layer and
then “trickle down” to the other layers
– However, often useful to manually place goals on the
RAPS agenda via GUI or NL
– Less useful to enable/disable skills except for testing
• Resource allocation mostly at top-level, some
mechanisms in RAPS to handle contention for
limited resources
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Adjustable Autonomy
• Allows system to operate with dynamically
varying levels of independence,
intelligence and control
• Some levels of control
– Completely in control
– Shared control
– Supervising manual control
• System still updates state, world model,
etc. through its sensors
Intelligent Systems Branch
Johnson Space Center
Engineering Directorate
Automation, Robotics and Simulation Division
Representation
global, long-term, static
allo-centric: relationships,
roles, recognition, etc.
DAML/OIL
local, short-term, dynamic
robot-centric: where,
identity, role
object ontology
Reasoning
about task
Generating task
task planning sequences, monitoring
resources
spatial reasoning
temporal reasoning
context
learning
goals
contextual reasoning
how to do things,
procedures,
monitors, etc.
task-level
control
perceptual memory
priming
color, neural networks
stereo vision, etc.
Reasoning
about world
objects
set points
object recognition
control
sensors
actuators
multi-agent,
distributed, real-time
closed-loop
World
Intelligent Systems Branch