Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Inverting x and z instead of y did the trick. So now I am using:

float theta = (float)(Math.Sqrt(m.x*m.x + m.y*m.y + m.z*m.z)*180/Math.PI);
Vector3 axis = new Vector3 (-m.x, m.y, -m.z);
Quaternion rot = Quaternion.AngleAxis (theta, axis);

m.x, m.y and m.z are the values of the rvec returned by Arucos estimatePoseSingleMarkers.

Now everything rotates fine!