trying to get Y axis of skeletal joint but keep getting a 0, help!!
-
Friday, May 25, 2012 9:25 PM
I'm using this code in a VPL if box and calculate box: RawFrames.RawSkeletonFrameData.SkeletonData[0].Joints[JointType.HandRight].Position.Y
but even when I move my hand around I always get a 0 for the position!!
anyone could tell me why?
NOTE: all other code in the application does not have anything to do with skeletal tracking or the kinect, so this is the only piece of code that deals with anything kinect related so maybe I missed something?
All Replies
-
Saturday, May 26, 2012 2:37 AMModerator
Are you sure the skeleton that is being created is in the 0 position of the index? I.e. perhaps it's in RawFrames.RawSkeletonFrameData.SkeletonData[1] or some other position. Technically it should be 0 when it first starts but it's worth a check.
Do you get values for any other joint types?
Dan Sionov
- Marked As Answer by Zainab Al-Ansari Saturday, May 26, 2012 9:23 PM
-
Saturday, May 26, 2012 11:49 AM
Hi Dan, thanks for your reply
I worked on your advice and made the app to check if any skeleton at positions 0 to 7 are being tracked and then get the joint coords from the tracked skeleton, but now I don't even get a 0!
I put a WPFUIKinect service to make sure, but the skeleton seems to be tracked just fine, I don't know what's the problem
could you take a look at my code and let me know what you think?
thank you!
-
Saturday, May 26, 2012 2:05 PM
I debugged it a little and found out the problem
in GetSkeletonIndex activity I changed the if statements from state == SkeletonTrackingState.Tracked to value == SkeletonTrackingState.Tracked, and now it works! it gives me the number
I also attached TextToSpeech services to the if statements in the Kinect diagram to make the app tell me which index is being used, and for some reason am getting a different index every time I run the app!!
I thought the default is 0? but I just checked, first it gave me a 1 then I closed robotics studio restarted it ran the app and it gave me a 4!
well thanks for your help Dan, and sorry for all the blabber lol
but I have 1 question, am getting the Y position now, I got a number above 0.5 once and then I got numbers all very close to 0 afterwards
am checking the Y position of the right hand, could you explain to me what the number means? I thought it would be closer to 1 if I raise my hand in the air and closer to 0 if am lowering it but that didn't happen
I need to understand this because I need to know if the hand is raised or lowered for my real application
-
Thursday, May 31, 2012 8:10 PMModeratorJust to be clear, the Kinect tracks six (0-5) people but the current SDK will provide skeleton information for two.

