VRPN angular data
Posted: Fri Oct 22, 2010 1:53 pm
I've been using VRPN with tracking tools to get positional data (x,y,z) for a while now and everything is going well. I recently started to used the angular data (y,p,r) and have been running into some problems. I'm reciving the data and converting the quaterion data into Euler angles via the following code.
vrpn_TRACKERCB t is passed to my callback.
RAD2DEG = (180/3.141592653589793)
double x = t.pos[0];
double y = t.pos[1];
double z = t.pos[2];
q_vec_type yawPitchRoll;
q_to_euler(yawPitchRoll, t.quat);
double y = yawPitchRoll[0] * RAD2DEG;
double p = yawPitchRoll[1] * RAD2DEG;
double r = yawPitchRoll[2] * RAD2DEG;
The received x,y,z match the values being reported by Tracking Tools exactly. The angular values don't match however. Any suggestions as to what I'm doing wrong?
vrpn_TRACKERCB t is passed to my callback.
RAD2DEG = (180/3.141592653589793)
double x = t.pos[0];
double y = t.pos[1];
double z = t.pos[2];
q_vec_type yawPitchRoll;
q_to_euler(yawPitchRoll, t.quat);
double y = yawPitchRoll[0] * RAD2DEG;
double p = yawPitchRoll[1] * RAD2DEG;
double r = yawPitchRoll[2] * RAD2DEG;
The received x,y,z match the values being reported by Tracking Tools exactly. The angular values don't match however. Any suggestions as to what I'm doing wrong?