# HG changeset patch # User Robert McIntyre # Date 1328175022 25200 # Node ID d0f4b473ab4f7b50bc4dae49d8544d71d9b30d03 # Parent ccd057319c2aa47d551f8f135dbed63937e557c4 debugging worm proprioception diff -r ccd057319c2a -r d0f4b473ab4f assets/Models/creature1/try-again.blend Binary file assets/Models/creature1/try-again.blend has changed diff -r ccd057319c2a -r d0f4b473ab4f org/test-creature.org --- a/org/test-creature.org Thu Feb 02 02:03:19 2012 -0700 +++ b/org/test-creature.org Thu Feb 02 02:30:22 2012 -0700 @@ -1156,66 +1156,75 @@ ;; dream ] - (world - (nodify [creature - (box 10 2 10 :position (Vector3f. 0 -9 0) - :color ColorRGBA/Gray :mass 0) - x-axis y-axis z-axis - me - ]) - (merge standard-debug-controls - {"key-return" - (fn [_ value] - (if value - (do - (println-repl "play-sound") - (.play bell))))}) - (fn [world] - (light-up-everything world) - (enable-debug world) - (dorun (map #(% world) init-vision-fns)) - (dorun (map #(% world) init-hearing-fns)) - - (add-eye world - (attach-eye creature (test-eye)) - (comp (view-image) BufferedImage!)) - - (add-eye world (.getCamera world) no-op) - ;;(set-gravity world (Vector3f. 0 0 0)) - ;;(com.aurellem.capture.Capture/captureVideo - ;; world (file-str "/home/r/proj/ai-videos/hand")) - ;;(.setTimer world (RatchetTimer. 60)) - (speed-up world) - ;;(set-gravity world (Vector3f. 0 0 0)) - ) - (fn [world tpf] - ;;(dorun - ;; (map #(%1 %2) touch-nerves (repeat (.getRootNode world)))) - - (prop-debug (prop)) - - (dorun - (map #(%1 (%2 (.getRootNode world))) - touch-debug-windows touch-nerves)) - - (dorun - (map #(%1 (%2)) - vision-debug vision-data)) - (dorun - (map #(%1 (%2)) hearing-windows hearing-senses)) - - - ;;(println-repl (vision-data)) - (.setLocalTranslation me (.getLocation (.getCamera world))) - - - ) + + + (apply + world + (with-movement + (.getChild creature "worm-21") + ["key-r" "key-t" + "key-f" "key-g" + "key-v" "key-b"] + [10 10 10 10 1 1] + [(nodify [creature + (box 10 2 10 :position (Vector3f. 0 -9 0) + :color ColorRGBA/Gray :mass 0) + x-axis y-axis z-axis + me + ]) + (merge standard-debug-controls + {"key-return" + (fn [_ value] + (if value + (do + (println-repl "play-sound") + (.play bell))))}) + (fn [world] + (light-up-everything world) + (enable-debug world) + (dorun (map #(% world) init-vision-fns)) + (dorun (map #(% world) init-hearing-fns)) + + (add-eye world + (attach-eye creature (test-eye)) + (comp (view-image) BufferedImage!)) + + (add-eye world (.getCamera world) no-op) + (set-gravity world (Vector3f. 0 0 0)) + ;;(com.aurellem.capture.Capture/captureVideo + ;; world (file-str "/home/r/proj/ai-videos/hand")) + ;;(.setTimer world (RatchetTimer. 60)) + (speed-up world) + ;;(set-gravity world (Vector3f. 0 0 0)) + ) + (fn [world tpf] + ;;(dorun + ;; (map #(%1 %2) touch-nerves (repeat (.getRootNode world)))) + + (prop-debug (prop)) + + (dorun + (map #(%1 (%2 (.getRootNode world))) + touch-debug-windows touch-nerves)) + + (dorun + (map #(%1 (%2)) + vision-debug vision-data)) + (dorun + (map #(%1 (%2)) hearing-windows hearing-senses)) + + + ;;(println-repl (vision-data)) + (.setLocalTranslation me (.getLocation (.getCamera world))) + + + )] ;;(let [timer (atom 0)] ;; (fn [_ _] ;; (swap! timer inc) ;; (if (= (rem @timer 60) 0) ;; (println-repl (float (/ @timer 60)))))) - ))) + ))))