# HG changeset patch # User Robert McIntyre # Date 1343033473 18000 # Node ID 5405f369f4a098dbcbe1b15bec2ea5f657db84ef # Parent ef958c44563d5892dbecbe9f60f465e8805f5604 added summary of each sense for the joint. diff -r ef958c44563d -r 5405f369f4a0 assets/Models/joint/joint.blend Binary file assets/Models/joint/joint.blend has changed diff -r ef958c44563d -r 5405f369f4a0 assets/Models/joint/retina.png Binary file assets/Models/joint/retina.png has changed diff -r ef958c44563d -r 5405f369f4a0 org/joint.org --- a/org/joint.org Sun Jul 22 11:30:19 2012 -0500 +++ b/org/joint.org Mon Jul 23 03:51:13 2012 -0500 @@ -1,6 +1,29 @@ -* A self learning joint +* A joint + +The point of this joint is that it uses exploratory motor movements to +learn how to move to any particular position. + +visual-information -- list of functions which must each be called with the +world the argument, each of which returns [topology data]. Each element +of data is a number between 0 and 255 representing the intensity of +the light recieved at that sensor. + +proprioception -- list of nullary functions, one for each joint, which +return [heding pitch roll]. + +touch -- list of functions which must each be called with a Node +(normally the root node of the simulation) the argument, each of which +returns [topology data]. Each element of data is a posive float +between 0.0 and the max length of the "hairs" of which the touch sense +is composed. + +movement -- list of functions, one for each muscle, which must be +called with an integer between 0 and the total number of muscle fibers +in the muscle. Each function returns a float which is (current-force/ +total-possible-force). + #+name: load-creature #+begin_src clojure @@ -12,8 +35,10 @@ (load-blender-model joint)) + + + (defn test-creature [] - (let [me (sphere 0.5 :color ColorRGBA/Blue :physical? false) creature (doto (load-creature) (body!)) @@ -21,8 +46,8 @@ touch (touch! creature) touch-display (view-touch) - ;;vision (vision! creature) - ;;vision-display (view-vision) + vision (vision! creature) + vision-display (view-vision) ;;hearing (hearing! creature) ;;hearing-display (view-hearing) @@ -37,19 +62,16 @@ fix-display (gen-fix-display) floor (box 10 2 10 :position (Vector3f. 0 -9 0) - :color ColorRGBA/Gray :mass 0) - - timer (RatchetTimer. 60) - ] - - + :color ColorRGBA/Gray :mass 0)] (world (nodify [floor me creature]) standard-debug-controls (fn [world] - (.setTimer world timer) - ) + (let [timer (RatchetTimer. 60)] + (.setTimer world timer) + (display-dilated-time world timer))) (fn [world tpf] + (.setLocalTranslation me (.getLocation (.getCamera world))) (fix-display world))))) diff -r ef958c44563d -r 5405f369f4a0 org/vision.org --- a/org/vision.org Sun Jul 22 11:30:19 2012 -0500 +++ b/org/vision.org Mon Jul 23 03:51:13 2012 -0500 @@ -411,8 +411,8 @@ #+name: main #+begin_src clojure (defn vision! - "Returns a function which returns visual sensory data when called - inside a running simulation." + "Returns a list of functions, each of which returns visual sensory + data when called inside a running simulation." [#^Node creature & {skip :skip :or {skip 0}}] (reduce concat