comparison org/body.org @ 144:48f9cba082eb

proprioception is position-dependent, investigating...
author Robert McIntyre <rlm@mit.edu>
date Thu, 02 Feb 2012 03:17:11 -0700
parents ccd057319c2a
children 7a49b81ca1bf
comparison
equal deleted inserted replaced
143:d0f4b473ab4f 144:48f9cba082eb
67 (let [[obj-a obj-b] (joint-targets parts joint) 67 (let [[obj-a obj-b] (joint-targets parts joint)
68 joint-rot (.getWorldRotation joint) 68 joint-rot (.getWorldRotation joint)
69 pre-inv-a (.inverse (.getWorldRotation obj-a)) 69 pre-inv-a (.inverse (.getWorldRotation obj-a))
70 x (.mult pre-inv-a (.mult joint-rot Vector3f/UNIT_X)) 70 x (.mult pre-inv-a (.mult joint-rot Vector3f/UNIT_X))
71 y (.mult pre-inv-a (.mult joint-rot Vector3f/UNIT_Y)) 71 y (.mult pre-inv-a (.mult joint-rot Vector3f/UNIT_Y))
72 z (.mult pre-inv-a (.mult joint-rot Vector3f/UNIT_Z))] 72 z (.mult pre-inv-a (.mult joint-rot Vector3f/UNIT_Z))
73 (println-repl "x:" x) 73 tmp-rot-a (.getWorldRotation obj-a)]
74 (println-repl "y:" y) 74 (println-repl "x:" (.mult tmp-rot-a x))
75 (println-repl "z:" z) 75 (println-repl "y:" (.mult tmp-rot-a y))
76 (println-repl "z:" (.mult tmp-rot-a z))
77 (println-repl "rot-a" (.getWorldRotation obj-a))
78 (println-repl "rot-b" (.getWorldRotation obj-b))
76 ;; this function will report proprioceptive information for the 79 ;; this function will report proprioceptive information for the
77 ;; joint. 80 ;; joint.
78 (fn [] 81 (fn []
79 ;; x is the "twist" axis, y and z are the "bend" axes 82 ;; x is the "twist" axis, y and z are the "bend" axes
80 (let [rot-a (.getWorldRotation obj-a) 83 (let [rot-a (.getWorldRotation obj-a)