File: broom-object.l

package info (click to toggle)
euslisp 9.31%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,448 kB
  • sloc: ansic: 41,610; lisp: 3,339; makefile: 286; sh: 238; asm: 138; python: 53
file content (92 lines) | stat: -rw-r--r-- 7,299 bytes parent folder | download | duplicates (2)
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
;;
;; DO NOT EDIT THIS FILE
;; this file is automatically generated from euslisp+euslib version 
;;
;;
(defclass broom-object
  :super cascaded-link
  :slots (sensors
         handle0 handle1
         attention0
         ))
(defmethod broom-object
  (:init
   (&rest args &key (name "broom") (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 :broom-bodyset2
     (setq bc (list
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector 8.66025 -5.0 1250.0) (float-vector 10.0 0.0 1250.0) (float-vector 8.66025 5.0 1250.0) (float-vector 5.0 8.66025 1250.0) (float-vector 5.329071e-15 10.0 1250.0) (float-vector -5.0 8.66025 1250.0) (float-vector -8.66025 5.0 1250.0) (float-vector -10.0 1.065814e-14 1250.0) (float-vector -8.66025 -5.0 1250.0) (float-vector -5.0 -8.66025 1250.0) (float-vector -1.598721e-14 -10.0 1250.0) (float-vector 5.0 -8.66025 1250.0)))
         (instance face :init :vertices (list (float-vector 10.0 0.0 200.0) (float-vector 8.66025 -5.0 200.0) (float-vector 5.0 -8.66025 200.0) (float-vector -1.598721e-14 -10.0 200.0) (float-vector -5.0 -8.66025 200.0) (float-vector -8.66025 -5.0 200.0) (float-vector -10.0 1.065814e-14 200.0) (float-vector -8.66025 5.0 200.0) (float-vector -5.0 8.66025 200.0) (float-vector 5.329071e-15 10.0 200.0) (float-vector 5.0 8.66025 200.0) (float-vector 8.66025 5.0 200.0)))
         (instance face :init :vertices (list (float-vector 8.66025 -5.0 1250.0) (float-vector 8.66025 -5.0 200.0) (float-vector 10.0 0.0 200.0) (float-vector 10.0 0.0 1250.0)))
         (instance face :init :vertices (list (float-vector 5.0 -8.66025 1250.0) (float-vector 5.0 -8.66025 200.0) (float-vector 8.66025 -5.0 200.0) (float-vector 8.66025 -5.0 1250.0)))
         (instance face :init :vertices (list (float-vector -1.598721e-14 -10.0 1250.0) (float-vector -1.598721e-14 -10.0 200.0) (float-vector 5.0 -8.66025 200.0) (float-vector 5.0 -8.66025 1250.0)))
         (instance face :init :vertices (list (float-vector -5.0 -8.66025 1250.0) (float-vector -5.0 -8.66025 200.0) (float-vector -1.598721e-14 -10.0 200.0) (float-vector -1.598721e-14 -10.0 1250.0)))
         (instance face :init :vertices (list (float-vector -8.66025 -5.0 1250.0) (float-vector -8.66025 -5.0 200.0) (float-vector -5.0 -8.66025 200.0) (float-vector -5.0 -8.66025 1250.0)))
         (instance face :init :vertices (list (float-vector -10.0 1.065814e-14 1250.0) (float-vector -10.0 1.065814e-14 200.0) (float-vector -8.66025 -5.0 200.0) (float-vector -8.66025 -5.0 1250.0)))
         (instance face :init :vertices (list (float-vector -8.66025 5.0 1250.0) (float-vector -8.66025 5.0 200.0) (float-vector -10.0 1.065814e-14 200.0) (float-vector -10.0 1.065814e-14 1250.0)))
         (instance face :init :vertices (list (float-vector -5.0 8.66025 1250.0) (float-vector -5.0 8.66025 200.0) (float-vector -8.66025 5.0 200.0) (float-vector -8.66025 5.0 1250.0)))
         (instance face :init :vertices (list (float-vector 5.329071e-15 10.0 1250.0) (float-vector 5.329071e-15 10.0 200.0) (float-vector -5.0 8.66025 200.0) (float-vector -5.0 8.66025 1250.0)))
         (instance face :init :vertices (list (float-vector 5.0 8.66025 1250.0) (float-vector 5.0 8.66025 200.0) (float-vector 5.329071e-15 10.0 200.0) (float-vector 5.329071e-15 10.0 1250.0)))
         (instance face :init :vertices (list (float-vector 8.66025 5.0 1250.0) (float-vector 8.66025 5.0 200.0) (float-vector 5.0 8.66025 200.0) (float-vector 5.0 8.66025 1250.0)))
         (instance face :init :vertices (list (float-vector 10.0 0.0 1250.0) (float-vector 10.0 0.0 200.0) (float-vector 8.66025 5.0 200.0) (float-vector 8.66025 5.0 1250.0)))
       ))
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector 125.0 -10.0 0.0) (float-vector 60.0 -10.0 170.0) (float-vector 20.0 -10.0 200.0) (float-vector -20.0 -10.0 200.0) (float-vector -60.0 -10.0 170.0) (float-vector -125.0 -10.0 0.0)))
         (instance face :init :vertices (list (float-vector 60.0 10.0 170.0) (float-vector 125.0 10.0 0.0) (float-vector -125.0 10.0 0.0) (float-vector -60.0 10.0 170.0) (float-vector -20.0 10.0 200.0) (float-vector 20.0 10.0 200.0)))
         (instance face :init :vertices (list (float-vector 125.0 -10.0 0.0) (float-vector 125.0 10.0 0.0) (float-vector 60.0 10.0 170.0) (float-vector 60.0 -10.0 170.0)))
         (instance face :init :vertices (list (float-vector -125.0 -10.0 0.0) (float-vector -125.0 10.0 0.0) (float-vector 125.0 10.0 0.0) (float-vector 125.0 -10.0 0.0)))
         (instance face :init :vertices (list (float-vector -60.0 -10.0 170.0) (float-vector -60.0 10.0 170.0) (float-vector -125.0 10.0 0.0) (float-vector -125.0 -10.0 0.0)))
         (instance face :init :vertices (list (float-vector -20.0 -10.0 200.0) (float-vector -20.0 10.0 200.0) (float-vector -60.0 10.0 170.0) (float-vector -60.0 -10.0 170.0)))
         (instance face :init :vertices (list (float-vector 20.0 -10.0 200.0) (float-vector 20.0 10.0 200.0) (float-vector -20.0 10.0 200.0) (float-vector -20.0 -10.0 200.0)))
         (instance face :init :vertices (list (float-vector 60.0 -10.0 170.0) (float-vector 60.0 10.0 170.0) (float-vector 20.0 10.0 200.0) (float-vector 20.0 -10.0 200.0)))
       ))
       ))
     (dolist (b (cdr bc)) (send (car bc) :assoc b))
     (send (elt bc 0) :set-color :gray)
     (send (elt bc 1) :set-color :brown)
     (setq blink0 (instance bodyset-link :init (make-cascoords) :bodies bc :name :broom-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 0.0 0.0 830.0) :rot #2f((0.5 0.866025 0.0) (-0.866025 0.5 0.0) (0.0 0.0 1.0)) :name "handle0"))
     (send blink0 :assoc handle0)
     (setq handle1 (make-cascoords :pos (float-vector 0.0 0.0 1040.0) :rot #2f((0.5 -0.866025 0.0) (0.866025 0.5 0.0) (0.0 0.0 1.0)) :name "handle1"))
     (send blink0 :assoc handle1)

     ;; definition of :attention
     (setq attention0 (make-cascoords :pos (float-vector 0.0 0.0 0.0) :rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)) :name "attention0"))
     (send blink0 :assoc attention0)

     ;; 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) args))
  (:handle-handle0 (&rest args) (forward-message-to handle0 args))
  (:handle-handle1 (&rest args) (forward-message-to handle1 args))
  (:attention (&rest args) (forward-message-to-all (list  attention0) args))
  (:attention-attention0 (&rest args) (forward-message-to attention0 args))
  (:button (&rest args) (forward-message-to-all (list ) args))
  )

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