Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| tutorials:demo:fetch_and_place_solutions [2019/09/04 19:39] – [Exercise 1] gkazhoya | tutorials:demo:fetch_and_place_solutions [2019/09/04 19:54] (current) – [Exercise 1] gkazhoya | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| (defparameter *base-pose-near-sink-surface* | (defparameter *base-pose-near-sink-surface* | ||
| (make-pose " | (make-pose " | ||
| - | |||
| - | (defun search-and-pick-up-object (?obj-type) | ||
| - | (let ((? | ||
| - | (? | ||
| - | (handle-failure (or object-nowhere-to-be-found | ||
| - | object-unreachable) | ||
| - | | ||
| - | ((let* ((? | ||
| - | (? | ||
| - | ;; We update the value of ? | ||
| - | (setf ? | ||
| - | | ||
| - | | ||
| - | | ||
| - | (when (first ? | ||
| - | (print " | ||
| - | (setf ? | ||
| - | (setf ? | ||
| - | (perform (an action | ||
| - | (type going) | ||
| - | | ||
| - | (pose ? | ||
| - | (cpl: | ||
| - | (print " | ||
| - | (cpl:fail ' | ||
| - | | ||
| (defun move-bottle (bottle-spawn-pose) | (defun move-bottle (bottle-spawn-pose) | ||
| Line 56: | Line 30: | ||
| (joint-angle 0.3))) | (joint-angle 0.3))) | ||
| (park-arms))) | (park-arms))) | ||
| - | | + | |
| - | | + | |
| - | | + | |
| + | (let ((?possible-base-poses `(,*base-pose-near-table-towards-island* | ||
| + | , | ||
| + | | ||
| + | |||
| + | (handle-failure (or object-nowhere-to-be-found | ||
| + | object-unreachable) | ||
| + | |||
| + | ((find-object :bottle)) | ||
| + | |||
| + | | ||
| + | | ||
| + | (setf ?current-base-pose (first ?possible-base-poses)) | ||
| + | (setf ? | ||
| + | (perform (an action | ||
| + | (type going) | ||
| + | | ||
| + | (pose ? | ||
| + | (cpl: | ||
| + | (print " | ||
| + | (cpl:fail ' | ||
| + | |||
| + | (?grasping-arm | ||
| + | ;; We update the value of ? | ||
| + | | ||
| + | (park-arm ? | ||
| ;; Moving the robot near the counter. | ;; Moving the robot near the counter. | ||
| (let ((?nav-goal *base-pose-near-counter*)) | (let ((?nav-goal *base-pose-near-counter*)) | ||

