Different RB orientation in TT and SampleClient3d

NatNet, VRPN, TrackD, and Plugins
Post Reply
neill_solow
Posts: 41
Joined: Tue Nov 04, 2008 10:32 am

Different RB orientation in TT and SampleClient3d

Post by neill_solow » Mon Feb 21, 2011 1:57 pm

Hi,

I have worked with NatNet and tryed to operate with Trackable 6DOF values. From NatNet I have received position in mm and rotation in quaternion. I convert quat to euler by means of GetEulers function from SampleClient3d. But... my values of a euler angle is differ a little from the TT one.

After some tests I have found that order of rotation axes in SampleClient3d are not the same that in TT.

Could some one help, how to work with NatNet quaternion values to receive rotation like in TT ?

I have uploaded photos into the google picasa album - https://picasaweb.google.com/Neill.Solo ... directlink

First two pictures - initial state of Trackable in TT and SampleClient3d. I have added displaying a local axes for Trackable cube in the sample.
Next two pictures - another position of Trackable in TT and SampleClient3d. And here you can see a difference between TT axes order and sample one and you can see a little difference in euler values. I don't understand why that's happent.

P.S. TT 2.3.1 Final, NatNet 2.2

neill_solow
Posts: 41
Joined: Tue Nov 04, 2008 10:32 am

Re: Different RB orientation in TT and SampleClient3d

Post by neill_solow » Thu Mar 03, 2011 3:53 am

I have a little step into a problem, I guess difference appears from Euler angles singularation, but in conversion code there are some lines for that

double test = qx*qy + qz*qw;
if (test > 0.499) // singularity at north pole
{
heading = 2.0 * atan2(qx,qw);
attitude = PI/2.0;
bank = 0.0;
}
else if (test < -0.499) // singularity at south pole
{
heading = -2.0 * atan2(qx,qw);
attitude = - PI/2.0;
bank = 0.0;
}

and it doesn't help. What it can be, wrong axis order, has someone problem like that ?

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Different RB orientation in TT and SampleClient3d

Post by NaturalPoint - Mike » Thu Mar 03, 2011 3:22 pm

Hey Sergey -

Just to let you know we're working on this, as soon as we have an answer we'll get back to you.

neill_solow
Posts: 41
Joined: Tue Nov 04, 2008 10:32 am

Re: Different RB orientation in TT and SampleClient3d

Post by neill_solow » Fri Mar 04, 2011 2:17 am

Hi Mike, I have solved a problem.

I have rewritten my client to use NPTrackingTools SDK instead of NatNet. There are euler and quaternion angles both output from the trackable. Euler angles doesn't help me, as I understand because of bad singularity. After that I have tryed Eul_FromQuat function from Samples3d code and manually find a right output euler angles order.

The angles order is connected to the Trackable initial orientation. So to make a trackable move like in TT, I made almost a hardwork.

P.S. As I wrote above, there is some little difference between result euler angles in TT and result euler angles from quaternion convertion.

Post Reply