;;
;; DO NOT EDIT THIS FILE
;; this file is automatically generated from euslisp+euslib version 
;;
;;
(defclass asahikasei-small-basket-object
  :super cascaded-link
  :slots (sensors
         handle0 handle1 handle2
         attention0
         joint0 joint1 ))
(defmethod asahikasei-small-basket-object
  (:init
   (&rest args &key (name "asahikasei-small-basket") (pos (float-vector 0 0 0)) (rot (unit-matrix 3)) &allow-other-keys)
   (let (c bc
         blink0 blink1 blink2
                 )
     (send-super* :init :name name args)

     ;; definition of link

     ;; definition of :box
     (setq bc (list
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector -142.308 202.5 120.0) (float-vector -112.692 170.0 10.0) (float-vector 112.692 170.0 10.0) (float-vector 142.308 202.5 120.0))
                              :holes (list
         (instance hole :init :vertices (list (float-vector -30.0 194.818 94.0) (float-vector -30.0 198.364 106.0) (float-vector 30.0 198.364 106.0) (float-vector 30.0 194.818 94.0)))
))
         (instance face :init :vertices (list (float-vector 112.692 170.0 10.0) (float-vector -112.692 170.0 10.0) (float-vector -112.692 -170.0 10.0) (float-vector 112.692 -170.0 10.0)))
         (instance face :init :vertices (list (float-vector 112.692 -170.0 10.0) (float-vector -112.692 -170.0 10.0) (float-vector -142.308 -202.5 120.0) (float-vector 142.308 -202.5 120.0))
                              :holes (list
         (instance hole :init :vertices (list (float-vector 30.0 -194.818 94.0) (float-vector 30.0 -198.364 106.0) (float-vector -30.0 -198.364 106.0) (float-vector -30.0 -194.818 94.0)))
))
         (instance face :init :vertices (list (float-vector 142.308 202.5 120.0) (float-vector 112.692 170.0 10.0) (float-vector 112.692 -170.0 10.0) (float-vector 142.308 -202.5 120.0)))
         (instance face :init :vertices (list (float-vector -142.308 -202.5 120.0) (float-vector -112.692 -170.0 10.0) (float-vector -112.692 170.0 10.0) (float-vector -142.308 202.5 120.0)))
         (instance face :init :vertices (list (float-vector -147.5 207.5 120.0) (float-vector -147.5 -207.5 120.0) (float-vector 147.5 -207.5 120.0) (float-vector 147.5 207.5 120.0))
                              :holes (list
         (instance hole :init :vertices (list (float-vector -142.308 202.5 120.0) (float-vector 142.308 202.5 120.0) (float-vector 142.308 -202.5 120.0) (float-vector -142.308 -202.5 120.0)))
))
         (instance face :init :vertices (list (float-vector -147.5 207.5 120.0) (float-vector 147.5 207.5 120.0) (float-vector 117.5 175.0 1.668581e-14) (float-vector -117.5 175.0 2.296213e-15))
                              :holes (list
         (instance hole :init :vertices (list (float-vector 30.0 200.458 94.0) (float-vector 30.0 203.708 106.0) (float-vector -30.0 203.708 106.0) (float-vector -30.0 200.458 94.0)))
))
         (instance face :init :vertices (list (float-vector -117.5 175.0 2.296213e-15) (float-vector 117.5 175.0 1.668581e-14) (float-vector 117.5 -175.0 1.668581e-14) (float-vector -117.5 -175.0 2.296213e-15)))
         (instance face :init :vertices (list (float-vector 117.5 -175.0 1.668581e-14) (float-vector 117.5 175.0 1.668581e-14) (float-vector 147.5 207.5 120.0) (float-vector 147.5 -207.5 120.0)))
         (instance face :init :vertices (list (float-vector -117.5 -175.0 2.296213e-15) (float-vector 117.5 -175.0 1.668581e-14) (float-vector 147.5 -207.5 120.0) (float-vector -147.5 -207.5 120.0))
                              :holes (list
         (instance hole :init :vertices (list (float-vector -30.0 -200.458 94.0) (float-vector -30.0 -203.708 106.0) (float-vector 30.0 -203.708 106.0) (float-vector 30.0 -200.458 94.0)))
))
         (instance face :init :vertices (list (float-vector -147.5 -207.5 120.0) (float-vector -147.5 207.5 120.0) (float-vector -117.5 175.0 2.296213e-15) (float-vector -117.5 -175.0 2.296213e-15)))
         (instance face :init :vertices (list (float-vector -30.0 -194.818 94.0) (float-vector -30.0 -198.364 106.0) (float-vector -30.0 -203.708 106.0) (float-vector -30.0 -200.458 94.0)))
         (instance face :init :vertices (list (float-vector -30.0 200.458 94.0) (float-vector -30.0 203.708 106.0) (float-vector -30.0 198.364 106.0) (float-vector -30.0 194.818 94.0)))
         (instance face :init :vertices (list (float-vector 30.0 198.364 106.0) (float-vector -30.0 198.364 106.0) (float-vector -30.0 203.708 106.0) (float-vector 30.0 203.708 106.0)))
         (instance face :init :vertices (list (float-vector 30.0 -203.708 106.0) (float-vector -30.0 -203.708 106.0) (float-vector -30.0 -198.364 106.0) (float-vector 30.0 -198.364 106.0)))
         (instance face :init :vertices (list (float-vector 30.0 194.818 94.0) (float-vector 30.0 198.364 106.0) (float-vector 30.0 203.708 106.0) (float-vector 30.0 200.458 94.0)))
         (instance face :init :vertices (list (float-vector 30.0 -200.458 94.0) (float-vector 30.0 -203.708 106.0) (float-vector 30.0 -198.364 106.0) (float-vector 30.0 -194.818 94.0)))
         (instance face :init :vertices (list (float-vector 30.0 200.458 94.0) (float-vector -30.0 200.458 94.0) (float-vector -30.0 194.818 94.0) (float-vector 30.0 194.818 94.0)))
         (instance face :init :vertices (list (float-vector 30.0 -194.818 94.0) (float-vector -30.0 -194.818 94.0) (float-vector -30.0 -200.458 94.0) (float-vector 30.0 -200.458 94.0)))
       ))
       ))
     (dolist (b (cdr bc)) (send (car bc) :assoc b))
     (send (elt bc 0) :set-color :white)
     (setq blink0 (instance bodyset-link :init (make-cascoords) :bodies bc :name :box :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 :left
     (setq bc (list
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector -150.0 0.0 -5.0) (float-vector -150.0 -182.5 -5.0) (float-vector -150.0 -182.5 5.0) (float-vector -150.0 0.0 5.0)))
         (instance face :init :vertices (list (float-vector 150.0 -182.5 -5.0) (float-vector 150.0 -182.5 5.0) (float-vector -150.0 -182.5 5.0) (float-vector -150.0 -182.5 -5.0)))
         (instance face :init :vertices (list (float-vector 150.0 0.0 -5.0) (float-vector 150.0 0.0 5.0) (float-vector 150.0 -182.5 5.0) (float-vector 150.0 -182.5 -5.0)))
         (instance face :init :vertices (list (float-vector 145.0 0.0 5.0) (float-vector 145.0 -177.5 5.0) (float-vector -145.0 -177.5 5.0) (float-vector -145.0 0.0 5.0) (float-vector -150.0 0.0 5.0) (float-vector -150.0 -182.5 5.0) (float-vector 150.0 -182.5 5.0) (float-vector 150.0 0.0 5.0)))
         (instance face :init :vertices (list (float-vector 150.0 0.0 -5.0) (float-vector 150.0 -182.5 -5.0) (float-vector -150.0 -182.5 -5.0) (float-vector -150.0 0.0 -5.0) (float-vector -145.0 0.0 -5.0) (float-vector -145.0 -177.5 -5.0) (float-vector 145.0 -177.5 -5.0) (float-vector 145.0 0.0 -5.0)))
         (instance face :init :vertices (list (float-vector -150.0 0.0 -5.0) (float-vector -150.0 0.0 5.0) (float-vector -145.0 0.0 5.0) (float-vector -145.0 0.0 -5.0)))
         (instance face :init :vertices (list (float-vector 145.0 0.0 -5.0) (float-vector 145.0 0.0 5.0) (float-vector 150.0 0.0 5.0) (float-vector 150.0 0.0 -5.0)))
         (instance face :init :vertices (list (float-vector -145.0 -177.5 -5.0) (float-vector -145.0 0.0 -5.0) (float-vector -145.0 0.0 5.0) (float-vector -145.0 -177.5 5.0)))
         (instance face :init :vertices (list (float-vector 145.0 -177.5 5.0) (float-vector 145.0 0.0 5.0) (float-vector 145.0 0.0 -5.0) (float-vector 145.0 -177.5 -5.0)))
         (instance face :init :vertices (list (float-vector 145.0 -177.5 -5.0) (float-vector -145.0 -177.5 -5.0) (float-vector -145.0 -177.5 5.0) (float-vector 145.0 -177.5 5.0)))
       ))
       ))
     (dolist (b (cdr bc)) (send (car bc) :assoc b))
     (send (elt bc 0) :set-color :yellow)
     (setq blink2 (instance bodyset-link :init (make-cascoords) :bodies bc :name :left :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 :right
     (setq bc (list
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector -150.0 182.5 -5.0) (float-vector -150.0 0.0 -5.0) (float-vector -150.0 0.0 5.0) (float-vector -150.0 182.5 5.0)))
         (instance face :init :vertices (list (float-vector 150.0 0.0 -5.0) (float-vector 150.0 0.0 5.0) (float-vector 145.0 0.0 5.0) (float-vector 145.0 0.0 -5.0)))
         (instance face :init :vertices (list (float-vector -145.0 0.0 -5.0) (float-vector -145.0 0.0 5.0) (float-vector -150.0 0.0 5.0) (float-vector -150.0 0.0 -5.0)))
         (instance face :init :vertices (list (float-vector 150.0 182.5 -5.0) (float-vector 150.0 182.5 5.0) (float-vector 150.0 0.0 5.0) (float-vector 150.0 0.0 -5.0)))
         (instance face :init :vertices (list (float-vector -150.0 182.5 5.0) (float-vector -150.0 0.0 5.0) (float-vector -145.0 0.0 5.0) (float-vector -145.0 177.5 5.0) (float-vector 145.0 177.5 5.0) (float-vector 145.0 0.0 5.0) (float-vector 150.0 0.0 5.0) (float-vector 150.0 182.5 5.0)))
         (instance face :init :vertices (list (float-vector 150.0 182.5 -5.0) (float-vector 150.0 0.0 -5.0) (float-vector 145.0 0.0 -5.0) (float-vector 145.0 177.5 -5.0) (float-vector -145.0 177.5 -5.0) (float-vector -145.0 0.0 -5.0) (float-vector -150.0 0.0 -5.0) (float-vector -150.0 182.5 -5.0)))
         (instance face :init :vertices (list (float-vector -150.0 182.5 -5.0) (float-vector -150.0 182.5 5.0) (float-vector 150.0 182.5 5.0) (float-vector 150.0 182.5 -5.0)))
         (instance face :init :vertices (list (float-vector -145.0 177.5 5.0) (float-vector -145.0 0.0 5.0) (float-vector -145.0 0.0 -5.0) (float-vector -145.0 177.5 -5.0)))
         (instance face :init :vertices (list (float-vector 145.0 177.5 5.0) (float-vector -145.0 177.5 5.0) (float-vector -145.0 177.5 -5.0) (float-vector 145.0 177.5 -5.0)))
         (instance face :init :vertices (list (float-vector 145.0 177.5 -5.0) (float-vector 145.0 0.0 -5.0) (float-vector 145.0 0.0 5.0) (float-vector 145.0 177.5 5.0)))
       ))
       ))
     (dolist (b (cdr bc)) (send (car bc) :assoc b))
     (send (elt bc 0) :set-color :yellow)
     (setq blink1 (instance bodyset-link :init (make-cascoords) :bodies bc :name :right :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 blink1 :newcoords (make-coords :pos (float-vector 0.0 25.0 125.0) :rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0))))
     (send blink0 :assoc blink1)
     (send blink2 :newcoords (make-coords :pos (float-vector 0.0 -25.0 125.0) :rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0))))
     (send blink0 :assoc blink2)
     (send self :assoc blink0)

     ;; definition of end-coords

     ;; definition of joint

     ;; definition of :handle-hinge1
     (setq joint0 (instance rotational-joint :init
			     :parent-link blink0 :child-link blink1 :name :handle-hinge1 :axis :x 
			     :min    0.0 :max  180.0 :max-joint-velocity 5 :max-joint-torque 100))

     ;; definition of :handle-hinge2
     (setq joint1 (instance rotational-joint :init
			     :parent-link blink0 :child-link blink2 :name :handle-hinge2 :axis :x 
			     :min -180.0 :max    0.0 :max-joint-velocity 5 :max-joint-torque 100))


     ;; definition of :handle
     (setq handle0 (make-cascoords :pos (float-vector 0.0 0.0 300.78) :rot #2f((7.216450e-16 0.0 1.0) (0.0 1.0 0.0) (-1.0 0.0 7.216450e-16)) :name ":single"))
     (send blink0 :assoc handle0)
     (setq handle1 (make-cascoords :pos (float-vector 0.0 207.5 100.0) :rot #2f((7.216450e-16 0.0 1.0) (0.0 1.0 0.0) (-1.0 0.0 7.216450e-16)) :name ":larm"))
     (send blink0 :assoc handle1)
     (setq handle2 (make-cascoords :pos (float-vector 0.0 -207.5 100.0) :rot #2f((7.216450e-16 0.0 1.0) (0.0 1.0 0.0) (-1.0 0.0 7.216450e-16)) :name ":rarm"))
     (send blink0 :assoc handle2)

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

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

     self))

  (:reset-pose () (send self :angle-vector (float-vector 0.0 0.0)))
  (:handle-hinge1 (&rest args) (forward-message-to joint0 args))
  (:handle-hinge2 (&rest args) (forward-message-to joint1 args))
  (:handle (&rest args) (forward-message-to-all (list  handle0 handle1 handle2) args))
  (:handle-single (&rest args) (forward-message-to handle0 args))
  (:handle-larm (&rest args) (forward-message-to handle1 args))
  (:handle-rarm (&rest args) (forward-message-to handle2 args))
  (:attention (&rest args) (forward-message-to-all (list  attention0) args))
  (:attention-opening (&rest args) (forward-message-to attention0 args))
  (:button (&rest args) (forward-message-to-all (list ) args))
  )

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