;; -*- Mode: LISP; Syntax: Common-Lisp; Package: (USER); -*-
;-----------------------------------------------------------
;
;  Acts.lisp
;  -contains Action Scheduler Actions specs
;
;
; 'Ymir Agent System, 1995 
;
;-----------------------------------------------------------
;
;  Commands for making the below specs:
; (make-motors motor-list) (make-acts act-list)
;  -defined in Motor.lisp


;------------------------------------------
; ACT SPECIFICATIONS
;
; Hint: One should try to have as few motor cmnds as
; possible in any act, since they are so non-transparent.
;------------------------------------------
	
(defparameter act-list '())

(setf act-list
  ;TEMPLATE for whole obj:   
  ;ACTS:       (list-of-acts (first-act (first-motor)(second-motor))(second-act ...))
  ;(name class (((act-name position msec)(act-name position msec) etc*) 
  ;              (etc*)))
    '((blink seq-act (((close-eyes nil 50)(open-eyes nil 50)) ;first motor list (first act option)
                      ))                                      ;no additional motor lists
      (test-blink seq-act (((blink nil 100)(blink nil 135))
			   ((blink nil 500))))
      (test-act   seq-act (((blink nil 100))
			   ((open-mouth nil 400)(close-mouth nil 200))))
      (N          par-act (((M nil 10))
			   ((L nil 20))))
      (M          seq-act (((B nil 30)(C nil 40))))
      (B          par-act (((E nil 50))
			   ((D nil 60))))
      (D          par-act (((Plh 10 70)(Plh 11 70))))
      (E          par-act (((Bll 60 80)(Bll 61 80))))
      (C          seq-act (((Plv -50 99)(Plv -51 99))))
      (L          par-act (((Sp "Aha" 100))))
      (open-mouth par-act  (((Mb 99 1000))))
      (close-mouth par-act (((Mb  1 1000))))
      (smile-a-little par-act (((grin-little nil 400))   ;opt 1
			       ((grin-mildly nil 500)))) ;opt 2
      (close-eyes par-act (((Elu 100 300)(Eru 100 300))))
      (open-eyes par-act  (((Elu  20 300)(Eru  20 300))))
      (grin-broadly par-act (((Mrh 80 1000)(Mrv 60 500)(Mlh 80 1000)(Mlv 60 500))))
      (grin-little  par-act (((Mrh 75 1000)(Mrv 55 500))))
      )))

;------------------------------------------
; MOTOR SPECIFICATIONS
;------------------------------------------

(defparameter motor-list
   ;TEMPLATE: (name class number default-time)
  '((Bll motor   3  700) ;Brow, left, lateral
    (Blc motor   2  700) ;Brow, left, central
    (Blm motor   1  700) ;Brow, left, medial
    (Brm motor   4  700)
    (Brc motor   5  700)
    (Brl motor   6  700)
    (Elu motor   7  300) ;Eye, left, upper
    (Ell motor   8  700)
    (Plh motor 151   50) ;Pupil, left, horizontal
    (Plv motor 150   50) ;Pupil, left, vertical
    (Eru motor   9  300) 
    (Erl motor  10  700)
    (Plh motor 161   50) ;Pupil, right, horizontal
    (Plv motor 160   50)
    (Mb  motor  12  800) ;Mouth, bottom
    (Mlv motor 140  800) ;Mouth, left, vertical
    (Mlh motor 141  800)
    (Mrv motor 130  800)
    (Mrh motor 131  800)
    (Hh  motor 171 1000) ;Head 
    (Hv  motor 170 1000)
    (G0  motor  20 1000) ;Gesture
    (Ga  motor  21 1000)
    (Gd  motor  22 1000)
    (Sp  motor   0    0) ;Speak
    ))




