Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
tutorials:intermediate:performing_plans [2016/07/21 15:36] – gkazhoya | tutorials:intermediate:performing_plans [2022/03/30 21:26] – [Plan goals] schimpf | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Performing | + | ====== Performing |
===== Basic functionality ===== | ===== Basic functionality ===== | ||
Line 8: | Line 8: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (ros-load: | + | CL-USER> (ros-load: |
- | ;; or ,r-l-s RET cram_plan_library | + | ;; or ,r-l-s RET cram_executive |
</ | </ | ||
Line 15: | Line 15: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (cpl: | + | CL-USER> (cpl: |
- | | + | |
+ | | ||
</ | </ | ||
Line 22: | Line 23: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (prolog: | + | CL-USER> (prolog: |
- | | + | |
- | | + | (desig: |
- | | + | (desig: |
</ | </ | ||
Line 34: | Line 35: | ||
<code lisp> | <code lisp> | ||
CL-USER> (cpl: | CL-USER> (cpl: | ||
- | (plan-lib:perform (desig:an action (to eat) (yummy pizza)))) | + | (exe:perform (desig:an action (to eat) (yummy pizza)))) |
hmmm... nomnomnom... PIZZA | hmmm... nomnomnom... PIZZA | ||
+ | NIL | ||
+ | #<A ACTION | ||
+ | (TO EAT) | ||
+ | (YUMMY PIZZA)> | ||
</ | </ | ||
Line 44: | Line 49: | ||
<code lisp> | <code lisp> | ||
CL-USER> (cpl: | CL-USER> (cpl: | ||
- | (plan-lib:perform (desig:an action (to eat) (yummy pizza) (goal (object-eaten pizza))))) | + | (exe:perform (desig:an action (to eat) (yummy pizza) (goal (object-eaten pizza))))) |
WARNING: | WARNING: | ||
| | ||
Line 62: | Line 67: | ||
CL-USER> (defparameter *pizza-eaten-p* nil) | CL-USER> (defparameter *pizza-eaten-p* nil) | ||
*PIZZA-EATEN-P* | *PIZZA-EATEN-P* | ||
- | CL-USER> (cpl: | + | CL-USER> (cpl: |
- | | + | |
+ | | ||
(setf *pizza-eaten-p* t)) | (setf *pizza-eaten-p* t)) | ||
- | STYLE-WARNING: | + | ; in: CRAM-LANGUAGE-IMPLEMENTATION: |
+ | ; (TYPE (OR STRING NULL) ?YUMMY) | ||
+ | ; | ||
+ | ; caught | ||
+ | ; | ||
+ | ; | ||
+ | ; compilation unit finished | ||
+ | ; | ||
+ | ; ? | ||
+ | ; | ||
EAT | EAT | ||
CL-USER> (prolog: | CL-USER> (prolog: | ||
- | | + | |
| | ||
| | ||
Line 79: | Line 94: | ||
<code lisp> | <code lisp> | ||
PLAN-LIB> | PLAN-LIB> | ||
- | (plan-lib:perform (desig:an action (to eat) (yummy pizza) (goal (object-eaten pizza))))) | + | (exe:perform (desig:an action (to eat) (yummy pizza) (goal (object-eaten pizza))))) |
hmmm... nomnomnom... PIZZA | hmmm... nomnomnom... PIZZA | ||
NIL | NIL | ||
Line 87: | Line 102: | ||
Please keep in mind that if there are multiple solutions to a particular action designator, i.e. it resolves to different plans, the first one that is defined will be executed. Ordering is not yet implemented and should probably be taken care of explicitly in the plans anyway. | Please keep in mind that if there are multiple solutions to a particular action designator, i.e. it resolves to different plans, the first one that is defined will be executed. Ordering is not yet implemented and should probably be taken care of explicitly in the plans anyway. | ||
- | + | Summary: **make sure an action designator you use for plans can only be resolved to one unique CRAM plan.** | |
- | Also, if the same action designator can be executed by both a process module or a high-level plan, the precedence will always be given to the process module as it should get the most specific designators. | + | |
- | + | ||
- | Summary: **make sure an action designator you use for plans can only be resolved to one unique CRAM plan and that the process modules always get as input one level more detailed action designator than the plan. Even better is to not combine action designators for PMs and those for plans.** | + |