Skip to content

Commit c32f601

Browse files
committed
[giskard] forgot to commit the PM file
1 parent f455590 commit c32f601

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
;;;
2+
;;; Copyright (c) 2016, Gayane Kazhoyan <[email protected]>
3+
;;; All rights reserved.
4+
;;;
5+
;;; Redistribution and use in source and binary forms, with or without
6+
;;; modification, are permitted provided that the following conditions are met:
7+
;;;
8+
;;; * Redistributions of source code must retain the above copyright
9+
;;; notice, this list of conditions and the following disclaimer.
10+
;;; * Redistributions in binary form must reproduce the above copyright
11+
;;; notice, this list of conditions and the following disclaimer in the
12+
;;; documentation and/or other materials provided with the distribution.
13+
;;; * Neither the name of the Institute for Artificial Intelligence/
14+
;;; Universitaet Bremen nor the names of its contributors may be used to
15+
;;; endorse or promote products derived from this software without
16+
;;; specific prior written permission.
17+
;;;
18+
;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
;;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21+
;;; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22+
;;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23+
;;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24+
;;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25+
;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26+
;;; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27+
;;; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28+
;;; POSSIBILITY OF SUCH DAMAGE.
29+
30+
(in-package :giskard)
31+
32+
(cpm:def-process-module giskard-pm (motion-designator)
33+
(destructuring-bind (command argument-1 &rest rest-args)
34+
(desig:reference motion-designator)
35+
(ecase command
36+
(cram-common-designators:move-tcp
37+
(giskard:call-arm-cartesian-action
38+
:goal-pose-left argument-1
39+
:goal-pose-right (first rest-args)
40+
:collision-mode (second rest-args)
41+
:collision-object-b (third rest-args)
42+
:collision-object-b-link (fourth rest-args)
43+
:collision-object-a (fifth rest-args)
44+
:move-base (sixth rest-args)
45+
:prefer-base (seventh rest-args)
46+
:align-planes-left (eighth rest-args)
47+
:align-planes-right (ninth rest-args)))
48+
(cram-common-designators:move-joints
49+
(giskard:call-arm-joint-action
50+
:goal-configuration-left argument-1
51+
:goal-configuration-right (first rest-args)
52+
:align-planes-left (second rest-args)
53+
:align-planes-right (third rest-args)))
54+
(cram-common-designators:move-arm-pull
55+
(giskard:call-environment-manipulation-action
56+
:open-or-close :open
57+
:arm argument-1
58+
:handle-link (fifth rest-args)
59+
:joint-angle (second rest-args)
60+
:prefer-base (eighth rest-args)))
61+
(cram-common-designators:move-arm-push
62+
(giskard:call-environment-manipulation-action
63+
:open-or-close :close
64+
:arm argument-1
65+
:handle-link (fifth rest-args)
66+
:joint-angle (second rest-args)
67+
:prefer-base (eighth rest-args)))
68+
(cram-common-designators:move-head
69+
(when argument-1
70+
(giskard:call-neck-action
71+
:goal-pose argument-1))
72+
(when (car rest-args)
73+
(giskard:call-neck-joint-action
74+
:goal-configuration (car rest-args))))
75+
(cram-common-designators:move-base
76+
(giskard:call-base-action
77+
:goal-pose argument-1))
78+
(cram-common-designators:move-torso
79+
(giskard:call-torso-action
80+
:goal-joint-state argument-1))
81+
(cram-common-designators:move-gripper-joint
82+
(giskard:call-gripper-action
83+
:action-type-or-position argument-1
84+
:arm (first rest-args)
85+
:effort (second rest-args))))))

0 commit comments

Comments
 (0)