Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tutorials:demo:fetch_and_place_solutions [2019/09/04 19:26] – [Exercise 2] invert the robot transform gkazhoya | tutorials:demo:fetch_and_place_solutions [2019/09/04 19:38] – [Exercise 3] gkazhoya | ||
---|---|---|---|
Line 102: | Line 102: | ||
| | ||
(type ? | (type ? | ||
- | + | ||
;; If the action fails, try the following: | ;; If the action fails, try the following: | ||
;; try different look directions until there is none left. | ;; try different look directions until there is none left. | ||
Line 129: | Line 129: | ||
(setf ? | (setf ? | ||
(setf possible-torso-link-positions (rest possible-torso-link-positions)) | (setf possible-torso-link-positions (rest possible-torso-link-positions)) | ||
+ | (setf possible-look-directions `(, | ||
+ | , | ||
+ | , | ||
+ | (setf ? | ||
(perform (a motion | (perform (a motion | ||
(type moving-torso) | (type moving-torso) | ||
Line 137: | Line 141: | ||
- | (defun move-bottle (bottle-spawn-pose) | ||
- | (spawn-object bottle-spawn-pose) | ||
- | (with-simulated-robot | ||
- | (let ((? | ||
- | (cpl:par | ||
- | ;; Moving the robot near the table. | ||
- | (perform (an action | ||
- | (type going) | ||
- | | ||
- | (pose ? | ||
- | (perform (a motion | ||
- | (type moving-torso) | ||
- | (joint-angle 0.3))) | ||
- | (park-arms))) | ||
- | (let* ((? | ||
- | | ||
- | | ||
- | ;; 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 ? | ||
</ | </ |