Temporal Planning in Space Brian C. Williams and Robert Morris (guest lect.) 16.412J/6.834J

advertisement
Temporal Planning in Space
based on:
“Application of Mapgen to MER,”
by Kanna Rajan
“Handling Time:
Constraint-based Interval Planning,”
by David E. Smith
Brian C. Williams and
Robert Morris (guest lect.)
16.412J/6.834J
March 2nd, 2005
1
Outline
•
•
•
•
•
Operational Planning for the Mars Exploration Rovers
Review of Least Commitment Planning
Constraint-based Interval Planning
Temporal Constraint Networks
Temporal Constraints with Preference
Based on slides by Dave Smith, NASA Ames
Mars Exploration Rovers – Jan. 2004 - ?
Mini-TES
Pancam
Navcam
Mossbauer spectrometer
APXS
Rock Abrasion Tool
Microscopic Imager
Mission Objectives:
• Learn about ancient water and climate on
Mars.
• For each rover, analyze a total of 6-12
targets
– Targets = natural rocks, abraded rocks, and soil
• Drive 200-1000 meters per rover
Mars Exploration Rover
Surface Operations Scenario
Day 2 Traverse
Estimated Error Circle
Day 2
Initial Position;
Followed by
“Close Approach”
Target
Day 2 Traverse Estimated
Error Circle
During the Day
Autonomous OnBoard Navigation
Changes, as needed
Day 1
Long-Distance Traverse
(<20-50 meters)
Day 3
Science Prep
(if Required)
Day 4
During the Day
Science Activities
One day in the life of a Mars rover
Activity Name
DTE
Night Time Rover Operations
Durati
on
4.50
0.75
16.97
10
11
12
13
14
15
16
17
18
19
20
21
22
23
0
1
2
3
4
5
6
7
8
DTE period
9
DFE
Night Time Rover Operations
Sleep
Wakeup
Pre-Comm Session Sequence Plan Review
Current Sol Sequence Plan Review
Prior Sol Sequence Plan Review
Real-TIme Monitoring
Downlink Product Generation...
1.50
1.50
2.00
Prior Sol Sequence Plan Review
4.50
0.75
2.75
Tactical Science
Assessment/Observation Planning
5.00
Science DL Assessment Meeting
1.00
Payload DL/UL Handoffs
0.50
Tactical End-of-Sol Engr. Assessment &
Planning
5.50
DL/UL Handover Meeting
0.50
Skeleton Activity Plan Update
2.50
SOWG Meeting
2.00
Uplink Kickoff Meeting
0.25
Activity Plan Integration & Validation
Current Sol Sequence Plan Review
Downlink Product Generation
Tactical Science Assessment/Observation Planning
Science DL Assessment Meeting
Payload DL/UL Handoffs
Tactical End-of-Sol Engr. Assessment & Planning
DL/UL Handover Meeting
Skeleton Activity Plan Update
SOWG Meeting
Uplink Kickoff Meeting
1.75
Activity Plan Approval Meeting
0.50
Build & Validate Sequences
2.25
UL1/UL2 Handover
1.00
Complete/Rework Sequences
2.50
Margin 1
0.75
Command & Radiation Approval
0.50
Margin 2
1.25
Radiation
0.50
Activity Plan Integration & Validation
Activity Plan Approval Meeting
Build & Validate Sequences
UL1/UL2 Handover
Complete/Rework Sequences
Margin 1
Command & Radiation Ap
Margin 2
Radiation
Downlink
MCT Team
Assessment
Science Planning
Sequence Build/Validation
Uplink
7.00
4.00
10
Courtesy: Jim Erickson
Real-TIme Monitoring
Real-TIme Monitoring
11
12
13
14
15
16
17
18
19
20
21
22
23
0
1
2
3
4
5
6
7
8
9
MAPGEN: Automated
Science Planning for MER
Planning Lead: Kanna Rajan (ARC)
EUROPA
EUROPA
Automated
Automated
Planning
PlanningSystem
System
Flight Rules
Engineering
Sequence
Build
Resource
Constraints
Science
Navigation
DSN/Telcom
Science Team
Satellite Dish
Next Challenge: Mars Smart Lander
(2009)
Mission Duration: 1000 days
Total Traverse: 3000-69000 meters
Meters/Day: 230-450
Science Mission: 7 instruments, sub-surface science
package (drill, radar), in-situ sample “lab”
Technology Demonstration:
(2005).
Course Challenge: 16.413 Fall 03
• What would it be like to operate MER if it
was fully autonomous?
Potential inspiration for course projects:
• Demonstrate an autonomous MER mission
in simulation, and in the MIT rover testbed.
Outline
•
•
•
•
•
Operational Planning for the Mars Exploration Rovers
Review of Least Commitment Planning
Constraint-based Interval Planning
Temporal Constraint Networks
Temporal Constraints with Preference
Based on slides by Dave Smith, NASA Ames
Planning
Find:
program of actions that achieves the objective
Planning
Find:
program of actions that achieves the objective
partially-ordered set
typically unconditional
goals
Paradigms
Classical planning
(STRIPS, operator-based, first-principles)
“generative”
Hierarchical Task Network planning
“practical” planning
MDP & POMDP planning
planning under uncertainty
The Classical Representation
Initial Conditions:
P1
P2
P3
P4
Operators:
pre1
pre2
Op
eff2
pre3
Goals:
Goal1
eff1
Goal2
Goal3
Simple Spacecraft Problem
Observation-1
target
instruments
Observation-2
Observation-3
Observation-4
…
pointing
calibrated
Example
Init
pC
Actions
pC
C
Goal
c
py
px
Ty
¬px
c
Im
Ix
px
16.410/13: Solved using Graph-based Planners (Blum & Furst)
IA
Some STRIPS Operators
TakeImage (?target, ?instr):
Pre: Status(?instr, Calibrated), Pointing(?target)
Eff: Image(?target)
Calibrate (?instrument):
Pre: Status(?instr, On), Calibration-Target(?target), Pointing(?target)
Eff: ¬Status(?inst, On), Status(?instr, Calibrated)
Turn (?target):
Pre: Pointing(?direction), ?direction ≠ ?target
Eff: ¬Pointing(?direction), Pointing(?target)
Based on slides by Dave Smith, NASA Ames
Partial Order Causal Link Planning
(SNLP, UCPOP)
IA
1. Select an open condition
c
2. Choose an op that can achieve it
pA
Im
F
IA
F
Link to an existing instance
pC
Add a new instance
C
3. Resolve threats
c
pA
pC
C
C
S
pA
pC
TA
pA
c
Im
IA
F
pC
C
S
¬pC
F
Im
IA
F
c
pA
pC
IA
c
S
pC
Im
Im
TA
¬pC
IA
F
Outline
•
•
•
•
•
Operational Planning for the Mars Exploration Rovers
Review of Least Commitment Planning
Constraint-based Interval Planning
Temporal Constraint Networks
Temporal Constraints with Preference
Based on slides by Dave Smith, NASA Ames
An Autonomous Science Explorer
Observation-1
priority
time window
target
instruments
duration
Observation-2
Observation-3
Observation-4
…
Based on slides by Dave Smith, NASA Ames
Objective:
maximize science return
Complications
Observation-1
priority
linked
time window
target
instruments
duration
Observation-2
angle between targets
⇒ turn duration
calibration
target1
target2
…
Observation-3
Observation-4
…
consumables:
fuel
power
data storage
cryogen
Based on slides by Dave Smith, NASA Ames
Objective:
maximize science return
Limitations of Classical Planning
with Atomic Actions (aka STRIPS)
Instantaneous actions
No temporal constraints
No concurrent actions
No continuous quantities
Based on slides by Dave Smith, NASA Ames
Needed Extensions
Time
Resources
Utility
Uncertainty
Based on slides by Dave Smith, NASA Ames
World Description
State-centric (Mc Carthy):
for each time describe propositions that are true
Pointing(Earth)
Status(Cam2, Calibrated)
¬ Image(A7)
Turn(A7)
Pointing(A7)
Status(Cam2, Calibrated)
¬ Image(A7)
History-based (Hayes):
for each proposition describe times it is true
Pointing(Earth)
Turn(A7)
Pointing(A7)
Status(Cam2, Calibrated)
Based on slides by Dave Smith, NASA Ames
Representing Timing:
Qualitative Temporal Relations [Allen AAAI83]
A before B
A
A meets B
A
A overlaps B
B
B
A
B
A
A contains B
B
A
A=B
B
A
A starts B
B
A ends B
Based on slides by Dave Smith, NASA Ames
A
B
Representing Temporal Operators:
TakeImage Schema
TakeImage (?target, ?instr):
Pre: Status(?instr, Calibrated), Pointing(?target)
Eff: Image(?target)
TakeImage (?target, ?instr)
contained-by
Status(?instr, Calibrated)
contained-by
Pointing(?target)
meets
Image(?target)
Based on slides by Dave Smith, NASA Ames
Pictorially
TakeImage (?target, ?instr)
contained-by
Status(?instr, Calibrated)
contained-by
Pointing(?target)
meets
Image(?target)
Pointing(?target)
contains
TakeImage(?target, ?instr)
contains
Status(?instr, Calibrated)
Based on slides by Dave Smith, NASA Ames
meets
Image(?target)
TakeImage Schema Semantics
TakeImage (?target, ?instr)
contained-by
Status(?instr, Calibrated)
contained-by
Pointing(?target)
meets
Image(?target)
TakeImage(?target, ?instr)A
⇒ ∃P {Status(?instr, Calibrated)P ∧ Contains(P, A)}
∧ ∃Q {Pointing(?target)Q ∧ Contains(Q, A)}
∧ ∃R {Image(?target)R ∧ Meets(A, R)}
Based on slides by Dave Smith, NASA Ames
Turn
Turn (?target)
met-by
meets
Pointing(?direction)
Based on slides by Dave Smith, NASA Ames
Pointing(?direction)
Pointing(?target)
meets
Turn(?target)
meets
Pointing(?target)
Calibrate
Calibrate (?instr)
met-by
contained-by
contained-by
meets
Status(?instr, On)
CalibrationTarget(?target)
Pointing(?target)
Status(?instr, Calibrated)
Pointing(?target)
contains
Status(?instr, On)
meets
Calibrate(?instr)
meets
contains
CalibrationTarget(?target)
Based on slides by Dave Smith, NASA Ames
Status(?instr, Calibrated)
A Temporal Planning Problem
Pointing(Earth)
Status(Cam1, Off)
Past
-∞
Image(?target)
meets
Status(Cam2, On)
CalibrationTarget(T17)
Based on slides by Dave Smith, NASA Ames
meets
Future
∞
A Consistent Complete
Temporal Plan
Turn(A7)
Pointing(Earth)
meets
Past
-∞
meets
Pointing(T17)
TakeImage(A7, Cam2)
contains
meets
Status(Cam2, On)
meets
Calibrate(Cam2)
contains
CalibrationTarget(T17)
Based on slides by Dave Smith, NASA Ames
Pointing(A7)
contains
meets
Turn(T17)
Status(Cam1, Off)
meets
contains
meets
Status(Cam2, Calibrated)
meets
Image(A7)
meets
Future
∞
CBI Planning Algorithm
Choose:
introduce an action & instantiate constraints
coalesce propositions
Propagate constraints
Based on slides by Dave Smith, NASA Ames
Initial Plan
Pointing(Earth)
Status(Cam1, Off)
Past
-∞
Image(?target)
meets
Status(Cam2, On)
CalibrationTarget(T17)
Based on slides by Dave Smith, NASA Ames
meets
Future
∞
Expansion 1
Pointing(Earth)
before
Status(Cam1, Off)
st
meets
Pointing(A7)
contains
TakeImage(A7, ?instr)
Status(Cam2, On)
CalibrationTarget(T17)
Based on slides by Dave Smith, NASA Ames
contains
Status(?instr, Calibrated)
meets
Image(A7)
meets
Future
∞
Expansion 2
Pointing(?direction)
ting(Earth)
meets
Turn(A7)
meets
contains
before
TakeImage(A7, ?instr)
Pointing(?caltarget)
atus(Cam1, Off)
atus(Cam2, On)
contains
Status(?instr,
On)
brationTarget(T17)
Based on slides by Dave Smith, NASA Ames
Pointing(A7)
meets
Calibrate(?instr)
contains
meets
contains
CalibrationTarget(?caltarget
)
Status(?instr, Calibrated)
meets
Image
Coalescing
Pointing(?direction)
ng(Earth)
meets
Turn(A7)
meets
contains
before
before
TakeImage(A7, Cam2)
Pointing(T17)
tus(Cam1, Off)
contains
Status(Cam2, On)
meets
Calibrate(Cam2)
contains
CalibrationTarget(T17)
Based on slides by Dave Smith, NASA Ames
Pointing(A7)
contains
meets
Status(Cam2, Calibrated)
meets
Image(
Coalescing
Turn(A7)
nting(Earth)
meets
contains
meets
before
TakeImage(A7, Cam2)
Pointing(T17)
tatus(Cam1, Off)
contains
Status(Cam2, On)
meets
Calibrate(Cam2)
contains
CalibrationTarget(T17)
Based on slides by Dave Smith, NASA Ames
Pointing(A7)
contains
meets
Status(Cam2, Calibrated)
meets
Imag
Expansion 3
Pointing(?direction)
ting(Earth)
Turn(A7)
meets
Turn(T17)
atus(Cam1, Off)
meets
contains
meets
meets
TakeImage(A7, Cam2)
Pointing(T17)
contains
Status(Cam2, On)
meets
Calibrate(Cam2)
contains
CalibrationTarget(T17)
Based on slides by Dave Smith, NASA Ames
Pointing(A7)
contains
meets
Status(Cam2, Calibrated)
meets
Image
Coalescing
Turn(A7)
inting(Earth)
meets
meets
TakeImage(A7, Cam2)
Pointing(T17)
contains
Status(Cam2, On)
meets
Calibrate(Cam2)
contains
CalibrationTarget(T17)
Based on slides by Dave Smith, NASA Ames
Pointing(A7)
contains
meets
Turn(T17)
Status(Cam1, Off)
meets
contains
meets
Status(Cam2, Calibrated)
meets
Imag
Relation to Causal Links & Threats
POCL
CBI
Causal links:
meets
proposition
action
action
action
meets
action
proposition
Threats:
proposition
action
action
threatens
action
Based on slides by Dave Smith, NASA Ames
action
proposition
mutex
proposition
action
Examples of CBI Planners
Zeno (Penberthy)
intervals, no CSP
Trains (Allen)
Descartes (Joslin)
extreme least commitment
IxTeT (Ghallab)
functional rep.
HSTS (Muscettola)
functional rep., activities
EUROPA (Jonsson)
functional rep., activities
Based on slides by Dave Smith, NASA Ames
Outline
•
•
•
•
•
Operational Planning for the Mars Exploration Rovers
Review of Least Commitment Planning
Constraint-based Interval Planning
Temporal Constraint Networks
Model-based Program Execution
as Graph-based Temporal Planning
Based on slides by Dave Smith, NASA Ames
Qualitative Temporal Constraints
(Allen 83)
•
•
•
•
•
•
•
x before y
x meets y
x overlaps y
x during y
x starts y
x finishes y
x equals y
X
Y
X
Y
X
Y
XY
X Y
Y X
Y
X
Based on slides by Dave Smith, NASA Ames
•
•
•
•
•
•
•
y after x
y met-by x
y overlapped-by x
y contains x
y started-by x
y finished-by x
y equals x
Example: Deep Space One
Remote Agent Experiment
Timer
Max_Thrust
Idle
Idle
contained_by
SEP_Segment
Idle_Seg
Th_Sega
Th_Seg
contained_by
Th_Seg
Th_Seg
Th_Seg Idle_Seg
contained_by
Accum
Thr_Boundary Accum_Thr
Accum_NO_Thr
equals
SEP Action
Accum_Thr
Accum_Thr
Thr_Boundary
equals
meets
meets
Standby
Start_Up
Thrust
Thrust
Standby
Shut_Down
Attitude
Based on slides by Dave Smith, NASA Ames
Start_Up
Thrust
contained_by
CP(Ips_Tvc)
CP(Ips_Tvc)
Poke
Thrust
Shut_Down
CP(Ips_Tvc)
Standby
Qualitative Temporal Constraints
Maybe Expressed as Inequalities
(Vilain, Kautz 86)
•
•
•
•
•
•
•
x before y
x meets y
x overlaps y
x during y
x starts y
x finishes y
x equals y
X+ < YX+ = Y(Y- < X+) & (X- < Y+)
(Y- < X-) & (X+ < Y+)
(X- = Y-) & (X+ < Y+)
(X- < Y-) & (X+ = Y+)
(X- = Y-) & (X+ = Y+)
Inequalities may be expressed as binary interval relations:
X+ - Y- < [-inf, 0]
Based on slides by Dave Smith, NASA Ames
Metric Constraints
•
Going to the store takes at least 10 minutes and at most 30 minutes.
→ 10 < [T+(store) – T-(store)] < 30
•
Bread should be eaten within a day of baking.
→ 0 < [T+(baking) – T-(eating)] < 1 day
•
Inequalities, X+ < Y- , may be expressed as binary interval relations:
→ - inf < [X+ - Y-] < 0
Based on slides by Dave Smith, NASA Ames
Metric Time: Quantitative Temporal
Constraint Networks
(Dechter, Meiri, Pearl 91)
• A set of time points Xi at which events occur.
• Unary constraints
(a0 < Xi < b0 ) or (a1 < Xi < b1 ) or . . .
• Binary constraints
(a0 < Xj - Xi < b0 ) or (a1 < Xj - Xi < b1 ) or . . .
Based on slides by Dave Smith, NASA Ames
Temporal Constraint
Satisfaction Problem (TCSP)
< Xi, Ti , Tij >
continuous variables
• Xi
• Ti , Tij
interval constraints
{I1, . . . ,In } where Ii = [ai,bi]
– Ti = (ai ≤ Xi ≤ bi) or . . . or (ai ≤ Xi ≤ bi)
– Tij = (a1≤ Xi - Xj ≤ b1) or ... or (an ≤ Xi - Xj ≤ bn)
Based on slides by Dave Smith, NASA Ames
[Dechter, Meiri, Pearl, aij89]
TCSP Are Visualized Using
Directed Constraint Graphs
0
[10,20]
1
[30,40]
[60,inf]
3
[10,20]
2
[20,30]
[40,50]
[60,70]
Based on slides by Dave Smith, NASA Ames
4
Simple Temporal Networks
(Dechter, Meiri, Pearl 91)
Simple Temporal Networks:
• A set of time points Xi at which events occur.
• Unary constraints
(a0 < Xi < b0 ) or (a1 < Xi < b1 ) or . . .
• Binary constraints
(a0 < Xj - Xi < b0 ) or (a1 < Xj - Xi < b1 ) or . . .
Sufficient to represent:
• most Allen relations
• simple metric constraints
Based on slides by Dave Smith, NASA Ames
Can’t represent:
• Disjoint activities
Simple Temporal Network
• Tij = (aij≤ Xi - Xj ≤ bij)
0
[10,20]
1
[30,40]
[60,inf]
3
[10,20]
2
Based on slides by Dave Smith, NASA Ames
[20,30]
[40,50]
[60,70]
4
A Completed Plan Forms an STN
Thrust
Goals
Delta_V(direction=b, magnitude=200)
Power
Attitude
Point(a) Turn(a,b)
Engine
Off
Based on slides by Dave Smith, NASA Ames
Warm Up
Point(b)
Thrust (b, 200)
Turn(b,a)
Off
A Completed Plan Forms an STN
[0, 300]
[1035, 1035]
[0, + ∞]
[0, + ∞ ]
<0, 0>
[0, 0]
[130,170]
Based on slides by Dave Smith, NASA Ames
Outline
•
•
•
•
•
Operational Planning for the Mars Exploration Rovers
Review of Least Commitment Planning
Constraint-based Interval Planning
Temporal Constraint Networks
Temporal Constraints with Preference
Based on slides by Dave Smith, NASA Ames
Download