WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #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
  #2  
Old 02-03-2014, 09:03 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Moving an avatar with tracking data is usually done with inverse kinematics. The next version of the Vizard 5 Beta will include a basic avatar IK library. Vizconnect, also included in the next Beta, will have a visual interface for using this IK and mapping trackers to avatar points. Currently the library works with up to 6 points; head, waist, hands, and feet. The result will be sufficient for many users needs.
Reply With Quote
  #3  
Old 02-04-2014, 08:04 AM
Reatus Reatus is offline
Member
 
Join Date: Jan 2014
Posts: 2
Hi Jeff,

Thanks for the fast reply! Can you tell me when the next Beta will be made available or point me to the information? I am really keen on getting more information about the IK library!

Please tell your team that you are doing an amazing job

Best regards
Reply With Quote
Reply


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 05:09 PM.


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