WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1  
Old 06-20-2007, 03:10 PM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
skeleton relationship

Hey,

In my vizard, there are 27 skel_xxx under the Bones. I'd like to know the parent child relationship of all these bones. Where can I find this information?

Now I use censor to get the position of the hands. Is there any simple way to figure out the position of arms based on the position of hands?

Thanks.
Reply With Quote
  #2  
Old 06-22-2007, 10:20 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Here is the bone hierarchy for the standard Vizard avatars:
Code:
skel_Center
  skel_Pelvis
    skel_Spine
      skel_Spine1
        skel_Spine2
          skel_Spine3
            skel_Neck
              skel_Head
                skel_Jaw
              skel_ShoulderL
                skel_ArmLU
                  skel_ArmLL
                    skel_HandL
                      skel_HandLF
              skel_ShoulderR
                skel_ArmRU
                  skel_ArmRL
                    skel_HandR
                      skel_HandRF
      skel_LegLU
        skel_LegLL
          skel_FootL
            skel_FootLToe
      skel_LegRU
        skel_LegRL
          skel_FootR
            skel_FootRToe
In Vizard 3.0, you can determine this at run-time.

Vizard does not come with any inverse kinematics (IK) features. You will have to calculate this manually. Does your sensor only provide the position of the hand, or the orientation as well?
Reply With Quote
  #3  
Old 06-22-2007, 12:48 PM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
My sensor only provide the position of the hand.

If I move the parent bone, does the child bone automatically move along with it? BTW, what's skel_HandLF? Finger?

Thanks.
ruddle
Reply With Quote
  #4  
Old 06-22-2007, 02:55 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

The avatar skeleton is a hierarchical structure, so moving a bone will affect all children of that bone. The 'skel_HandLF' is the bone for the left hand fingers.
Reply With Quote
  #5  
Old 06-26-2007, 08:52 AM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
Thanks.
Where can I find the information such as length of upper arm, fore arm?
Reply With Quote
  #6  
Old 06-26-2007, 09:29 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

If you want to know the length of the upper arm you need to compute the distance between the shoulder bone and the elbow bone. For the forearm you will need to find the distance between the elbow bone and hand bone.
Reply With Quote
  #7  
Old 06-26-2007, 12:02 PM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
Hi, I'm not sure how to calculate the distance between bones. I also want to calculate the distance from the elbow rotation axis to the shoulder, and the distance from the elbow rotation axis to the wrist. Do you have any code sample?

Thanks.
Reply With Quote
  #8  
Old 06-26-2007, 12:18 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

You should be able to compute the distance between the bone positions to get the arm length. For example:
Code:
pos1 = shoulderBone.getPosition()
pos2 = elbowBone.getPosition()

length = vizmat.Distance(pos1,pos2)
Reply With Quote
  #9  
Old 06-26-2007, 12:37 PM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
Thank you so much.
Reply With Quote
  #10  
Old 06-26-2007, 05:05 PM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
Sorry, two problems when I use your code.

1. I guess shoulderBone comes from getbone('skel_ShoulderL'). Then where is elbowBone from? I don't see a elbow bone in the skeleton.

2. If shoulderBone and elbowBone are from getbone(), maybe because my Vizard is only 2.17a, it doesn't support <bone>.getPosition command. Is there any substitute?

More question about version 2.17a:
It seems <bone>.setEuler doesn't work in this version too. Any substitute for setting the rotation of the bone?

Thanks,
ruddle
Reply With Quote
  #11  
Old 06-26-2007, 05:19 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Sorry, the code I posted was for Vizard 3.0. In 2.17, I believe the syntax for getting a bone position/rotation is the following:
Code:
pos = bone.get(viz.POSITION)
euler = bone.get(viz.EULER)
If you want the length of the upper/lower arm, then I believe you should be interested in the following bones:
Code:
skel_ArmLU
skel_ArmLL
skel_HandL
Reply With Quote
  #12  
Old 06-26-2007, 05:45 PM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
This time it works. Thank you.

The results are:
The distance between skel_ShoulderL and skel_ArmLU is 0.144409524884.
The distance between skel__ArmLU and skel_ArmLL is 0.159618362784.
The distance between skel__ArmLL and skel_HandL is 0.00597032904628.
So I guess the length of upper arm is 0.14, and the lower arm is 0.15. Right?
Reply With Quote
  #13  
Old 06-26-2007, 06:09 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Actually that's incorrect. You need to get the absolute world position of the bone:
Code:
bone.get(viz.POSITION,viz.ABSOLUTE_WORLD)
This should give you the following results:
Code:
skel_ArmLU -> skel_ArmLL = 0.284790087668
skel_ArmLL -> skel_HandL = 0.290760380194
Reply With Quote
  #14  
Old 06-27-2007, 08:47 AM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
Many thanks. Two more questions about viz.ABSOLUTE_WORLD:

1. Given the angle between shoulder and upper arms, and the angle between upper and lower arms, Can I set the arm like this:

LowArmBone.rotate(0,-90,0)
UpArmBone.rotate(0,-60,30)

What do I need to use: viz.ABSOLUTE_WORLD or viz.ABSOLUTE_LOCAL?

2. Given the position of hand, Can I set the hand like this:

HandBone.translate(x,y,z,viz.ABSOLUTE_WORLD)

Why only viz.ABSOLUTE_LOCAL works?


ruddle
Reply With Quote
  #15  
Old 06-27-2007, 05:14 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

viz.ABSOLUTE_LOCAL will perform the rotation in the bones local coordinate system. viz.ABSOLUTE_WORLD will perform the rotation in the world coordinate system. There were some bugs with performing manual bone rotations in Vizard 2.x. I would recommend upgrading to Vizard 3.0 if possible.

Translating the hand with viz.ABSOLUTE_WORLD should work. Are you locking the bone before performing the translation?
Reply With Quote
  #16  
Old 06-28-2007, 01:17 PM
ruddle ruddle is offline
Member
 
Join Date: Jun 2007
Posts: 11
Yes. I locked all bones from shoulder to finger.

Thanks,
ruddle
Reply With Quote
  #17  
Old 09-05-2007, 07:30 AM
mspusch mspusch is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 223
It might be irrelevant, but Vizard R3 now can interface with Motionbuilder, which allows flawless and real-time integration of Mocap data from any Mocap system with the Vizard avatars. there are a bunch of videoclips at
http://www.worldviz.com/products/liv...ers/index.html
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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


All times are GMT -7. The time now is 04:02 PM.


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