Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Method for finding Orientation Error using Axis-Angle

Hi,

I have a reference value for Roll, pitch and yaw (Euler Angles) and my estimate for the same. I want to find the error between the two. If I convert each of the RPY values to a Rotation matrix, I see some possible ways (see below) of finding the orientation error.

I recently came across this openCV function in the calib3d module: get_rotation_error that uses Rodrigues/Axis-Angle (I think they mean the same) for finding the error between 2 rotation matrices.

I have 2 questions -

1) In the method given in get_rotation_error, it seems to "subtract" the two rotation matrices by transposing one (not sure what the negative sign is about)

error_mat = R_ref * R.transpose() * -1
error = cv::norm( cv::Rodrigues ( error_mat ))

How are we supposed to interpret the output ( I believe the output of the cv::norm( rodrigues_vector) is the angle of the rodrigues vector according to openCV convention. Does this mean I simply need to convert it to degrees to find the angle error (between reference and my estimates) in degrees ?

2) I thought of another method, slightly different from the above , what if I do the following -

my_angle = cv::norm (cv::Rodrigues ( R ))

reference_angle = cv::norm (cv::Rodrigues ( R_ref ))

error = reference_angle - my_angle

Method for finding Orientation Error using Axis-Angle

Hi,

I have a reference value for Roll, pitch and yaw (Euler Angles) and my estimate for the same. I want to find the error between the two. If I convert each of the RPY values to a Rotation matrix, I see some possible ways (see below) of finding the orientation error.

I recently came across this openCV function in the calib3d module: get_rotation_error that uses Rodrigues/Axis-Angle (I think they mean the same) for finding the error between 2 rotation matrices.

I have 2 questions -

1) In the method given in get_rotation_error, it seems to "subtract" the two rotation matrices by transposing one (not sure what the negative sign is about)

error_mat = R_ref * R.transpose() * -1
error = cv::norm( cv::Rodrigues ( error_mat ))

How are we supposed to interpret the output ( I believe the output of the cv::norm( rodrigues_vector) is the angle of the rodrigues vector according to openCV convention. Does this mean I simply need to convert it to degrees to find the angle error (between reference and my estimates) in degrees ?

2) I thought of another method, slightly different from the above , what if I do the following -

my_angle = cv::norm (cv::Rodrigues ( R ))

reference_angle = cv::norm (cv::Rodrigues ( R_ref ))

error = reference_angle - my_angle

Is there something wrong with method 2) ? I have tried it and it gives a different output compared to method 1).

Method for finding Orientation Error using Axis-Angle

Hi,

I have a reference value for Roll, pitch and yaw (Euler Angles) and my estimate for the same. I want to find the error between the two. If I convert each of the RPY values to a Rotation matrix, I see some possible ways (see below) of finding the orientation error.

I recently came across this openCV function in the calib3d module: get_rotation_error that uses Rodrigues/Axis-Angle (I think they mean the same) for finding the error between 2 rotation matrices.

I have 2 questions questions -

1) In the method given in get_rotation_error, it seems to "subtract" the two rotation matrices by transposing one (not sure what the negative sign is about)

error_mat = R_ref * R.transpose() * -1
error = cv::norm( cv::Rodrigues ( error_mat ))

How are we supposed to interpret the output ( I believe the output of the cv::norm( rodrigues_vector) is the angle of the rodrigues vector according to openCV convention. Does this mean I simply need to convert it to degrees to find the angle error (between reference and my estimates) in degrees ?

======

2) I thought of another method, slightly different from the above , what if I do the following -

my_angle = cv::norm (cv::Rodrigues ( R ))

reference_angle = cv::norm (cv::Rodrigues ( R_ref ))

error = reference_angle - my_angle

Is there something wrong with method 2) ? I have tried it and it gives a different output compared to method 1).

Method for finding Orientation Error using Axis-Angle

Hi,

I have a reference value for Roll, pitch and yaw (Euler Angles) and my estimate for the same. I want to find the error between the two. If I convert each of the RPY values to a Rotation matrix, I see some possible ways (see below) of finding the orientation error.

I recently came across this openCV function in the calib3d module: get_rotation_error that uses Rodrigues/Axis-Angle (I think they mean the same) for finding the error between 2 rotation matrices.

I have 2 questions -

1) In the method given in get_rotation_error, it seems to "subtract" the two rotation matrices by transposing one (not sure what the negative sign is about)

error_mat = R_ref * R.transpose() * -1
error = cv::norm( cv::Rodrigues ( error_mat ))

How are we supposed to interpret the output ( I believe the output of the cv::norm( rodrigues_vector) is the angle of the rodrigues vector according to openCV convention. Does this mean I simply need to convert it to degrees to find the angle error (between reference and my estimates) in degrees ?

I would also like to mention that this method keeps returning 3.14159 even for wildly different values of the reference and my estimates.

======

2) I thought of another method, slightly different from the above , what if I do the following -

my_angle = cv::norm (cv::Rodrigues ( R ))

reference_angle = cv::norm (cv::Rodrigues ( R_ref ))

error = reference_angle - my_angle

Is there something wrong with method 2) ? I have tried it and it gives a different output compared to method 1).

Method for finding Orientation Error using Axis-Angle

Hi,

I have a reference value for Roll, pitch and yaw (Euler Angles) and my estimate for the same. I want to find the error between the two. If I convert each of the RPY values to a Rotation matrix, I see some possible ways (see below) of finding the orientation error.

I recently came across this openCV function in the calib3d module: get_rotation_error that uses Rodrigues/Axis-Angle (I think they mean the same) for finding the error between 2 rotation matrices.

I have 2 questions -

1) In the method given in get_rotation_error, it seems to "subtract" the two rotation matrices by transposing one (not sure what the negative sign is about)

error_mat = R_ref * R.transpose() * -1
error = cv::norm( cv::Rodrigues ( error_mat ))

How are we supposed to interpret the output ( I believe the output of the cv::norm( rodrigues_vector) is the angle of the rodrigues vector according to openCV convention. Does this mean I simply need to convert it to degrees to find the angle error (between reference and my estimates) in degrees ?

I would also like to mention that this method keeps returning 3.14159 even for wildly different values of the reference and my estimates.estimates. Is there something that I''m missing ?

======

2) I thought of another method, slightly different from the above , what if I do the following -

my_angle = cv::norm (cv::Rodrigues ( R ))

reference_angle = cv::norm (cv::Rodrigues ( R_ref ))

error = reference_angle - my_angle

Is there something wrong with method 2) ? I have tried it and it gives a different output compared to method 1).

Method for finding Orientation Error using Axis-Angle

Hi,

I have a reference value for Roll, pitch and yaw (Euler Angles) and my estimate for the same. I want to find the error between the two. If I convert each of the RPY values to a Rotation matrix, I see some possible ways (see below) of finding the orientation error.

I recently came across this openCV function in the calib3d module: get_rotation_error that uses Rodrigues/Axis-Angle (I think they mean the same) for finding the error between 2 rotation matrices.

I have 2 questions -

1) In the method given in get_rotation_error, it seems to "subtract" the two rotation matrices by transposing one (not sure what the negative sign is about)

error_mat = R_ref * R.transpose() * -1
error = cv::norm( cv::Rodrigues ( error_mat ))

How are we supposed to interpret the output ( I believe the output of the cv::norm( rodrigues_vector) is the angle of the rodrigues vector according to openCV convention. Does this mean I simply need to convert it to degrees to find the angle error (between reference and my estimates) in degrees ?

I would also like to mention that this method keeps returning 3.14159 even for wildly different values of the reference and my estimates. Is there something that I''m missing ?

======

2) I thought of another method, slightly different from the above , what if I do the following -

my_angle = cv::norm (cv::Rodrigues ( R ))

reference_angle = cv::norm (cv::Rodrigues ( R_ref ))

error = reference_angle - my_angle

Is there something wrong with method 2) ? I have tried it and it gives a different output compared to method 1).

I would be very grateful if someone can answer the above queries or even point me in the right direction.

Thanks!