changeset 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 61513c80bc0e
files assets/Models/joint/joint.blend assets/Models/joint/retina.png org/joint.org org/vision.org
diffstat 4 files changed, 36 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
     1.1 Binary file assets/Models/joint/joint.blend has changed
     2.1 Binary file assets/Models/joint/retina.png has changed
     3.1 --- a/org/joint.org	Sun Jul 22 11:30:19 2012 -0500
     3.2 +++ b/org/joint.org	Mon Jul 23 03:51:13 2012 -0500
     3.3 @@ -1,6 +1,29 @@
     3.4  
     3.5  
     3.6 -* A self learning joint
     3.7 +* A joint
     3.8 +
     3.9 +The point of this joint is that it uses exploratory motor movements to
    3.10 +learn how to move to any particular position.
    3.11 +
    3.12 +visual-information -- list of functions which must each be called with the
    3.13 +world the argument, each of which returns [topology data]. Each element
    3.14 +of data is a number between 0 and 255 representing the intensity of
    3.15 +the light recieved at that sensor.
    3.16 +
    3.17 +proprioception -- list of nullary functions, one for each joint, which
    3.18 +return [heding pitch roll].
    3.19 +
    3.20 +touch -- list of functions which must each be called with a Node
    3.21 +(normally the root node of the simulation) the argument, each of which
    3.22 +returns [topology data]. Each element of data is a posive float
    3.23 +between 0.0 and the max length of the "hairs" of which the touch sense
    3.24 +is composed.
    3.25 +
    3.26 +movement -- list of functions, one for each muscle, which must be
    3.27 +called with an integer between 0 and the total number of muscle fibers
    3.28 +in the muscle. Each function returns a float which is (current-force/
    3.29 +total-possible-force).
    3.30 +
    3.31  
    3.32  #+name: load-creature
    3.33  #+begin_src clojure
    3.34 @@ -12,8 +35,10 @@
    3.35    (load-blender-model joint))
    3.36  
    3.37  
    3.38 +
    3.39 +
    3.40 +
    3.41  (defn test-creature []
    3.42 -
    3.43    (let [me (sphere 0.5 :color ColorRGBA/Blue :physical? false)
    3.44          creature (doto (load-creature) (body!))
    3.45  
    3.46 @@ -21,8 +46,8 @@
    3.47          touch (touch! creature)
    3.48          touch-display (view-touch)
    3.49  
    3.50 -        ;;vision (vision! creature)
    3.51 -        ;;vision-display (view-vision)
    3.52 +        vision (vision! creature)
    3.53 +        vision-display (view-vision)
    3.54  
    3.55          ;;hearing (hearing! creature)
    3.56          ;;hearing-display (view-hearing)
    3.57 @@ -37,19 +62,16 @@
    3.58          fix-display (gen-fix-display)
    3.59  
    3.60          floor (box 10 2 10 :position (Vector3f. 0 -9 0)
    3.61 -                   :color ColorRGBA/Gray :mass 0)
    3.62 -
    3.63 -        timer (RatchetTimer. 60)
    3.64 -        ]
    3.65 -
    3.66 -
    3.67 +                   :color ColorRGBA/Gray :mass 0)]
    3.68      (world
    3.69       (nodify [floor me creature])
    3.70       standard-debug-controls
    3.71       (fn [world]
    3.72 -       (.setTimer world timer)
    3.73 -       )
    3.74 +       (let [timer (RatchetTimer. 60)]
    3.75 +         (.setTimer world timer)
    3.76 +         (display-dilated-time world timer)))
    3.77       (fn [world tpf]
    3.78 +       (.setLocalTranslation me (.getLocation (.getCamera world)))
    3.79         (fix-display world)))))
    3.80  
    3.81      
     4.1 --- a/org/vision.org	Sun Jul 22 11:30:19 2012 -0500
     4.2 +++ b/org/vision.org	Mon Jul 23 03:51:13 2012 -0500
     4.3 @@ -411,8 +411,8 @@
     4.4  #+name: main
     4.5  #+begin_src clojure
     4.6  (defn vision!
     4.7 -  "Returns a function which returns visual sensory data when called
     4.8 -   inside a running simulation."
     4.9 +  "Returns a list of functions, each of which returns visual sensory
    4.10 +   data when called inside a running simulation."
    4.11    [#^Node creature & {skip :skip :or {skip 0}}]
    4.12    (reduce
    4.13     concat