Robotics StackExchange | Archived questions

problem understanding jointposition and jointorientation

Hello Guys,

I'm working on a project that modify the current way to keep track of human joints' orientation.

So I looked up the openni_tracker.cpp file and have a few questions in my mind where it uses jointposition and jointorientation.

XnSkeletonJointPosition joint_position;
g_UserGenerator.GetSkeletonCap().GetSkeletonJointPosition(user, joint, joint_position);
double x = joint_position.position.X / 1000.0;
double y = joint_position.position.Y / 1000.0;
double z = joint_position.position.Z / 1000.0;



XnSkeletonJointOrientation joint_orientation;
g_UserGenerator.GetSkeletonCap().GetSkeletonJointOrientation(user, joint, joint_orientation);

XnFloat* m = joint_orientation.orientation.elements;
KDL::Rotation rotation(m[0], m[1], m[2],
                       m[3], m[4], m[5],
                       m[6], m[7], m[8]);

The first thing I did was to display x,y, and z value of each joint with the joint name.

However, the values of the x,y, and z were extremely huge even if jointposition.x, .y, and .z were divided by 1000 already.

In the NITE algorithm document, their units should be in 'mm'. but the actual results from the code does not make sense. x, y, and z values were 6 digits or even bigger.

Another question I have is about the jointorientation.

Again, NITE algorithm document says

"Joint orientations are given as a 3x3 rotation (orthonormal) matrix. This represents a rotation between the joint‟s local coordinates and the world coordinates. The first column is the direction of the joint‟s +X axis given as a 3-vector in the world coordinate system. The second column is the +Y axis direction, and the third column is the +Z axis direction."

If there is anybody understand this phrase, would you please rephrase it...? I specifically don't understand "The first column is the direction of the joint‟s +X axis given as a 3-vector in the world coordinate system." part.

This is how i display values

printf("Coordinates(X Y Z): %d %d %d \n",x, y, z);
printf("orientation +X :  %d %d %d \n",m[0],m[3],m[6]);
printf("orientation +Y :  %d %d %d \n",m[1],m[4],m[7]);
printf("orientation +Z :  %d %d %d \n",m[2],m[5],m[8]);

Greatly appreciate your interest and help!! Thank you!

Asked by leedison on 2011-06-28 10:44:26 UTC

Comments

Answers

Hi leedison,

I can't help you much with the main problem.

But for the Nite documentation, I think you could rephrase it like:

Each joint has a three axis frame (X,Y,Z). The first column of the matrix is the direction of the X axis in the world coordinates. Second column for Y axis. Third column for Z axis.

I guess the "+" thing is about the sense.

Hope this helps,

Guido

Asked by Guido on 2011-09-07 22:40:31 UTC

Comments