Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
playground:playground [2019/07/10 09:53] tlippsplayground:playground [2019/07/10 10:32] tlipps
Line 490: Line 490:
 <code lisp> <code lisp>
 (defun fetch (&key (defun fetch (&key
-((:object ?object-designator)) +                ((:object ?object-designator)) 
-((:arms ?arms)) +                ((:arms ?arms)) 
-((:grasps ?grasps)) +                ((:grasps ?grasps)) 
-((:robot-location ?pick-up-robot-location)) +                ((:robot-location ?pick-up-robot-location)) 
-pick-up-action +                pick-up-action 
-&allow-other-keys) +              &allow-other-keys) 
-(declare (type desig:object-designator ?object-designator) +  (declare (type desig:object-designator ?object-designator) 
-(type list ?arms ?grasps) +           (type list ?arms ?grasps) 
-;; ?pick-up-robot-location should not be NULL at the beginning +           ;; ?pick-up-robot-location should not be NULL at the beginning 
-;; but can become NULL during execution of the plan +           ;; but can become NULL during execution of the plan 
-(type (or desig:location-designator null) ?pick-up-robot-location) +           (type (or desig:location-designator null) ?pick-up-robot-location) 
-(type (or desig:action-designator null) pick-up-action)) +           (type (or desig:action-designator null) pick-up-action)) 
-"Fetches a perceived object `?object-designator' with +  "Fetches a perceived object `?object-designator' with 
-one of arms in the `?arms' lazy list (if not NIL) and one of grasps +one of arms in the `?arms' lazy list (if not NIL) and one of grasps in `?grasps' if not NIL, 
-in `?grasps' if not NIL, while standing at `?pick-up-robot-location'+while standing at `?pick-up-robot-location'
 and using the grasp and arm specified in `pick-up-action' (if not NIL)." and using the grasp and arm specified in `pick-up-action' (if not NIL)."
 </code> </code>
Line 512: Line 512:
 <code lisp> <code lisp>
 (cpl:with-failure-handling (cpl:with-failure-handling
-((desig:designator-error (e) +      ((desig:designator-error (e) 
-(roslisp:ros-warn (fd-plans fetch) "~a~%Propagating up." e) +         (roslisp:ros-warn (fd-plans fetch) "~a~%Propagating up." e) 
-(cpl:fail 'common-fail:object-unfetchable +         (cpl:fail 'common-fail:object-unfetchable 
-:object ?object-designator +                   :object ?object-designator 
-:description "Some designator could not be resolved.")))+                   :description "Some designator could not be resolved.")))
 </code> </code>
  
Line 522: Line 522:
  
 <code lisp> <code lisp>
-;; take a new `?pick-up-robot-location' sample if a failure happens  + ;; take a new `?pick-up-robot-location' sample if a failure happens 
-(cpl:with-retry-counters ((relocation-for-ik-retries 20)) +    (cpl:with-retry-counters ((relocation-for-ik-retries 20)) 
-(cpl:with-failure-handling +      (cpl:with-failure-handling 
-(((or common-fail:navigation-goal-in-collision ;; from navigation action +          (((or common-fail:navigation-goal-in-collision 
-common-fail:looking-high-level-failure ;; from turning-towards action +                common-fail:looking-high-level-failure 
-common-fail:perception-low-level-failure +                common-fail:perception-low-level-failure 
-common-fail:object-unreachable ;; from picking-up +                common-fail:object-unreachable 
-common-fail:manipulation-low-level-failure) (e) ;; and this too +                common-fail:manipulation-low-level-failure) (e) 
-(common-fail:retry-with-loc-designator-solutions +             (common-fail:retry-with-loc-designator-solutions 
-?pick-up-robot-location +                 ?pick-up-robot-location 
-relocation-for-ik-retries +                 relocation-for-ik-retries 
-(:error-object-or-string +                 (:error-object-or-string 
-(format NIL "Object of type ~a is unreachable: ~a" +                  (format NIL "Object of type ~a is unreachable: ~a" 
-(desig:desig-prop-value ?object-designator :type) e) +                          (desig:desig-prop-value ?object-designator :type) e) 
-:warning-namespace (fd-plans fetch) +                  :warning-namespace (fd-plans fetch) 
-:rethrow-failure 'common-fail:object-unfetchable))))+                  :rethrow-failure 'common-fail:object-unfetchable))))
 </code> </code>
  
Line 543: Line 543:
  
 <code lisp> <code lisp>
-;; navigate, look, detect and pick-up + ;; navigate, look, detect and pick-up 
-(exe:perform (desig:an action +        (exe:perform (desig:an action 
-(type navigating) +                               (type navigating) 
-(location ?pick-up-robot-location)))+                               (location ?pick-up-robot-location)))
 </code> </code>
  
-The first action should move the robot without any collisions to the location ''?pick-up-robot-location''. The location designator looks e.g. like this: +The first action should move the robot without any collisions to the location ''?pick-up-robot-location''. The location designator looks e. g. like this: 
  
 <code lisp> <code lisp>
Line 597: Line 597:
 <code lisp> <code lisp>
 (exe:perform (desig:an action (exe:perform (desig:an action
-(type turning-towards) +                               (type turning-towards) 
-(target (desig:a location (of ?object-designator)))))+                               (target (desig:a location (of ?object-designator))))) 
 </code> </code>
  
Line 607: Line 608:
 (TYPE TURNING-TOWARDS) (TYPE TURNING-TOWARDS)
 (TARGET #<A LOCATION (TARGET #<A LOCATION
-(OF #<A OBJECT + (OF #<A OBJECT 
-(LOCATION #<A LOCATION + (LOCATION #<A LOCATION 
-(ON #<A OBJECT + (ON #<A OBJECT 
-(TYPE COUNTER-TOP) + (TYPE COUNTER-TOP) 
-(URDF-NAME SINK-AREA-SURFACE) + (URDF-NAME SINK-AREA-SURFACE) 
-(OWL-NAME kitchen_sink_block_counter_top) + (OWL-NAME kitchen_sink_block_counter_top) 
-(PART-OF KITCHEN)>+ (PART-OF KITCHEN)>
-(SIDE LEFT) + (SIDE LEFT) 
-(SIDE FRONT) + (SIDE FRONT) 
-(RANGE-INVERT 0.5)>) + (RANGE-INVERT 0.5)>) 
-(TYPE BOWL) + (TYPE BOWL) 
-(NAME BOWL-1)+ (NAME BOWL-1)
 (POSE ((POSE (POSE ((POSE
 #<POSE-STAMPED  #<POSE-STAMPED 
Line 646: Line 647:
 #<A LOCATION #<A LOCATION
 (OF #<A OBJECT (OF #<A OBJECT
-(LOCATION #<A LOCATION + (LOCATION #<A LOCATION 
-(ON #<A OBJECT + (ON #<A OBJECT 
-(TYPE COUNTER-TOP) + (TYPE COUNTER-TOP) 
-(URDF-NAME SINK-AREA-SURFACE) + (URDF-NAME SINK-AREA-SURFACE) 
-(OWL-NAME "kitchen_sink_block_counter_top"+ (OWL-NAME "kitchen_sink_block_counter_top"
-(PART-OF KITCHEN)>+ (PART-OF KITCHEN)>
-(SIDE LEFT) + (SIDE LEFT) 
-(SIDE FRONT) + (SIDE FRONT) 
-(RANGE-INVERT 0.5)>) + (RANGE-INVERT 0.5)>) 
-(TYPE BOWL) + (TYPE BOWL) 
-(NAME BOWL-1)+ (NAME BOWL-1)
 (POSE ((:POSE (POSE ((:POSE
 #<CL-TRANSFORMS-STAMPED:POSE-STAMPED  #<CL-TRANSFORMS-STAMPED:POSE-STAMPED 
Line 679: Line 680:
 </code> </code>
  
- and returns a lazy list of pose-stamped with which then a looking action can be executed.+and returns a lazy list of pose-stamped with which then a looking action can be executed.
  
 <code lisp> <code lisp>
Line 685: Line 686:
 (TYPE LOOKING) (TYPE LOOKING)
 (TARGET #<A LOCATION (TARGET #<A LOCATION
-(OF #<A OBJECT + (OF #<A OBJECT 
-(LOCATION #<A LOCATION + (LOCATION #<A LOCATION 
-(ON #<A OBJECT + (ON #<A OBJECT 
-(TYPE COUNTER-TOP) + (TYPE COUNTER-TOP) 
-(URDF-NAME SINK-AREA-SURFACE) + (URDF-NAME SINK-AREA-SURFACE) 
-(OWL-NAME kitchen_sink_block_counter_top) + (OWL-NAME kitchen_sink_block_counter_top) 
-(PART-OF KITCHEN)>+ (PART-OF KITCHEN)>
-(SIDE LEFT) + (SIDE LEFT) 
-(SIDE FRONT) + (SIDE FRONT) 
-(RANGE-INVERT 0.5)>) + (RANGE-INVERT 0.5)>) 
-(TYPE BOWL) + (TYPE BOWL) 
-(NAME BOWL-1) + (NAME BOWL-1) 
-(POSE ((POSE+ (POSE ((POSE
 #<POSE-STAMPED  #<POSE-STAMPED 
 FRAME-ID: "base_footprint", STAMP: 1.560865813733836d9 FRAME-ID: "base_footprint", STAMP: 1.560865813733836d9
Line 720: Line 721:
  
 <code lisp> <code lisp>
-(cpl:with-retry-counters ((regrasping-retries 1)) + (cpl:with-retry-counters ((regrasping-retries 1)) 
-(cpl:with-failure-handling +          (cpl:with-failure-handling 
-((common-fail:gripper-low-level-failure (e) +              ((common-fail:gripper-low-level-failure (e) 
-(roslisp:ros-warn (fd-plans fetch) "Misgrasp happened: ~a~%" e) +                 (roslisp:ros-warn (fd-plans fetch) "Misgrasp happened: ~a~%" e) 
-(cpl:do-retry regrasping-retries +                 (cpl:do-retry regrasping-retries 
-(roslisp:ros-info (fd-plans fetch) "Reperceiving and repicking..."+                   (roslisp:ros-info (fd-plans fetch) "Reperceiving and repicking..."
-(exe:perform (desig:an action +                   (exe:perform (desig:an action 
-(type positioning-arm) +                                          (type positioning-arm) 
-(left-configuration park) +                                          (left-configuration park) 
-(right-configuration park))) +                                          (right-configuration park))) 
-(cpl:retry)) +                   (cpl:retry)) 
-(roslisp:ros-warn (fd-plans fetch) "No more regrasping retries left :'("+                 (roslisp:ros-warn (fd-plans fetch) "No more regrasping retries left :'("
-(cpl:fail 'common-fail:object-unreachable +                 (cpl:fail 'common-fail:object-unreachable 
-:description "Misgrasp happened and retrying didn't help.")))+                           :description "Misgrasp happened and retrying didn't help.")))
 </code> </code>
  
Line 739: Line 740:
  
 <code lisp> <code lisp>
-(let ((?more-precise-perceived-object-desig + (let ((?more-precise-perceived-object-desig 
-(exe:perform (desig:an action +                    (exe:perform (desig:an action 
-(type detecting) +                                           (type detecting) 
-(object ?object-designator)))))+                                           (object ?object-designator)))))
 </code> </code>
  
Line 748: Line 749:
  
 <code lisp> <code lisp>
-(let ((?arm (cut:lazy-car ?arms))) + (let ((?arm (cut:lazy-car ?arms))) 
-;; if picking up fails, try another arm +                ;; if picking up fails, try another arm 
-(cpl:with-retry-counters ((arm-retries 1)) +                (cpl:with-retry-counters ((arm-retries 1)) 
-(cpl:with-failure-handling +                  (cpl:with-failure-handling 
-(((or common-fail:manipulation-low-level-failure +                      (((or common-fail:manipulation-low-level-failure 
-common-fail:object-unreachable +                            common-fail:object-unreachable 
-desig:designator-error) (e) +                            desig:designator-error) (e) 
-(common-fail:retry-with-list-solutions +                         (common-fail:retry-with-list-solutions 
-?arms +                             ?arms 
-arm-retries +                             arm-retries 
-(:error-object-or-string +                             (:error-object-or-string 
-(format NIL "Manipulation failed: ~a.~%Next." e) +                              (format NIL "Manipulation failed: ~a.~%Next." e) 
-:warning-namespace (kvr plans) +                              :warning-namespace (kvr plans) 
-:rethrow-failure 'common-fail:object-unreachable) +                              :rethrow-failure 'common-fail:object-unreachable) 
-(setf ?arm (cut:lazy-car ?arms)))))+                           (setf ?arm (cut:lazy-car ?arms)))))
  
-(let ((?grasp (cut:lazy-car ?grasps))) +                    (let ((?grasp (cut:lazy-car ?grasps))) 
-;; if picking up fails, try another grasp orientation +                      ;; if picking up fails, try another grasp orientation 
-(cpl:with-retry-counters ((grasp-retries 4)) +                      (cpl:with-retry-counters ((grasp-retries 4)) 
-(cpl:with-failure-handling +                        (cpl:with-failure-handling 
-(((or common-fail:manipulation-low-level-failure +                            (((or common-fail:manipulation-low-level-failure 
-common-fail:object-unreachable +                                  common-fail:object-unreachable 
-desig:designator-error) (e) +                                  desig:designator-error) (e) 
-(common-fail:retry-with-list-solutions +                               (common-fail:retry-with-list-solutions 
-?grasps +                                   ?grasps 
-grasp-retries +                                   grasp-retries 
-(:error-object-or-string +                                   (:error-object-or-string 
-(format NIL "Picking up failed: ~a.~%Next" e) +                                    (format NIL "Picking up failed: ~a.~%Next" e) 
-:warning-namespace (kvr plans)) +                                    :warning-namespace (kvr plans)) 
-(setf ?grasp (cut:lazy-car ?grasps)))))+                                 (setf ?grasp (cut:lazy-car ?grasps)))))
 </code> </code>
  
-To allow the robotor to access the object with both arms and all possible grasps, the lists ''arms'' and ''grasps'' will be traversed like explained [[http://cram-system.org/tutorials/intermediate/simple_mobile_manipulation_plan#increasing_the_effectiveness_by_improving_the_plan|here]].+To allow the robot to access the object with both arms and all possible grasps, the lists ''arms'' and ''grasps'' will be traversed like explained [[http://cram-system.org/tutorials/intermediate/simple_mobile_manipulation_plan#increasing_the_effectiveness_by_improving_the_plan|here]].
  
 <code lisp> <code lisp>
 (let ((pick-up-action (let ((pick-up-action
-;; if pick-up-action already exists, +                                  ;; if pick-up-action already exists, 
-;; use its params for picking up +                                  ;; use its params for picking up 
-(or (when pick-up-action +                                  (or (when pick-up-action 
-(let* ((referenced-action-desig +                                        (let* ((referenced-action-desig 
-(desig:reference pick-up-action)) +                                                 (desig:reference pick-up-action)) 
-(?arm +                                               (?arm 
-(desig:desig-prop-value +                                                 (desig:desig-prop-value 
-referenced-action-desig +                                                  referenced-action-desig 
-:arm)) +                                                  :arm)) 
-(?grasp +                                               (?grasp 
-(desig:desig-prop-value +                                                 (desig:desig-prop-value 
-referenced-action-desig +                                                  referenced-action-desig 
-:grasp))) +                                                  :grasp))) 
-(desig:an action +                                          (desig:an action 
-(type picking-up) +                                                    (type picking-up) 
-(arm ?arm) +                                                    (arm ?arm) 
-(grasp ?grasp) +                                                    (grasp ?grasp) 
-(object +                                                    (object 
-?more-precise-perceived-object-desig)))) +                                                     ?more-precise-perceived-object-desig))))
-(desig:an action +
-(type picking-up) +
-(desig:when ?arm +
-(arm ?arm)) +
-(desig:when ?grasp +
-(grasp ?grasp)) +
-(object +
-?more-precise-perceived-object-desig)))))+
 </code> </code>
  
Line 830: Line 823:
  
 <code lisp> <code lisp>
-(exe:perform (desig:an action + (exe:perform (desig:an action 
-(type positioning-arm) +                                                   (type positioning-arm) 
-(left-configuration park) +                                                   (left-configuration park) 
-(right-configuration park))) +                                                   (right-configuration park))) 
-(desig:current-desig ?object-designator)))))))))))))))+                            (desig:current-desig ?object-designator)))))))))))))))
 </code> </code>
  
Line 844: Line 837:
  
 **deliver** **deliver**
 +
 <code lisp> <code lisp>
 (defun deliver (&key (defun deliver (&key
-((:object ?object-designator)) +                  ((:object ?object-designator)) 
-((:arm ?arm)) +                  ((:arm ?arm)) 
-((:target ?target-location)) +                  ((:target ?target-location)) 
-((:robot-location ?target-robot-location)) +                  ((:robot-location ?target-robot-location)) 
-place-action +                  place-action 
-&allow-other-keys) +                &allow-other-keys) 
-(declare (type desig:object-designator ?object-designator) +  (declare (type desig:object-designator ?object-designator) 
-(type (or keyword null) ?arm) +           (type (or keyword null) ?arm) 
-;; don't pass NULL as ?target-location or ?target-robot-location! +           ;; don't pass NULL as ?target-location or ?target-robot-location! 
-;; they can turn NULL during execution but not at the beginning +           ;; they can turn NULL during execution but not at the beginning 
-(type (or desig:location-designator null) ?target-location ?target-robot-location) +           (type (or desig:location-designator null) ?target-location ?target-robot-location) 
-(type (or desig:action-designator null) place-action)) +           (type (or desig:action-designator null) place-action)) 
-"Delivers `?object-designator' to `?target-location', where object is held in `?arm'+  "Delivers `?object-designator' to `?target-location', where object is held in `?arm'
 and the robot should stand at `?target-robot-location' when placing the object. and the robot should stand at `?target-robot-location' when placing the object.
 If a failure happens, try a different `?target-location' or `?target-robot-location'." If a failure happens, try a different `?target-location' or `?target-robot-location'."
 </code> </code>
 +The documentation of this method describes the input parameters and in the declare section you see which types the designators have.
 <code lisp> <code lisp>
-;; Reference the `?target-location' to see if that works at all +  ;; Reference the `?target-location' to see if that works at all 
-;; If not, delivering is impossible so throw a OBJECT-UNDERLIVERABLE failure +  ;; If not, delivering is impossible so throw a OBJECT-UNDERLIVERABLE failure 
-(cpl:with-failure-handling +  (cpl:with-failure-handling 
-((desig:designator-error (e) +      ((desig:designator-error (e) 
-(roslisp:ros-warn (fd-plans deliver) "~a~%Propagating up." e) +         (roslisp:ros-warn (fd-plans deliver) "~a~%Propagating up." e) 
-(cpl:fail 'common-fail:object-undeliverable +         (cpl:fail 'common-fail:object-undeliverable 
-:description "Some designator could not be resolved.")))+                   :description "Some designator could not be resolved.")))
 </code> </code>
  
-If the resolving from a designator fails we throw the above error.+If the resolving from a designator below fails we throw the above error.
  
 <code lisp> <code lisp>
-(cpl:with-retry-counters ((outer-target-location-retries 2)) +    (cpl:with-retry-counters ((outer-target-location-retries 2)) 
-(cpl:with-failure-handling +      (cpl:with-failure-handling 
-(((or desig:designator-error +          (((or desig:designator-error 
-common-fail:object-undeliverable) (e) +                common-fail:object-undeliverable) (e) 
-(common-fail:retry-with-loc-designator-solutions +             (common-fail:retry-with-loc-designator-solutions 
-?target-location +                 ?target-location 
-outer-target-location-retries +                 outer-target-location-retries 
-(:error-object-or-string +                 (:error-object-or-string 
-(format NIL "Undeliverable. Trying another target location.~%~a" e) +                  (format NIL "Undeliverable. Trying another target location.~%~a" e) 
-:warning-namespace (fd-plans deliver) +                  :warning-namespace (fd-plans deliver) 
-:reset-designators (list ?target-robot-location) +                  :reset-designators (list ?target-robot-location) 
-:rethrow-failure 'common-fail:object-undeliverable))))+                  :rethrow-failure 'common-fail:object-undeliverable))))
 </code> </code>
  
-Again this method uses same thinking as [[playground:search-for-object|playground:search-for-object]] with an 'outer-error-handler' (catching ''common-fail:object-undeliverable'') since we need a new ''target-robot-location'' too after we changed the ''target-location''.+Again this method uses same thinking as [[playground:search-for-object|playground:search-for-object]] with an 'outer-error-handler' (catching ''common-fail:object-undeliverable'') since we need a new ''?target-robot-location'' too after we changed the ''?target-location''.
  
 <code lisp> <code lisp>
 ;; take a new `?target-robot-location' sample if a failure happens ;; take a new `?target-robot-location' sample if a failure happens
-(cpl:with-retry-counters ((relocation-for-ik-retries 4)) +        (cpl:with-retry-counters ((relocation-for-ik-retries 4)) 
-(cpl:with-failure-handling +          (cpl:with-failure-handling 
-(((or common-fail:navigation-goal-in-collision +              (((or common-fail:navigation-goal-in-collision 
-common-fail:object-undeliverable +                    common-fail:object-undeliverable 
-common-fail:manipulation-low-level-failure) (e) +                    common-fail:manipulation-low-level-failure) (e) 
-(common-fail:retry-with-loc-designator-solutions +                 (common-fail:retry-with-loc-designator-solutions 
-?target-robot-location +                     ?target-robot-location 
-relocation-for-ik-retries +                     relocation-for-ik-retries 
-(:error-object-or-string +                     (:error-object-or-string 
-(format NIL "Object is undeliverable from base location.~%~a" e) +                      (format NIL "Object is undeliverable from base location.~%~a" e) 
-:warning-namespace (fd-plans deliver) +                      :warning-namespace (fd-plans deliver) 
-:rethrow-failure 'common-fail:object-undeliverable))))+                      :rethrow-failure 'common-fail:object-undeliverable)))) 
 + 
 +            ;; navigate 
 +            (exe:perform (desig:an action 
 +                                   (type navigating) 
 +                                   (location ?target-robot-location)))
  
-;; navigate 
-(exe:perform (desig:an action 
-(type navigating) 
-(location ?target-robot-location))) 
 </code> </code>
  
Line 932: Line 927:
  (RANGE-INVERT 0.5)>)>   (RANGE-INVERT 0.5)>)> 
 </code> </code>
-As you can see we have again like in [[playground:search-for-object|playground:search-for-object]] a nested location designator. Therefore, cram calls ''get-location-pose'' again with the outer and inner location designator and returns two times a lazy list of poses.+As you can see we have again like in [[playground:search-for-object|playground:search-for-object]] a nested location designator. Therefore, CRAM calls ''get-location-pose'' again with the outer and inner location designator and returns two times a lazy list of poses.
 If the navigation fails, we try four times another robot location where it can place the object. At the fifth retry the delivering method fails with an ''common-fail:navigation-goal-in-collision'' or ''common-fail:manipulation-low-level-failure'' error. The ''common-fail:common-fail:object-undeliverable'' error will be thrown from below code snippet. If the navigation fails, we try four times another robot location where it can place the object. At the fifth retry the delivering method fails with an ''common-fail:navigation-goal-in-collision'' or ''common-fail:manipulation-low-level-failure'' error. The ''common-fail:common-fail:object-undeliverable'' error will be thrown from below code snippet.
 If everything goes as intended the robot will stay in front of his target robot location like seen here. If everything goes as intended the robot will stay in front of his target robot location like seen here.
Line 941: Line 936:
  
 <code lisp> <code lisp>
-;; take a new `?target-location' sample if a failure happens + ;; take a new `?target-location' sample if a failure happens 
-(cpl:with-retry-counters ((target-location-retries 9)) +            (cpl:with-retry-counters ((target-location-retries 9)) 
-(cpl:with-failure-handling +              (cpl:with-failure-handling 
-(((or common-fail:looking-high-level-failure +                  (((or common-fail:looking-high-level-failure 
-common-fail:object-unreachable +                        common-fail:object-unreachable 
-common-fail:high-level-failure) (e) +                        common-fail:high-level-failure) (e) 
-(common-fail:retry-with-loc-designator-solutions +                     (common-fail:retry-with-loc-designator-solutions 
-?target-location +                         ?target-location 
-target-location-retries +                         target-location-retries 
-(:error-object-or-string (format NIL "Placing failed: ~a" e) +                         (:error-object-or-string (format NIL "Placing failed: ~a" e) 
-:warning-namespace (fd-plans deliver) +                          :warning-namespace (fd-plans deliver) 
-:reset-designators (list ?target-robot-location) +                          :reset-designators (list ?target-robot-location) 
-:rethrow-failure 'common-fail:object-undeliverable) +                          :rethrow-failure 'common-fail:object-undeliverable) 
-(roslisp:ros-warn (fd-plans deliver) +                       (roslisp:ros-warn (fd-plans deliver) 
-"Retrying with new placing location ...~%"))))+                                         "Retrying with new placing location ...~%"))))
  
-;; look +                ;; look 
-(exe:perform (desig:an action +                (exe:perform (desig:an action 
-(type turning-towards) +                                       (type turning-towards) 
-(target ?target-location)))+                                       (target ?target-location)))
 </code> </code>
  
Line 972: Line 967:
  
 <code lisp> <code lisp>
-;; place + ;; place 
-(let ((place-action +                (let ((place-action 
-(or (when place-action +                        (or (when place-action 
-(let* ((referenced-action-desig +                              (let* ((referenced-action-desig 
-(desig:reference place-action)) +                                       (desig:reference place-action)) 
-(?arm +                                     (?arm 
-(desig:desig-prop-value referenced-action-desig :arm)) +                                       (desig:desig-prop-value referenced-action-desig :arm)) 
-(?projected-target-location +                                     (?projected-target-location 
-(desig:desig-prop-value referenced-action-desig :target))) +                                       (desig:desig-prop-value referenced-action-desig :target))) 
-(desig:an action +                                (desig:an action 
-(type placing) +                                          (type placing) 
-(arm ?arm) +                                          (arm ?arm) 
-(object ?object-designator) +                                          (object ?object-designator) 
-(target ?projected-target-location)))) +                                          (target ?projected-target-location)))) 
-(desig:an action +                            (desig:an action 
-(type placing) +                                      (type placing) 
-(desig:when ?arm +                                      (desig:when ?arm 
-(arm ?arm)) +                                        (arm ?arm)) 
-(object ?object-designator) +                                      (object ?object-designator) 
-(target ?target-location)))))+                                      (target ?target-location)))))
 </code> </code>
  
Line 1013: Line 1008:
 ;; test function throws a high-level-failure if not good pose ;; test function throws a high-level-failure if not good pose
 (proj-reasoning:check-placing-pose-stability (proj-reasoning:check-placing-pose-stability
-?object-designator ?target-location)+ ?object-designator ?target-location)
 </code>  </code> 
  
Line 1023: Line 1018:
 (TYPE PLACING) (TYPE PLACING)
 (OBJECT #<A OBJECT (OBJECT #<A OBJECT
-(LOCATION #<A LOCATION + (LOCATION #<A LOCATION 
-(ON #<A OBJECT + (ON #<A OBJECT 
-(TYPE COUNTER-TOP) + (TYPE COUNTER-TOP) 
-(URDF-NAME SINK-AREA-SURFACE) + (URDF-NAME SINK-AREA-SURFACE) 
-(OWL-NAME "kitchen_sink_block_counter_top"+ (OWL-NAME "kitchen_sink_block_counter_top"
-(PART-OF KITCHEN)>+ (PART-OF KITCHEN)>
-(SIDE LEFT) + (SIDE LEFT) 
-(SIDE FRONT) + (SIDE FRONT) 
-(RANGE-INVERT 0.5)>) + (RANGE-INVERT 0.5)>) 
-(TYPE BOWL) + (TYPE BOWL) 
-(NAME BOWL-1) + (NAME BOWL-1) 
-(POSE ((:POSE+ (POSE ((:POSE
 #<CL-TRANSFORMS-STAMPED:POSE-STAMPED  #<CL-TRANSFORMS-STAMPED:POSE-STAMPED 
 FRAME-ID: "base_footprint", STAMP: 1.560941941216607d9 FRAME-ID: "base_footprint", STAMP: 1.560941941216607d9
Line 1054: Line 1049:
 #<3D-VECTOR (1.3993186950683594d0 0.8007776260375976d0 0.8886420567830403d0)> #<3D-VECTOR (1.3993186950683594d0 0.8007776260375976d0 0.8886420567830403d0)>
 #<QUATERNION (-0.005307710729539394d0 -0.00298106437548995d0 5.163229070603848d-4 0.9999813437461853d0)>>)))>) #<QUATERNION (-0.005307710729539394d0 -0.00298106437548995d0 5.163229070603848d-4 0.9999813437461853d0)>>)))>)
-(TARGET #<A LOCATION + (TARGET #<A LOCATION 
-(ON #<A OBJECT + (ON #<A OBJECT 
-(TYPE COUNTER-TOP) + (TYPE COUNTER-TOP) 
-(URDF-NAME KITCHEN-ISLAND-SURFACE) + (URDF-NAME KITCHEN-ISLAND-SURFACE) 
-(OWL-NAME "kitchen_island_counter_top"+ (OWL-NAME "kitchen_island_counter_top"
-(PART-OF KITCHEN)>+ (PART-OF KITCHEN)>
-(CONTEXT TABLE-SETTING) + (CONTEXT TABLE-SETTING) 
-(FOR #<A OBJECT + (FOR #<A OBJECT 
-(TYPE BOWL)>+ (TYPE BOWL)>
-(OBJECT-COUNT 3) + (OBJECT-COUNT 3) 
-(SIDE BACK) + (SIDE BACK) 
-(SIDE RIGHT) + (SIDE RIGHT) 
-(RANGE-INVERT 0.5)>)>  + (RANGE-INVERT 0.5)>)> 
-(exe:perform place-action))))))))))+
 </code> </code>
 +
 After all this we can finally execute the place action. After all this we can finally execute the place action.
 +
 +<code lisp>
 +(exe:perform place-action))))))))))
 +</code>
  
 {{playground:delivered.png?direct&600|}} {{playground:delivered.png?direct&600|}}