Page 1 of 1

Depacket Client Info

Posted: Tue Jul 31, 2018 6:41 am
by kimtae55
I am currently working on using the Depacketization for android and Unity, so that I can multicast without NatNetML. As I am reading the PacketClient.cpp, I notice the rigid body information is unpacked in terms of quaternion.
However, I need information in terms of euler angles, with XYZ rotation order. Is there a way to specify it in code or in Motive?

Re: Depacket Client Info

Posted: Tue Jul 31, 2018 9:44 am
by steven.andrews
Hello kimtae55,

NatNet streams rotational data in quaternions. If you wish to use the rotational data in the Euler convention (pitch-yaw-roll), the quaternion data will need to be converted into Euler angles.

In the provided NatNet SDK samples, the SampleClient3D application converts quaternion rotations into Euler rotations to display in the application interface. The sample algorithms for the conversion are scripted in the NATUtils.cpp file. You can refer to the NATUtils.cpp file and the SampleClient3D.cpp file to figure out how to convert quaternions into the Euler convention.

I hope this helps,
Steven
--
Steven Andrews
OptiTrack | Senior Customer Support Engineer
help.naturalpoint.com
support@optitrack.com