Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
tutorials:intermediate:fetch_deliver_plans [2019/07/10 11:59] – tlipps | tutorials:intermediate:fetch_deliver_plans [2022/05/11 13:29] – khoshnam | ||
---|---|---|---|
Line 25: | Line 25: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj:: | + | CL-USER> (urdf-proj:: |
- | | + | " |
- | | + | 0.0 |
- | | + | (cl-transforms: |
- | | + | (cl-transforms: |
</ | </ | ||
Line 35: | Line 35: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj:: | + | CL-USER> (urdf-proj:: |
</ | </ | ||
Line 45: | Line 45: | ||
(cl-tf: | (cl-tf: | ||
(cl-tf: | (cl-tf: | ||
- | CL-USER> (pr2-proj:: | + | CL-USER> (urdf-proj:: |
#<A OBJECT | #<A OBJECT | ||
(TYPE CUP) | (TYPE CUP) | ||
Line 74: | Line 74: | ||
==== Projection process modules ==== | ==== Projection process modules ==== | ||
- | The PMs are implemented in '' | + | The PMs are implemented in '' |
To directly call a PM, use PM-EXECUTE function: | To directly call a PM, use PM-EXECUTE function: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
+ | (let ((?pose (cl-transforms-stamped: | ||
+ | " | ||
+ | | ||
+ | | ||
| | ||
- | 'pr2-proj::pr2-proj-navigation | + | 'urdf-proj::urdf-proj-navigation |
- | | + | (desig:an motion |
- | " | + | (type going) |
- | (cl-transforms: | + | (pose ?pose))))) |
- | (cl-transforms: | + | |
- | | + | |
- | | + | |
- | (target (desig:a location | + | |
- | | + | |
</ | </ | ||
| | ||
Line 96: | Line 95: | ||
To automatically dispatch motion designators to their correct PMs, there are the '' | To automatically dispatch motion designators to their correct PMs, there are the '' | ||
- | To execute a motion with automatic PM dispatching, | + | To execute a motion with automatic PM dispatching, |
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | (cram-executive: | + | |
- | | + | |
- | " | + | |
- | (cl-transforms: | + | |
- | (cl-transforms: | + | (cram-executive: |
- | (desig:a motion | + | |
- | | + | |
- | (target (desig:a location | + | |
- | | + | |
</ | </ | ||
| | ||
- | '' | + | '' |
It activates all the PMs defined in PR2's projection and sets up some environment variables to distinguish between real robot and projected robot, for example the TF publishers and subscribers, | It activates all the PMs defined in PR2's projection and sets up some environment variables to distinguish between real robot and projected robot, for example the TF publishers and subscribers, | ||
Line 125: | Line 122: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | (cram-executive: | + | (let ((?pose (cl-transforms-stamped: |
- | | + | " |
- | " | + | (cl-transforms: |
- | (cl-transforms: | + | (cl-transforms: |
- | (cl-transforms: | + | |
- | (desig:an action | + | (desig:an action |
- | (type going) | + | |
- | (target (desig:a location | + | |
- | | + | (pose ? |
</ | </ | ||
Line 140: | Line 137: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | (cram-executive: | + | |
- | | + | |
- | " | + | |
- | (cl-transforms: | + | |
- | (cl-transforms: | + | (cram-executive: |
- | (desig:an action | + | |
- | (type lifting) | + | (type lifting) |
- | (left-poses (? | + | (left-poses (? |
| | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | (cram-executive: | + | |
- | | + | |
- | " | + | |
- | (cl-transforms: | + | |
- | (cl-transforms: | + | (cram-executive: |
- | (desig:an action | + | |
- | (type reaching) | + | (type reaching) |
- | (left-poses (? | + | (left-poses (? |
</ | </ | ||
| | ||
Line 179: | Line 176: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | | + | |
- | (let ((?pose (cl-transforms-stamped: | + | (let ((?pose (cl-transforms-stamped: |
- | " | + | " |
- | (cl-transforms: | + | (cl-transforms: |
- | (cl-transforms: | + | (cl-transforms: |
- | (desig:an action | + | (desig:an action |
- | (type looking) | + | (type looking) |
- | (target (desig:a location (pose ? | + | (target (desig:a location (pose ? |
</ | </ | ||
Line 193: | Line 190: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | | + | |
- | (desig:an action | + | (desig:an action |
- | (type detecting) | + | (type detecting) |
- | (object (desig:an object (type cup)))))) | + | (object (desig:an object (type cup)))))) |
</ | </ | ||
| | ||
Line 203: | Line 200: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | | + | |
- | | + | |
- | (desig:an action | + | (desig:an action |
- | (type picking-up) | + | (type picking-up) |
- | (object ?obj))))) | + | (object ?obj) |
- | </ | + | (arm left) |
- | + | (grasp | |
- | The missing information is inferred automatically. | + | |
- | + | ||
- | But, we can specify the arm explicitly: | + | |
- | + | ||
- | <code lisp> | + | |
- | CL-USER> (pr2-proj: | + | |
- | (let ((?obj *)) | + | |
- | | + | |
- | (desig:an action | + | |
- | (type picking-up) | + | |
- | (object ?obj) | + | |
- | (arm left))))) | + | |
- | </ | + | |
- | + | ||
- | And the grasp type as well: | + | |
- | + | ||
- | <code lisp> | + | |
- | (pr2-proj: | + | |
- | (let ((?obj *)) | + | |
- | (cram-executive: | + | |
- | (desig:an action | + | |
- | (type picking-up) | + | |
- | (object ?obj) | + | |
- | (arm left) | + | |
- | (grasp | + | |
</ | </ | ||
+ | |||
| | ||
Object got attached through an event, so now it will always follow the robot: | Object got attached through an event, so now it will always follow the robot: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | (cram-executive: | + | |
- | | + | |
- | " | + | |
- | (cl-transforms: | + | |
- | (cl-transforms: | + | (cram-executive: |
- | (desig:an action | + | |
- | (type going) | + | (type going) |
- | (target (desig:a location | + | (target (desig:a location |
- | | + | |
</ | </ | ||
Line 256: | Line 229: | ||
<code lisp> | <code lisp> | ||
- | CL-USER> (pr2-proj: | + | CL-USER> (urdf-proj: |
- | | + | |
- | (desig:an action | + | (desig:an action |
- | (type placing) | + | (type placing) |
- | (arm left)))) | + | (arm left)))) |
</ | </ | ||
| | ||
Line 269: | Line 242: | ||
We do this by loading the packages '' | We do this by loading the packages '' | ||
<code lisp> | <code lisp> | ||
- | (ros-load: | + | (ros-load: |
- | (ros-load: | + | (ros-load: |
</ | </ | ||
... and call the following functions: | ... and call the following functions: | ||
- | < | + | < |
(in-package : | (in-package : | ||
(roslisp-utilities: | (roslisp-utilities: |