Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorials:intermediate:new_actions [2019/01/02 16:19] – [Get-trajectory] vanessa | tutorials:intermediate:new_actions [2019/01/02 16:31] – [Get-trajectory] vanessa | ||
---|---|---|---|
Line 228: | Line 228: | ||
<code lisp> | <code lisp> | ||
+ | ;; | ||
(defgeneric get-object-grasping-poses (object-name object-type arm grasp object-transform) | (defgeneric get-object-grasping-poses (object-name object-type arm grasp object-transform) | ||
(: | (: | ||
Line 234: | Line 235: | ||
(type cl-transforms-stamped: | (type cl-transforms-stamped: | ||
- | ;; First correct the object transform such that rotationally-symmetric objects | ||
- | ;; would not be grasped in an awkward way with weird orientations | ||
(when (prolog `(object-rotationally-symmetric , | (when (prolog `(object-rotationally-symmetric , | ||
(setf object-transform | (setf object-transform | ||
Line 241: | Line 240: | ||
| | ||
: | : | ||
+ | </ | ||
+ | First correct the object transform such that rotationally-symmetric objects would not be grasped in an awkward way with weird orientations. | ||
+ | <code lisp> | ||
(let* ((gripper-tool-frame | (let* ((gripper-tool-frame | ||
| | ||
Line 275: | Line 277: | ||
| | ||
?robot ? | ?robot ? | ||
+ | | ||
+ | </ | ||
+ | Next step is to transform all the poses for the action. | ||
+ | * standard gripper transform oTg | ||
+ | * standard gripper pregrasp transform oTg | ||
+ | * standard gripper second pregrasp transform oTg | ||
+ | * standard gripper lift transform oTg | ||
+ | * standard gripper second lift transform oTg | ||
+ | * particular gripper transform gTg | ||
+ | <code lisp> | ||
(when (and object-to-standard-gripper-transform standard-to-particular-gripper-transform) | (when (and object-to-standard-gripper-transform standard-to-particular-gripper-transform) | ||
Line 301: | Line 313: | ||
</ | </ | ||
+ | |||
+ | The last step is to calculate the base-to-standard-gripper-transform so that a transformation from object-to-standard-gripper to base-to-particular-gripper can be done. | ||
====== Write a Demo====== | ====== Write a Demo====== |