You will have to define a new call action, in this case it is carry my luggage (cml), specified challange. You can find this within cram_external_interfaces/cram_giskard.
(defun call-cml-action (&key
action-timeout
drive-back
laser-distance-threshold)
(giskard::call-action
:action-goal (make-cml-action-goal drive-back laser-distance-threshold)
:action-timeout action-timeout))
(defun make-cml-constraint (drive-back laser-distance-threshold)
(roslisp:make-message
'giskard_msgs-msg:constraint
:type
"CarryMyBullshit"
:parameter_value_pair
(giskard::alist->json-string
`(,@(when drive-back
`(("drive_back"
. 1)))
,@(when laser-distance-threshold
`(("laser_distance_threshold"
. ,laser-distance-threshold)))))))
(defun make-cml-action-goal (drive-back laser-distance-threshold)
(giskard::make-giskard-goal
:joint-constraints (make-cml-constraint drive-back laser-distance-threshold)))
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)
...
(cram-common-designators:carry-my-luggage
(giskard::call-cml-action
:drive-back argument-1
:laser-distance-threshold (first rest-args)
))
...
Within cram_common/cram_common_designators/src/motions.lisp you will need to add your motion designator grounding
(<- (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))))
Now add your function into the defpackage description to make it jucy
#:carry-my-luggage
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
(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))
* (...)