File: room610-tray-object.l

package info (click to toggle)
euslisp 9.27%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, trixie
  • size: 55,344 kB
  • sloc: ansic: 41,162; lisp: 3,339; makefile: 256; sh: 208; asm: 138; python: 53
file content (115 lines) | stat: -rw-r--r-- 9,160 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
;;
;; DO NOT EDIT THIS FILE
;; this file is automatically generated from euslisp+euslib version 
;;
;;
(defclass room610-tray-object
  :super cascaded-link
  :slots (sensors
         handle0 handle1 handle2 handle3 handle4 handle5
         ))
(defmethod room610-tray-object
  (:init
   (&rest args &key (name "room610-tray") (pos (float-vector 0 0 0)) (rot (unit-matrix 3)) &allow-other-keys)
   (let (c bc
         blink0
                 )
     (send-super* :init :name name args)

     ;; definition of link

     ;; definition of :room610-tray-bodyset2
     (setq bc (list
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector 200.0 150.0 15.0) (float-vector -200.0 150.0 15.0) (float-vector -200.0 -150.0 15.0) (float-vector 200.0 -150.0 15.0)))
         (instance face :init :vertices (list (float-vector -200.0 150.0 5.0) (float-vector 200.0 150.0 5.0) (float-vector 200.0 -150.0 5.0) (float-vector -200.0 -150.0 5.0)))
         (instance face :init :vertices (list (float-vector 200.0 150.0 15.0) (float-vector 200.0 150.0 5.0) (float-vector -200.0 150.0 5.0) (float-vector -200.0 150.0 15.0)))
         (instance face :init :vertices (list (float-vector 200.0 -150.0 15.0) (float-vector 200.0 -150.0 5.0) (float-vector 200.0 150.0 5.0) (float-vector 200.0 150.0 15.0)))
         (instance face :init :vertices (list (float-vector -200.0 -150.0 15.0) (float-vector -200.0 -150.0 5.0) (float-vector 200.0 -150.0 5.0) (float-vector 200.0 -150.0 15.0)))
         (instance face :init :vertices (list (float-vector -200.0 150.0 15.0) (float-vector -200.0 150.0 5.0) (float-vector -200.0 -150.0 5.0) (float-vector -200.0 -150.0 15.0)))
       ))
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector 200.0 155.0 37.5) (float-vector -200.0 155.0 37.5) (float-vector -200.0 145.0 37.5) (float-vector 200.0 145.0 37.5)))
         (instance face :init :vertices (list (float-vector -200.0 155.0 7.5) (float-vector 200.0 155.0 7.5) (float-vector 200.0 145.0 7.5) (float-vector -200.0 145.0 7.5)))
         (instance face :init :vertices (list (float-vector 200.0 155.0 37.5) (float-vector 200.0 155.0 7.5) (float-vector -200.0 155.0 7.5) (float-vector -200.0 155.0 37.5)))
         (instance face :init :vertices (list (float-vector 200.0 145.0 37.5) (float-vector 200.0 145.0 7.5) (float-vector 200.0 155.0 7.5) (float-vector 200.0 155.0 37.5)))
         (instance face :init :vertices (list (float-vector -200.0 145.0 37.5) (float-vector -200.0 145.0 7.5) (float-vector 200.0 145.0 7.5) (float-vector 200.0 145.0 37.5)))
         (instance face :init :vertices (list (float-vector -200.0 155.0 37.5) (float-vector -200.0 155.0 7.5) (float-vector -200.0 145.0 7.5) (float-vector -200.0 145.0 37.5)))
       ))
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector 200.0 -145.0 37.5) (float-vector -200.0 -145.0 37.5) (float-vector -200.0 -155.0 37.5) (float-vector 200.0 -155.0 37.5)))
         (instance face :init :vertices (list (float-vector -200.0 -145.0 7.5) (float-vector 200.0 -145.0 7.5) (float-vector 200.0 -155.0 7.5) (float-vector -200.0 -155.0 7.5)))
         (instance face :init :vertices (list (float-vector 200.0 -145.0 37.5) (float-vector 200.0 -145.0 7.5) (float-vector -200.0 -145.0 7.5) (float-vector -200.0 -145.0 37.5)))
         (instance face :init :vertices (list (float-vector 200.0 -155.0 37.5) (float-vector 200.0 -155.0 7.5) (float-vector 200.0 -145.0 7.5) (float-vector 200.0 -145.0 37.5)))
         (instance face :init :vertices (list (float-vector -200.0 -155.0 37.5) (float-vector -200.0 -155.0 7.5) (float-vector 200.0 -155.0 7.5) (float-vector 200.0 -155.0 37.5)))
         (instance face :init :vertices (list (float-vector -200.0 -145.0 37.5) (float-vector -200.0 -145.0 7.5) (float-vector -200.0 -155.0 7.5) (float-vector -200.0 -155.0 37.5)))
       ))
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector 205.0 150.0 37.5) (float-vector 195.0 150.0 37.5) (float-vector 195.0 -150.0 37.5) (float-vector 205.0 -150.0 37.5)))
         (instance face :init :vertices (list (float-vector 195.0 150.0 7.5) (float-vector 205.0 150.0 7.5) (float-vector 205.0 -150.0 7.5) (float-vector 195.0 -150.0 7.5)))
         (instance face :init :vertices (list (float-vector 205.0 150.0 37.5) (float-vector 205.0 150.0 7.5) (float-vector 195.0 150.0 7.5) (float-vector 195.0 150.0 37.5)))
         (instance face :init :vertices (list (float-vector 205.0 -150.0 37.5) (float-vector 205.0 -150.0 7.5) (float-vector 205.0 150.0 7.5) (float-vector 205.0 150.0 37.5)))
         (instance face :init :vertices (list (float-vector 195.0 -150.0 37.5) (float-vector 195.0 -150.0 7.5) (float-vector 205.0 -150.0 7.5) (float-vector 205.0 -150.0 37.5)))
         (instance face :init :vertices (list (float-vector 195.0 150.0 37.5) (float-vector 195.0 150.0 7.5) (float-vector 195.0 -150.0 7.5) (float-vector 195.0 -150.0 37.5)))
       ))
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector -195.0 150.0 37.5) (float-vector -205.0 150.0 37.5) (float-vector -205.0 -150.0 37.5) (float-vector -195.0 -150.0 37.5)))
         (instance face :init :vertices (list (float-vector -205.0 150.0 7.5) (float-vector -195.0 150.0 7.5) (float-vector -195.0 -150.0 7.5) (float-vector -205.0 -150.0 7.5)))
         (instance face :init :vertices (list (float-vector -195.0 150.0 37.5) (float-vector -195.0 150.0 7.5) (float-vector -205.0 150.0 7.5) (float-vector -205.0 150.0 37.5)))
         (instance face :init :vertices (list (float-vector -195.0 -150.0 37.5) (float-vector -195.0 -150.0 7.5) (float-vector -195.0 150.0 7.5) (float-vector -195.0 150.0 37.5)))
         (instance face :init :vertices (list (float-vector -205.0 -150.0 37.5) (float-vector -205.0 -150.0 7.5) (float-vector -195.0 -150.0 7.5) (float-vector -195.0 -150.0 37.5)))
         (instance face :init :vertices (list (float-vector -205.0 150.0 37.5) (float-vector -205.0 150.0 7.5) (float-vector -205.0 -150.0 7.5) (float-vector -205.0 -150.0 37.5)))
       ))
       ))
     (dolist (b (cdr bc)) (send (car bc) :assoc b))
     (send (elt bc 0) :set-color :brown)
     (send (elt bc 1) :set-color :brown)
     (send (elt bc 2) :set-color :brown)
     (send (elt bc 3) :set-color :brown)
     (send (elt bc 4) :set-color :brown)
     (setq blink0 (instance bodyset-link :init (make-cascoords) :bodies bc :name :room610-tray-bodyset2 :weight 1 :centroid (float-vector 0.0 0.0 0.0) :inertia-tensor #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0))))

     ;; definition of assoc
     (send self :assoc blink0)

     ;; definition of end-coords

     ;; definition of joint


     ;; definition of :handle
     (setq handle0 (make-cascoords :pos (float-vector 200.0 5.684342e-14 30.0) :rot #2f((0.0 -1.0 0.0) (0.0 0.0 1.0) (-1.0 0.0 0.0)) :name ":rarm-handle"))
     (send blink0 :assoc handle0)
     (setq handle1 (make-cascoords :pos (float-vector -200.0 0.0 30.0) :rot #2f((0.0 -1.0 0.0) (0.0 0.0 1.0) (-1.0 0.0 0.0)) :name ":larm-handle"))
     (send blink0 :assoc handle1)
     (setq handle2 (make-cascoords :pos (float-vector 200.0 -120.0 30.0) :rot #2f((-0.707107 -6.106227e-16 -0.707107) (0.707107 -6.106227e-16 -0.707107) (0.0 -1.0 8.326673e-16)) :name "handle2"))
     (send blink0 :assoc handle2)
     (setq handle3 (make-cascoords :pos (float-vector 200.0 120.0 30.0) :rot #2f((-0.707107 4.440892e-16 -0.707107) (-0.707107 -3.330669e-16 0.707107) (1.110223e-16 1.0 5.551115e-16)) :name "handle3"))
     (send blink0 :assoc handle3)
     (setq handle4 (make-cascoords :pos (float-vector -200.0 -120.0 30.0) :rot #2f((0.707107 -5.551115e-16 -0.707107) (0.707107 6.106227e-16 0.707107) (0.0 -1.0 8.326673e-16)) :name "handle4"))
     (send blink0 :assoc handle4)
     (setq handle5 (make-cascoords :pos (float-vector -200.0 120.0 30.0) :rot #2f((0.707107 5.551115e-16 -0.707107) (-0.707107 6.106227e-16 -0.707107) (0.0 1.0 8.326673e-16)) :name "handle5"))
     (send blink0 :assoc handle5)

     ;; init-ending 
     (setq links (list blink0))
     (setq joint-list (list))
     (send self :init-ending)
     (send self :move-to (make-coords :pos pos :rot rot))
     (send-all links :worldcoords)

     self))

  (:handle (&rest args) (forward-message-to-all (list  handle0 handle1 handle2 handle3 handle4 handle5) args))
  (:handle-rarm-handle (&rest args) (forward-message-to handle0 args))
  (:handle-larm-handle (&rest args) (forward-message-to handle1 args))
  (:handle-handle2 (&rest args) (forward-message-to handle2 args))
  (:handle-handle3 (&rest args) (forward-message-to handle3 args))
  (:handle-handle4 (&rest args) (forward-message-to handle4 args))
  (:handle-handle5 (&rest args) (forward-message-to handle5 args))
  (:attention (&rest args) (forward-message-to-all (list ) args))
  (:button (&rest args) (forward-message-to-all (list ) args))
  )

(defun room610-tray (&rest args) (instance* room610-tray-object :init args))
;; (format *error-output* "(instance room610-tray-object :init) for generating model~%")