Hi all,
I'm using Optitrack Pro 4 and I haven't been successful to get the correct head orientation and position from (X,Y,Z) and Yaw-Pitch-Roll information. Has anybody been successful with that?
Thank you,
Dat
How to get the head orientation form Yaw-Pitch-Roll
Re: How to get the head orientation form Yaw-Pitch-Roll
Are you refering to the OptiTrack, or TrackIR line of products?
Re: How to get the head orientation form Yaw-Pitch-Roll
Dear Vincent,
I'm using the TracIR 4.
Thank for your help.
I'm using the TracIR 4.
Thank for your help.
Re: How to get the head orientation form Yaw-Pitch-Roll
You have gone thru the manual, section 4.1.3, 4.1.4, and 4.1.5?
http://www.naturalpoint.com/optitrack/s ... .1.032.doc
http://www.naturalpoint.com/optitrack/s ... .1.032.doc
Re: How to get the head orientation form Yaw-Pitch-Roll
Hi Vincent,
Section 4.1.3 talks about INPVector, from that I can have (X,Y,Z) and (Yaw, Pitch, Roll). Section 4.1.4 and 4.1.5 talk about INPVector2 and INPVector3. But what I need is not how to get these info. What I really need is how to create the rotation matrix from (Yaw, Pitch, Roll). I have tried the order Rz -> Ry -> Rx but it's not quite good. So I wonder how you guys come up with the rotation matrix because in the application coming with the driver, you can rotate the head very smoothly.
Thanks,
Dat
Section 4.1.3 talks about INPVector, from that I can have (X,Y,Z) and (Yaw, Pitch, Roll). Section 4.1.4 and 4.1.5 talk about INPVector2 and INPVector3. But what I need is not how to get these info. What I really need is how to create the rotation matrix from (Yaw, Pitch, Roll). I have tried the order Rz -> Ry -> Rx but it's not quite good. So I wonder how you guys come up with the rotation matrix because in the application coming with the driver, you can rotate the head very smoothly.
Thanks,
Dat
Re: How to get the head orientation form Yaw-Pitch-Roll
random guess follows:
rotation order issues?
rotation order issues?
-
- Posts: 2
- Joined: Mon Mar 24, 2008 4:09 am
- Location: Italy
Re: How to get the head orientation form Yaw-Pitch-Roll
To solve your problem I suggest you the following:
- Use the quaternions qx, qy qz, qw to compute the transform matrix
A=2*[qw^2+qx^2-0.5 qx*qy-qw*qz qx*qz+qw*qy;
qx*qy+qw*qz qw^2+qy^2-0.5 qy*qz-qw*qx;
qx*qz-qw*qy qy*qz+qw*qx qw^2+qz^2-0.5
];
The quaternion values are reported in the csv file generated by the RigidBody module.
From such a matrix you can compute the set of Euler angles you want.
There are six set of Euler angles. They depend on the rotation sequence you choose (XYZ, ZYX...)
I hope this helps.
- Use the quaternions qx, qy qz, qw to compute the transform matrix
A=2*[qw^2+qx^2-0.5 qx*qy-qw*qz qx*qz+qw*qy;
qx*qy+qw*qz qw^2+qy^2-0.5 qy*qz-qw*qx;
qx*qz-qw*qy qy*qz+qw*qx qw^2+qz^2-0.5
];
The quaternion values are reported in the csv file generated by the RigidBody module.
From such a matrix you can compute the set of Euler angles you want.
There are six set of Euler angles. They depend on the rotation sequence you choose (XYZ, ZYX...)
I hope this helps.