Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
playground:playground [2019/07/10 10:32] – tlipps | playground:playground [2019/07/10 11:58] – tlipps | ||
---|---|---|---|
Line 16: | Line 16: | ||
After that the robot gets correctly positioned and kitchen objects spawned before starting. | After that the robot gets correctly positioned and kitchen objects spawned before starting. | ||
- | {{playground: | + | {{ playground: |
Since we passed '' | Since we passed '' | ||
Line 260: | Line 260: | ||
<code lisp> | <code lisp> | ||
(defun transport (&key | (defun transport (&key | ||
- | ((:object ? | + | |
- | ((: | + | ((: |
- | ((: | + | ((: |
- | ((: | + | ((: |
- | ((:arm ?arm)) | + | ((:arm ?arm)) |
- | ((:grasp ?grasp)) | + | ((:grasp ?grasp)) |
- | ((:arms ?arms)) | + | ((:arms ?arms)) |
- | ((:grasps ?grasps)) | + | ((:grasps ?grasps)) |
- | ((: | + | ((: |
- | ((: | + | ((: |
- | search-location-accessible | + | search-location-accessible |
- | delivery-location-accessible | + | delivery-location-accessible |
- | & | + | & |
</ | </ | ||
- | text... | + | |
<code lisp> | <code lisp> | ||
(unless search-location-accessible | (unless search-location-accessible | ||
- | (exe: | + | |
- | (type accessing) | + | |
- | (location ? | + | |
- | (distance 0.3)))) | + | |
</ | </ | ||
Line 288: | Line 288: | ||
<code lisp> | <code lisp> | ||
(unwind-protect | (unwind-protect | ||
- | (let ((? | + | (let ((? |
- | (exe: | + | |
- | (type searching) | + | (type searching) |
- | (object ? | + | (object ? |
- | (location ? | + | (location ? |
- | (desig:when ? | + | (desig:when ? |
- | (robot-location ? | + | (robot-location ? |
</ | </ | ||
To fetch the object the object first has to be searched. For this we create | To fetch the object the object first has to be searched. For this we create | ||
Line 313: | Line 313: | ||
<code lisp> | <code lisp> | ||
(unless ? | (unless ? | ||
- | (setf ? | + | (setf ? |
- | (desig:a location | + | |
- | (reachable-for ? | + | (reachable-for ? |
- | (desig:when ?arm | + | (desig:when ?arm |
- | (arm ?arm)) | + | (arm ?arm)) |
- | (object ? | + | (object ? |
- | (unless ? | + | |
- | (setf ? | + | |
- | (desig:a location | + | |
- | (reachable-for ? | + | (reachable-for ? |
- | (location ? | + | (location ? |
</ | </ | ||
Moreover, we need the fetch- and deliver-robot-locations. The ? | Moreover, we need the fetch- and deliver-robot-locations. The ? | ||
<code lisp> | <code lisp> | ||
- | ;; If running on the real robot, execute below task tree in projection | + | ;; If running on the real robot, execute below task tree in projection |
- | ;; N times first, then pick the best parameterization | + | |
- | ;; and use that parameterization in the real world. | + | |
- | ;; If running in projection, just execute the task tree below as normal. | + | |
- | (let (? | + | |
- | (proj-reasoning: | + | |
- | (? | + | |
- | ? | + | ? |
- | 3 | + | |
- | #' | + | |
- | (let ((? | + | (let ((? |
- | (exe: | + | |
- | (type fetching) | + | (type fetching) |
- | (desig:when ?arm | + | (desig:when ?arm |
- | (arm ?arm)) | + | (arm ?arm)) |
- | (desig:when ?grasp | + | (desig:when ?grasp |
- | (grasp ?grasp)) | + | (grasp ?grasp)) |
- | (desig:when ?arms | + | (desig:when ?arms |
- | (arms ?arms)) | + | (arms ?arms)) |
- | (desig:when ?grasps | + | (desig:when ?grasps |
- | (grasps ?grasps)) | + | (grasps ?grasps)) |
- | (object ? | + | (object ? |
- | (robot-location ? | + | (robot-location ? |
- | (pick-up-action ? | + | (pick-up-action ? |
</ | </ | ||
Now we create the action designator fetching and execute it. If the arms and graps are given we set them so they will be used by '' | Now we create the action designator fetching and execute it. If the arms and graps are given we set them so they will be used by '' | ||
Line 358: | Line 358: | ||
<code lisp> | <code lisp> | ||
(unless delivery-location-accessible | (unless delivery-location-accessible | ||
- | (exe: | + | (exe: |
- | (type accessing) | + | (type accessing) |
- | (location ? | + | (location ? |
- | (distance 0.3)))) | + | (distance 0.3)))) |
- | (unwind-protect | + | |
- | (exe: | + | (exe: |
- | (type delivering) | + | |
- | (desig:when ?arm | + | |
- | (arm ?arm)) | + | |
- | (object ? | + | |
- | (target ? | + | |
- | (robot-location ? | + | |
- | (place-action ? | + | |
- | (unless delivery-location-accessible | + | |
- | (exe: | + | |
- | (type sealing) | + | (type sealing) |
- | (location ? | + | (location ? |
- | (distance 0.3))))))))) | + | (distance 0.3)))))))))) |
</ | </ | ||
In the last part of this function we first check if the deliver location is accessible ('' | In the last part of this function we first check if the deliver location is accessible ('' | ||
<code lisp> | <code lisp> | ||
- | (unless search-location-accessible | + | (unless search-location-accessible |
- | (exe: | + | (exe: |
- | (type sealing) | + | |
- | (location ? | + | |
- | (distance 0.3)))))) | + | |
</ | </ | ||