Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:robocup:robocup [2023/06/29 10:33] vanessatutorials:robocup:robocup [2023/06/29 10:48] (current) vanessa
Line 14: Line 14:
 <code lisp> <code lisp>
 (defun make-cml-constraint (drive-back laser-distance-threshold) (defun make-cml-constraint (drive-back laser-distance-threshold)
-  ;; (declare  (type cl-transforms-stamped:pose-stamped goal-pose)) 
   (roslisp:make-message   (roslisp:make-message
    'giskard_msgs-msg:constraint    'giskard_msgs-msg:constraint
Line 32: Line 31:
  
  
 +<code lisp>
 +(defun make-cml-action-goal (drive-back laser-distance-threshold)
 +  (giskard::make-giskard-goal
 +   :joint-constraints (make-cml-constraint drive-back laser-distance-threshold)))
 +</code>
  
  
 +
 +Within cram_external_interfaces/cram_giskard/src/process-module you will need to add yourr designator to (cpm:def-process-module giskard-pm (motion-designator)
 +<code lisp>
 +...
 +
 +(cram-common-designators:carry-my-luggage
 +       (giskard::call-cml-action
 +        :drive-back argument-1
 +        :laser-distance-threshold (first rest-args)
 +        ))
 +...
 +
 +   
 +</code>
 +
 +Within cram_common/cram_common_designators/src/motions.lisp you will need to add your motion designator grounding
 +<code lisp>
 +  (<- (motion-grounding ?designator (carry-my-luggage ?drive-back ?laser-distance-threshold))
 +    (property ?designator (:type :cml))    
 +    (once (or (desig:desig-prop ?designator (:drive-back ?drive-back))
 +              (equal ?drive-back nil)))
 +    (once (or (desig:desig-prop ?designator (:laser-distance-threshold ?laser-distance-threshold))
 +              (equal ?laser-distance-threshold nil))))
 +</code>
 +
 +Now add your function into the defpackage description to make it jucy
 +
 +<code lisp>
 +#:carry-my-luggage
 +</code>
 +Finally add the motion designator type into the matching process module, for suturo this is sadly in cram_hsrb/suturo_real_hsr_pm/src/with-real-hsr-pm.lisp
 +<code lisp>
 +
 + (prolog:<- (cpm:matching-process-module ?motion-designator giskard:giskard-pm)
 +    (or (desig:desig-prop ?motion-designator (:type :moving-tcp))
 +        (desig:desig-prop ?motion-designator (:type :reaching))
 +        (...)
 +        (desig:desig-prop ?motion-designator (:type :cml))
 +      * (...)
 +</code>