WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-03-2014, 02:44 AM
Reatus Reatus is offline
Member
 
Join Date: Jan 2014
Posts: 2
Need help with bone mapping

Hi Vizard community,

I am new to python and especially Vizard and created a bone mapping script for research in a student project at university.
However I have a problem:
My arms move up, when I move them down and vice versa.

The following snippet is what I think causes the problem, but I cannot figure out the correct Eulers:

Code:
kinectToCharacter = {	'Bip01 L UpperArm':(leftShoulder, [0, 90, 0]), \
						'Bip01 L Forearm':(leftElbow, [0, 90, 0]), \
						'Bip01 R UpperArm':(rightShoulder, [0, -90, 180]), \
						'Bip01 R Forearm':(rightElbow, [0, -90, 180]), \
						'Bip01 L Thigh':(leftHip, [90, 0, -90]), \
						'Bip01 L Calf':(leftKnee, [90, 0, -90]), \
						'Bip01 R Thigh':(rightHip, [90, 0, -90]), \
						'Bip01 R Calf':(rightKnee, [90, 0, -90]), \
						'Bip01':(waist, [0, 90, -90]) \
					}
bones = {}
for boneName in kinectToCharacter:
	b = avatar.getBone(boneName)
	b.lock()
	bones[b] = kinectToCharacter[boneName]


def animate():	
	for bone in bones:
		kinectTracker = bones[bone][0]
		euler = kinectTracker.getEuler()
		m = vizmat.Transform()
		m.setEuler(euler)
		m.preEuler(bones[bone][1])
		bone.setEuler(m.getEuler(), viz.ABS_PARENT)
Oh and I am using FAAST and thus VRPN to get data from a Microsoft Kinect for Windows.

Interesting fact that might help solving my problem:
If I exchange the arms they move correctly up and down, but are obviously on the wrong side of the avatar.

To any mods/admins:
I did not know where to put this, so if this thread is in the wrong place please contact me to clarify any issues.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tracking when foot bone makes contact with x plane NicoleVR Vizard 2 11-20-2013 09:13 AM
Problems with getting head bone rotation right Enlil Vizard 2 02-13-2009 10:24 AM
3D Texture Mapping - gluBuild3DMipmaps not supported stefs Vizard 1 04-23-2008 11:00 AM
mapping method FlyingFish Vizard 1 07-12-2007 09:06 AM
avatar bone movement epl Vizard 3 05-03-2004 04:27 PM


All times are GMT -7. The time now is 01:00 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC