Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorials:demo:fetch_and_place_solutions [2019/09/04 19:38] – [Exercise 3] gkazhoya | tutorials:demo:fetch_and_place_solutions [2019/09/04 19:54] (current) – [Exercise 1] gkazhoya | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| (make-pose " | (make-pose " | ||
| - | (defun | + | (defun |
| - | (let ((?possible-base-poses `(,*base-pose-near-table-towards-island* , | + | (spawn-object bottle-spawn-pose) |
| - | (?current-base-pose | + | (with-simulated-robot |
| - | (handle-failure (or object-nowhere-to-be-found | + | (let ((?navigation-goal *base-pose-near-table*)) |
| - | object-unreachable) | + | (cpl:par |
| - | | + | ;; Moving |
| - | ((let* ((? | + | |
| - | (? | + | |
| - | ;; We update | + | |
| - | (setf ? | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | (when (first ? | + | |
| - | (print " | + | |
| - | (setf ? | + | |
| - | (setf ? | + | |
| (perform (an action | (perform (an action | ||
| (type going) | (type going) | ||
| - | | + | |
| - | (pose ? | + | (pose ? |
| - | (cpl: | + | (perform (a motion |
| - | (print " | + | (type moving-torso) |
| - | (cpl:fail ' | + | (joint-angle 0.3))) |
| + | (park-arms))) | ||
| + | |||
| + | (let ((? | ||
| + | |||
| + | (let ((? | ||
| + | , | ||
| + | (? | ||
| + | |||
| + | (handle-failure (or object-nowhere-to-be-found | ||
| + | object-unreachable) | ||
| + | |||
| + | ((find-object :bottle)) | ||
| + | |||
| + | (when (first ? | ||
| + | (print " | ||
| + | (setf ? | ||
| + | (setf ? | ||
| + | (perform (an action | ||
| + | (type going) | ||
| + | | ||
| + | (pose ? | ||
| + | | ||
| + | (print " | ||
| + | (cpl:fail ' | ||
| + | |||
| + | (? | ||
| + | ;; We update the value of ? | ||
| + | (setf ? | ||
| + | (park-arm ? | ||
| + | ;; Moving the robot near the counter. | ||
| + | (let ((?nav-goal *base-pose-near-counter*)) | ||
| + | (perform (an action | ||
| + | (type going) | ||
| + | | ||
| + | (pose ? | ||
| + | ;; Setting the object down on the counter | ||
| + | (let ((? | ||
| + | (perform (an action | ||
| + | (type placing) | ||
| + | (arm ? | ||
| + | | ||
| + | | ||
| + | (pose ? | ||
| + | (park-arm ? | ||
| </ | </ | ||

