Mercurial > cortex
view org/body.org @ 130:b26017d1fe9a
added workaround for problem with point2point joints in native bullet; added basic muscle description image.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 30 Jan 2012 05:47:51 -0700 |
parents | fb810a2c50c2 |
children | e98850b83c2c |
line wrap: on
line source
1 #+title: The BODY!!!2 #+author: Robert McIntyre3 #+email: rlm@mit.edu4 #+description: Simulating a body (movement, touch, propioception) in jMonkeyEngine3.5 #+SETUPFILE: ../../aurellem/org/setup.org6 #+INCLUDE: ../../aurellem/org/level-0.org8 * Proprioception9 #+name: proprioception10 #+begin_src clojure11 (ns cortex.body12 (:use (cortex world util))13 (:import14 com.jme3.math.Vector3f15 com.jme3.math.Quaternion16 com.jme3.math.Vector2f17 com.jme3.math.Matrix3f18 com.jme3.bullet.control.RigidBodyControl))20 (defn any-orthogonal21 "Generate an arbitray (but stable) orthogonal vector to a given22 vector."23 [vector]24 (let [x (.getX vector)25 y (.getY vector)26 z (.getZ vector)]27 (cond28 (not= x (float 0)) (Vector3f. (- z) 0 x)29 (not= y (float 0)) (Vector3f. 0 (- z) y)30 (not= z (float 0)) (Vector3f. 0 (- z) y)31 true Vector3f/ZERO)))33 (defn project-quaternion34 "From http://stackoverflow.com/questions/3684269/35 component-of-a-quaternion-rotation-around-an-axis.37 Determine the amount of rotation a quaternion will38 cause about a given axis."39 [#^Quaternion q #^Vector3f axis]40 (let [basis-1 (any-orthogonal axis)41 basis-2 (.cross axis basis-1)42 rotated (.mult q basis-1)43 alpha (.dot basis-1 (.project rotated basis-1))44 beta (.dot basis-2 (.project rotated basis-2))]45 (Math/atan2 beta alpha)))47 (defn joint-proprioception48 "Relative position information for a two-part system connected by a49 joint. Gives the pitch, yaw, and roll of the 'B' object relative to50 the 'A' object, as determined by the joint."51 [joint]52 (let [object-a (.getUserObject (.getBodyA joint))53 object-b (.getUserObject (.getBodyB joint))54 arm-a55 (.normalize56 (.subtract57 (.localToWorld object-a (.getPivotA joint) nil)58 (.getWorldTranslation object-a)))59 rotate-a60 (doto (Matrix3f.)61 (.fromStartEndVectors arm-a Vector3f/UNIT_X))62 arm-b63 (.mult64 rotate-a65 (.normalize66 (.subtract67 (.localToWorld object-b (.getPivotB joint) nil)68 (.getWorldTranslation object-b))))69 pitch70 (.angleBetween71 (.normalize (Vector2f. (.getX arm-b) (.getY arm-b)))72 (Vector2f. 1 0))73 yaw74 (.angleBetween75 (.normalize (Vector2f. (.getX arm-b) (.getZ arm-b)))76 (Vector2f. 1 0))78 roll79 (project-quaternion80 (.mult81 (.getLocalRotation object-b)82 (doto (Quaternion.)83 (.fromRotationMatrix rotate-a)))84 arm-b)]85 ;;(println-repl (.getName object-a) (.getName object-b))86 [pitch yaw roll]))88 (defn proprioception89 "Create a function that provides proprioceptive information about an90 entire body."91 [body]92 ;; extract the body's joints93 (let [joints94 (distinct95 (reduce96 concat97 (map #(.getJoints %)98 (keep99 #(.getControl % RigidBodyControl)100 (node-seq body)))))]101 (fn []102 (map joint-proprioception joints))))104 #+end_src106 * Motor Control107 #+name: motor-control108 #+begin_src clojure109 (in-ns 'cortex.body)111 ;; surprisingly enough, terristerial creatures only move by using112 ;; torque applied about their joints. There's not a single straight113 ;; line of force in the human body at all! (A straight line of force114 ;; would correspond to some sort of jet or rocket propulseion.)116 (defn vector-motor-control117 "Create a function that accepts a sequence of Vector3f objects that118 describe the torque to be applied to each part of the body."119 [body]120 (let [nodes (node-seq body)121 controls (keep #(.getControl % RigidBodyControl) nodes)]122 (fn [torques]123 (map #(.applyTorque %1 %2)124 controls torques))))125 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;126 #+end_src128 ## note -- might want to add a lower dimensional, discrete version of129 ## this if it proves useful from a x-modal clustering perspective.131 * Examples133 #+name: test-body134 #+begin_src clojure135 (ns cortex.test.body136 (:use (cortex world util body))137 (:import138 com.jme3.math.Vector3f139 com.jme3.math.ColorRGBA140 com.jme3.bullet.joints.Point2PointJoint141 com.jme3.bullet.control.RigidBodyControl142 com.jme3.system.NanoTimer))144 (defn worm-segments145 "Create multiple evenly spaced box segments. They're fabulous!"146 [segment-length num-segments interstitial-space radius]147 (letfn [(nth-segment148 [n]149 (box segment-length radius radius :mass 0.1150 :position151 (Vector3f.152 (* 2 n (+ interstitial-space segment-length)) 0 0)153 :name (str "worm-segment" n)154 :color (ColorRGBA/randomColor)))]155 (map nth-segment (range num-segments))))157 (defn connect-at-midpoint158 "Connect two physics objects with a Point2Point joint constraint at159 the point equidistant from both objects' centers."160 [segmentA segmentB]161 (let [centerA (.getWorldTranslation segmentA)162 centerB (.getWorldTranslation segmentB)163 midpoint (.mult (.add centerA centerB) (float 0.5))164 pivotA (.subtract midpoint centerA)165 pivotB (.subtract midpoint centerB)167 ;; A side-effect of creating a joint registers168 ;; it with both physics objects which in turn169 ;; will register the joint with the physics system170 ;; when the simulation is started.171 joint (Point2PointJoint.172 (.getControl segmentA RigidBodyControl)173 (.getControl segmentB RigidBodyControl)174 pivotA175 pivotB)]176 segmentB))178 (defn eve-worm179 "Create a worm-like body bound by invisible joint constraints."180 []181 (let [segments (worm-segments 0.2 5 0.1 0.1)]182 (dorun (map (partial apply connect-at-midpoint)183 (partition 2 1 segments)))184 (nodify "worm" segments)))186 (defn worm-pattern187 "This is a simple, mindless motor control pattern that drives the188 second segment of the worm's body at an offset angle with189 sinusoidally varying strength."190 [time]191 (let [angle (* Math/PI (/ 9 20))192 direction (Vector3f. 0 (Math/sin angle) (Math/cos angle))]193 [Vector3f/ZERO194 (.mult195 direction196 (float (* 2 (Math/sin (* Math/PI 2 (/ (rem time 300 ) 300))))))197 Vector3f/ZERO198 Vector3f/ZERO199 Vector3f/ZERO]))201 (defn test-motor-control202 "Testing motor-control:203 You should see a multi-segmented worm-like object fall onto the204 table and begin writhing and moving."205 []206 (let [worm (eve-worm)207 time (atom 0)208 worm-motor-map (vector-motor-control worm)]209 (world210 (nodify [worm211 (box 10 0.5 10 :position (Vector3f. 0 -5 0) :mass 0212 :color ColorRGBA/Gray)])213 standard-debug-controls214 (fn [world]215 (enable-debug world)216 (light-up-everything world)217 (comment218 (com.aurellem.capture.Capture/captureVideo219 world220 (file-str "/home/r/proj/cortex/tmp/moving-worm")))221 )223 (fn [_ _]224 (swap! time inc)225 (Thread/sleep 20)226 (dorun (worm-motor-map227 (worm-pattern @time)))))))230 (require 'cortex.silly)231 (defn join-at-point [obj-a obj-b world-pivot]232 (cortex.silly/joint-dispatch233 {:type :point}234 (.getControl obj-a RigidBodyControl)235 (.getControl obj-b RigidBodyControl)236 (cortex.silly/world-to-local obj-a world-pivot)237 (cortex.silly/world-to-local obj-b world-pivot)238 nil239 ))243 (defn blab-* []244 (let [hand (box 0.5 0.2 0.2 :position (Vector3f. 0 0 0)245 :mass 0 :color ColorRGBA/Green)246 finger (box 0.5 0.2 0.2 :position (Vector3f. 2.4 0 0)247 :mass 1 :color ColorRGBA/Red)248 connection-point (Vector3f. 1.2 0 0)249 root (nodify [hand finger])]251 (join-at-point hand finger (Vector3f. 1.2 0 0))253 (.setCollisionGroup254 (.getControl hand RigidBodyControl)255 PhysicsCollisionObject/COLLISION_GROUP_NONE)256 (world257 root258 standard-debug-controls259 (fn [world]260 (enable-debug world)261 (.setTimer world (com.aurellem.capture.RatchetTimer. 60))262 (set-gravity world Vector3f/ZERO)263 )264 no-op)))266 (defn proprioception-debug-window267 []268 (let [vi (view-image)]269 (fn [prop-data]270 (dorun271 (map272 (comp273 println-repl274 (fn [[p y r]]275 (format276 "pitch: %1.2f\nyaw: %1.2f\nroll: %1.2f\n"277 p y r)))278 prop-data)))))284 (defn test-proprioception285 "Testing proprioception:286 You should see two foating bars, and a printout of pitch, yaw, and287 roll. Pressing key-r/key-t should move the blue bar up and down and288 change only the value of pitch. key-f/key-g moves it side to side289 and changes yaw. key-v/key-b will spin the blue segment clockwise290 and counterclockwise, and only affect roll."291 []292 (let [hand (box 1 0.2 0.2 :position (Vector3f. 0 2 0)293 :mass 0 :color ColorRGBA/Green)294 finger (box 1 0.2 0.2 :position (Vector3f. 2.4 2 0)295 :mass 1 :color ColorRGBA/Red)296 floor (box 10 0.5 10 :position (Vector3f. 0 -5 0)297 :mass 0 :color ColorRGBA/Gray)299 move-up? (atom false)300 move-down? (atom false)301 move-left? (atom false)302 move-right? (atom false)303 roll-left? (atom false)304 roll-right? (atom false)305 control (.getControl finger RigidBodyControl)306 time (atom 0)307 joint (join-at-point hand finger (Vector3f. 1.2 2 0 ))308 creature (nodify [hand finger])309 prop (proprioception creature)311 prop-view (proprioception-debug-window)314 ]318 (.setCollisionGroup319 (.getControl hand RigidBodyControl)320 PhysicsCollisionObject/COLLISION_GROUP_NONE)323 (world324 (nodify [hand finger floor])325 (merge standard-debug-controls326 {"key-r" (fn [_ pressed?] (reset! move-up? pressed?))327 "key-t" (fn [_ pressed?] (reset! move-down? pressed?))328 "key-f" (fn [_ pressed?] (reset! move-left? pressed?))329 "key-g" (fn [_ pressed?] (reset! move-right? pressed?))330 "key-v" (fn [_ pressed?] (reset! roll-left? pressed?))331 "key-b" (fn [_ pressed?] (reset! roll-right? pressed?))})332 (fn [world]333 (.setTimer world (com.aurellem.capture.RatchetTimer. 60))334 (set-gravity world (Vector3f. 0 0 0))335 (light-up-everything world))336 (fn [_ _]337 (if @move-up?338 (.applyTorque control339 (.mult (.getPhysicsRotation control)340 (Vector3f. 0 0 10))))341 (if @move-down?342 (.applyTorque control343 (.mult (.getPhysicsRotation control)344 (Vector3f. 0 0 -10))))345 (if @move-left?346 (.applyTorque control347 (.mult (.getPhysicsRotation control)348 (Vector3f. 0 10 0))))349 (if @move-right?350 (.applyTorque control351 (.mult (.getPhysicsRotation control)352 (Vector3f. 0 -10 0))))353 (if @roll-left?354 (.applyTorque control355 (.mult (.getPhysicsRotation control)356 (Vector3f. -1 0 0))))357 (if @roll-right?358 (.applyTorque control359 (.mult (.getPhysicsRotation control)360 (Vector3f. 1 0 0))))362 (if (= 0 (rem (swap! time inc) 20))363 (prop-view364 (joint-proprioception joint)))))))367 #+end_src369 #+results: test-body370 : #'cortex.test.body/test-proprioception373 * COMMENT code-limbo374 #+begin_src clojure375 ;;(.loadModel376 ;; (doto (asset-manager)377 ;; (.registerLoader BlenderModelLoader (into-array String ["blend"])))378 ;; "Models/person/person.blend")381 (defn load-blender-model382 "Load a .blend file using an asset folder relative path."383 [^String model]384 (.loadModel385 (doto (asset-manager)386 (.registerLoader BlenderModelLoader (into-array String ["blend"])))387 model))390 (defn view-model [^String model]391 (view392 (.loadModel393 (doto (asset-manager)394 (.registerLoader BlenderModelLoader (into-array String ["blend"])))395 model)))397 (defn load-blender-scene [^String model]398 (.loadModel399 (doto (asset-manager)400 (.registerLoader BlenderLoader (into-array String ["blend"])))401 model))403 (defn worm404 []405 (.loadModel (asset-manager) "Models/anim2/Cube.mesh.xml"))407 (defn oto408 []409 (.loadModel (asset-manager) "Models/Oto/Oto.mesh.xml"))411 (defn sinbad412 []413 (.loadModel (asset-manager) "Models/Sinbad/Sinbad.mesh.xml"))415 (defn worm-blender416 []417 (first (seq (.getChildren (load-blender-model418 "Models/anim2/simple-worm.blend")))))420 (defn body421 "given a node with a SkeletonControl, will produce a body sutiable422 for AI control with movement and proprioception."423 [node]424 (let [skeleton-control (.getControl node SkeletonControl)425 krc (KinematicRagdollControl.)]426 (comment427 (dorun428 (map #(.addBoneName krc %)429 ["mid2" "tail" "head" "mid1" "mid3" "mid4" "Dummy-Root" ""]430 ;;"mid2" "mid3" "tail" "head"]431 )))432 (.addControl node krc)433 (.setRagdollMode krc)434 )435 node436 )437 (defn show-skeleton [node]438 (let [sd440 (doto441 (SkeletonDebugger. "aurellem-skel-debug"442 (skel node))443 (.setMaterial (green-x-ray)))]444 (.attachChild node sd)445 node))449 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;451 ;; this could be a good way to give objects special properties like452 ;; being eyes and the like454 (.getUserData455 (.getChild456 (load-blender-model "Models/property/test.blend") 0)457 "properties")459 ;; the properties are saved along with the blender file.460 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;465 (defn init-debug-skel-node466 [f debug-node skeleton]467 (let [bones468 (map #(.getBone skeleton %)469 (range (.getBoneCount skeleton)))]470 (dorun (map #(.setUserControl % true) bones))471 (dorun (map (fn [b]472 (println (.getName b)473 " -- " (f b)))474 bones))475 (dorun476 (map #(.attachChild477 debug-node478 (doto479 (sphere 0.1480 :position (f %)481 :physical? false)482 (.setMaterial (green-x-ray))))483 bones)))484 debug-node)486 (import jme3test.bullet.PhysicsTestHelper)489 (defn test-zzz [the-worm world value]490 (if (not value)491 (let [skeleton (skel the-worm)]492 (println-repl "enabling bones")493 (dorun494 (map495 #(.setUserControl (.getBone skeleton %) true)496 (range (.getBoneCount skeleton))))499 (let [b (.getBone skeleton 2)]500 (println-repl "moving " (.getName b))501 (println-repl (.getLocalPosition b))502 (.setUserTransforms b503 Vector3f/UNIT_X504 Quaternion/IDENTITY505 ;;(doto (Quaternion.)506 ;; (.fromAngles (/ Math/PI 2)507 ;; 0508 ;; 0510 (Vector3f. 1 1 1))511 )513 (println-repl "hi! <3"))))516 (defn test-ragdoll []518 (let [the-worm520 ;;(.loadModel (asset-manager) "Models/anim2/Cube.mesh.xml")521 (doto (show-skeleton (worm-blender))522 (.setLocalTranslation (Vector3f. 0 10 0))523 ;;(worm)524 ;;(oto)525 ;;(sinbad)526 )527 ]530 (.start531 (world532 (doto (Node.)533 (.attachChild the-worm))534 {"key-return" (fire-cannon-ball)535 "key-space" (partial test-zzz the-worm)536 }537 (fn [world]538 (light-up-everything world)539 (PhysicsTestHelper/createPhysicsTestWorld540 (.getRootNode world)541 (asset-manager)542 (.getPhysicsSpace543 (.getState (.getStateManager world) BulletAppState)))544 (set-gravity world Vector3f/ZERO)545 ;;(.setTimer world (NanoTimer.))546 ;;(org.lwjgl.input.Mouse/setGrabbed false)547 )548 no-op549 )552 )))555 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;556 ;;; here is the ragdoll stuff558 (def worm-mesh (.getMesh (.getChild (worm-blender) 0)))559 (def mesh worm-mesh)561 (.getFloatBuffer mesh VertexBuffer$Type/Position)562 (.getFloatBuffer mesh VertexBuffer$Type/BoneWeight)563 (.getData (.getBuffer mesh VertexBuffer$Type/BoneIndex))566 (defn position [index]567 (.get568 (.getFloatBuffer worm-mesh VertexBuffer$Type/Position)569 index))571 (defn bones [index]572 (.get573 (.getData (.getBuffer mesh VertexBuffer$Type/BoneIndex))574 index))576 (defn bone-weights [index]577 (.get578 (.getFloatBuffer mesh VertexBuffer$Type/BoneWeight)579 index))583 (defn vertex-bones [vertex]584 (vec (map (comp int bones) (range (* vertex 4) (+ (* vertex 4) 4)))))586 (defn vertex-weights [vertex]587 (vec (map (comp float bone-weights) (range (* vertex 4) (+ (* vertex 4) 4)))))589 (defn vertex-position [index]590 (let [offset (* index 3)]591 (Vector3f. (position offset)592 (position (inc offset))593 (position (inc(inc offset))))))595 (def vertex-info (juxt vertex-position vertex-bones vertex-weights))597 (defn bone-control-color [index]598 (get {[1 0 0 0] ColorRGBA/Red599 [1 2 0 0] ColorRGBA/Magenta600 [2 0 0 0] ColorRGBA/Blue}601 (vertex-bones index)602 ColorRGBA/White))604 (defn influence-color [index bone-num]605 (get606 {(float 0) ColorRGBA/Blue607 (float 0.5) ColorRGBA/Green608 (float 1) ColorRGBA/Red}609 ;; find the weight of the desired bone610 ((zipmap (vertex-bones index)(vertex-weights index))611 bone-num)612 ColorRGBA/Blue))614 (def worm-vertices (set (map vertex-info (range 60))))617 (defn test-info []618 (let [points (Node.)]619 (dorun620 (map #(.attachChild points %)621 (map #(sphere 0.01622 :position (vertex-position %)623 :color (influence-color % 1)624 :physical? false)625 (range 60))))626 (view points)))629 (defrecord JointControl [joint physics-space]630 PhysicsControl631 (setPhysicsSpace [this space]632 (dosync633 (ref-set (:physics-space this) space))634 (.addJoint space (:joint this)))635 (update [this tpf])636 (setSpatial [this spatial])637 (render [this rm vp])638 (getPhysicsSpace [this] (deref (:physics-space this)))639 (isEnabled [this] true)640 (setEnabled [this state]))642 (defn add-joint643 "Add a joint to a particular object. When the object is added to the644 PhysicsSpace of a simulation, the joint will also be added"645 [object joint]646 (let [control (JointControl. joint (ref nil))]647 (.addControl object control))648 object)651 (defn hinge-world652 []653 (let [sphere1 (sphere)654 sphere2 (sphere 1 :position (Vector3f. 3 3 3))655 joint (Point2PointJoint.656 (.getControl sphere1 RigidBodyControl)657 (.getControl sphere2 RigidBodyControl)658 Vector3f/ZERO (Vector3f. 3 3 3))]659 (add-joint sphere1 joint)660 (doto (Node. "hinge-world")661 (.attachChild sphere1)662 (.attachChild sphere2))))665 (defn test-joint []666 (view (hinge-world)))668 ;; (defn copier-gen []669 ;; (let [count (atom 0)]670 ;; (fn [in]671 ;; (swap! count inc)672 ;; (clojure.contrib.duck-streams/copy673 ;; in (File. (str "/home/r/tmp/mao-test/clojure-images/"674 ;; ;;/home/r/tmp/mao-test/clojure-images675 ;; (format "%08d.png" @count)))))))676 ;; (defn decrease-framerate []677 ;; (map678 ;; (copier-gen)679 ;; (sort680 ;; (map first681 ;; (partition682 ;; 4683 ;; (filter #(re-matches #".*.png$" (.getCanonicalPath %))684 ;; (file-seq685 ;; (file-str686 ;; "/home/r/media/anime/mao-temp/images"))))))))690 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;692 (defn proprioception693 "Create a proprioception map that reports the rotations of the694 various limbs of the creature's body"695 [creature]696 [#^Node creature]697 (let [698 nodes (node-seq creature)699 joints700 (map701 :joint702 (filter703 #(isa? (class %) JointControl)704 (reduce705 concat706 (map (fn [node]707 (map (fn [num] (.getControl node num))708 (range (.getNumControls node))))709 nodes))))]710 (fn []711 (reduce concat (map relative-positions (list (first joints)))))))714 (defn skel [node]715 (doto716 (.getSkeleton717 (.getControl node SkeletonControl))718 ;; this is necessary to force the skeleton to have accurate world719 ;; transforms before it is rendered to the screen.720 (.resetAndUpdate)))722 (defn green-x-ray []723 (doto (Material. (asset-manager)724 "Common/MatDefs/Misc/Unshaded.j3md")725 (.setColor "Color" ColorRGBA/Green)726 (-> (.getAdditionalRenderState)727 (.setDepthTest false))))729 (defn test-worm []730 (.start731 (world732 (doto (Node.)733 ;;(.attachChild (point-worm))734 (.attachChild (load-blender-model735 "Models/anim2/joint-worm.blend"))737 (.attachChild (box 10 1 10738 :position (Vector3f. 0 -2 0) :mass 0739 :color (ColorRGBA/Gray))))740 {741 "key-space" (fire-cannon-ball)742 }743 (fn [world]744 (enable-debug world)745 (light-up-everything world)746 ;;(.setTimer world (NanoTimer.))747 )748 no-op)))752 ;; defunct movement stuff753 (defn torque-controls [control]754 (let [torques755 (concat756 (map #(Vector3f. 0 (Math/sin %) (Math/cos %))757 (range 0 (* Math/PI 2) (/ (* Math/PI 2) 20)))758 [Vector3f/UNIT_X])]759 (map (fn [torque-axis]760 (fn [torque]761 (.applyTorque762 control763 (.mult (.mult (.getPhysicsRotation control)764 torque-axis)765 (float766 (* (.getMass control) torque))))))767 torques)))769 (defn motor-map770 "Take a creature and generate a function that will enable fine771 grained control over all the creature's limbs."772 [#^Node creature]773 (let [controls (keep #(.getControl % RigidBodyControl)774 (node-seq creature))775 limb-controls (reduce concat (map torque-controls controls))776 body-control (partial map #(%1 %2) limb-controls)]777 body-control))779 (defn test-motor-map780 "see how torque works."781 []782 (let [finger (box 3 0.5 0.5 :position (Vector3f. 0 2 0)783 :mass 1 :color ColorRGBA/Green)784 motor-map (motor-map finger)]785 (world786 (nodify [finger787 (box 10 0.5 10 :position (Vector3f. 0 -5 0) :mass 0788 :color ColorRGBA/Gray)])789 standard-debug-controls790 (fn [world]791 (set-gravity world Vector3f/ZERO)792 (light-up-everything world)793 (.setTimer world (NanoTimer.)))794 (fn [_ _]795 (dorun (motor-map [0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]))))))796 #+end_src804 * COMMENT generate Source805 #+begin_src clojure :tangle ../src/cortex/body.clj806 <<proprioception>>807 <<motor-control>>808 #+end_src810 #+begin_src clojure :tangle ../src/cortex/test/body.clj811 <<test-body>>812 #+end_src