1
$\begingroup$

I want to compare the rotation of two cameras with respect to a common frame. Let's call these R_World_Cam0 and R_World_Cam1. When comparing these two rotations, one common approach is to compute the Euler angles (for example XYZ) and compare the components. This comparison is nice because it tells us which part of the rotation changes more (roll, pitch, or yaw).

I wonder if it is possible to do something similar with the tangent space vectors of the rotations. More specifically, we can compute V_World_cam0 = Log(R_World_Cam0) and V_World_cam1 = Log(R_World_Cam1). But I understand that we cannot compare these directly as we would do with Euler angles, because we are talking about components of a vector which represents the rotations with the angle-axis representation (potentially not normalized).

Is my understanding that the tangent vectors should not be used for comparison? I have done some synthetic experiments trying to compare the Euler angles and the tangent space vectors, and they are different, but their numerical values are very close, which is something I wasn't expecting. For example (I omit code for brevity), I create a rotation using the Euler angles XYZ convention and I apply Log operator to the created matrix:

Input: XYZ Euler angles: [ 45.00000936 -0.         30.00000624]
Output:  tangent vector: [43.94588114  11.77526336 28.42800051]

Is this just a coincidence?

Thank you in advance!

$\endgroup$

1 Answer 1

1
$\begingroup$

But I understand that we cannot compare these directly as we would do with Euler angles, because

-> Because of singularity around PI.

Instead of directly comparing the value in R3, you can do it like this.

V_cam1_cam0 = Log(inv(R_World_Cam1)*R_World_Cam0)

Now with V_cam1_cam0, cam1 is the reference coordinate and V_cam1_cam0 encodes the rotation axis of cam0 with respect to your cam 1. You can visualize the difference in rpy form if you want.

Is this just a coincidence?

-> Yes. Some might look similar according to your rotation configuration.

$\endgroup$
2
  • $\begingroup$ Thank you for the answer! If I visualize the rotation encoded by V_cam1_cam0 in rpy, should I expect that it gives the same result as doing RPY(R_World_Cam1) - RPY(R_World_Cam0) (difference of Euler angles of both absolute rotations)? $\endgroup$
    – Javi
    May 18, 2021 at 6:06
  • $\begingroup$ Not the same but it shoudl give a similar result if you convert V_cam1_cam0 to rpy. Or you can just directly convert inv(R_World_Cam1)*R_World_Cam0 into rpy. $\endgroup$ May 19, 2021 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.