diff org/joint.org @ 348:5405f369f4a0

added summary of each sense for the joint.
author Robert McIntyre <rlm@mit.edu>
date Mon, 23 Jul 2012 03:51:13 -0500
parents ef958c44563d
children d2806d5c5f74
line wrap: on
line diff
     1.1 --- a/org/joint.org	Sun Jul 22 11:30:19 2012 -0500
     1.2 +++ b/org/joint.org	Mon Jul 23 03:51:13 2012 -0500
     1.3 @@ -1,6 +1,29 @@
     1.4  
     1.5  
     1.6 -* A self learning joint
     1.7 +* A joint
     1.8 +
     1.9 +The point of this joint is that it uses exploratory motor movements to
    1.10 +learn how to move to any particular position.
    1.11 +
    1.12 +visual-information -- list of functions which must each be called with the
    1.13 +world the argument, each of which returns [topology data]. Each element
    1.14 +of data is a number between 0 and 255 representing the intensity of
    1.15 +the light recieved at that sensor.
    1.16 +
    1.17 +proprioception -- list of nullary functions, one for each joint, which
    1.18 +return [heding pitch roll].
    1.19 +
    1.20 +touch -- list of functions which must each be called with a Node
    1.21 +(normally the root node of the simulation) the argument, each of which
    1.22 +returns [topology data]. Each element of data is a posive float
    1.23 +between 0.0 and the max length of the "hairs" of which the touch sense
    1.24 +is composed.
    1.25 +
    1.26 +movement -- list of functions, one for each muscle, which must be
    1.27 +called with an integer between 0 and the total number of muscle fibers
    1.28 +in the muscle. Each function returns a float which is (current-force/
    1.29 +total-possible-force).
    1.30 +
    1.31  
    1.32  #+name: load-creature
    1.33  #+begin_src clojure
    1.34 @@ -12,8 +35,10 @@
    1.35    (load-blender-model joint))
    1.36  
    1.37  
    1.38 +
    1.39 +
    1.40 +
    1.41  (defn test-creature []
    1.42 -
    1.43    (let [me (sphere 0.5 :color ColorRGBA/Blue :physical? false)
    1.44          creature (doto (load-creature) (body!))
    1.45  
    1.46 @@ -21,8 +46,8 @@
    1.47          touch (touch! creature)
    1.48          touch-display (view-touch)
    1.49  
    1.50 -        ;;vision (vision! creature)
    1.51 -        ;;vision-display (view-vision)
    1.52 +        vision (vision! creature)
    1.53 +        vision-display (view-vision)
    1.54  
    1.55          ;;hearing (hearing! creature)
    1.56          ;;hearing-display (view-hearing)
    1.57 @@ -37,19 +62,16 @@
    1.58          fix-display (gen-fix-display)
    1.59  
    1.60          floor (box 10 2 10 :position (Vector3f. 0 -9 0)
    1.61 -                   :color ColorRGBA/Gray :mass 0)
    1.62 -
    1.63 -        timer (RatchetTimer. 60)
    1.64 -        ]
    1.65 -
    1.66 -
    1.67 +                   :color ColorRGBA/Gray :mass 0)]
    1.68      (world
    1.69       (nodify [floor me creature])
    1.70       standard-debug-controls
    1.71       (fn [world]
    1.72 -       (.setTimer world timer)
    1.73 -       )
    1.74 +       (let [timer (RatchetTimer. 60)]
    1.75 +         (.setTimer world timer)
    1.76 +         (display-dilated-time world timer)))
    1.77       (fn [world tpf]
    1.78 +       (.setLocalTranslation me (.getLocation (.getCamera world)))
    1.79         (fix-display world)))))
    1.80  
    1.81