matthew-brett / transforms3d

3 dimensional spatial transformations
http://matthew-brett.github.io/transforms3d/
Other
467 stars 83 forks source link

Is that a bug about mat2axangle? #38

Closed MengHao666 closed 3 years ago

MengHao666 commented 3 years ago

Hi, I used the function "mat2axangle", but got such error "raise ValueError("no unit eigenvector corresponding to eigenvalue 1") ValueError: no unit eigenvector corresponding to eigenvalue 1".

The rotation matrix i used is R= [[ 0.0041258 0.20650078 0.97843774] [-0.99671762 -0.07826032 0.02071984] [-0.08085151 0.97531162 -0.20550008]] And I have tested it is an orthogonal matrix and one of its eigenvalue is -1. It seems a bug that overlook the eigenvalue of an orthogonal matrix is 1 or -1, that is to say ,not always 1.

Anyway, just my 5 cents.What do u make of this? Do I miss anything?

matthew-brett commented 3 years ago

From memory, the negative eigenvalue identifies a reflection, that therefore cannot be represented a rotation. Is that true here?

On Thu, 7 Jan 2021, 08:38 Hao Meng, notifications@github.com wrote:

Hi, I used the function "mat2axangle", but got such error "raise ValueError("no unit eigenvector corresponding to eigenvalue 1") ValueError: no unit eigenvector corresponding to eigenvalue 1".

The rotation matrix i used is R= [[ 0.0041258 0.20650078 0.97843774] [-0.99671762 -0.07826032 0.02071984] [-0.08085151 0.97531162 -0.20550008]] And I have tested it is an orthogonal matrix and one of its eigenvalue is -1. It seems a bug that overlook the eigenvalue of an orthogonal matrix is 1 or -1, that is to say ,not always 1.

Anyway, just my 5 cents.What do u make of this? Do I miss anything?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matthew-brett/transforms3d/issues/38, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQQHFH5C4USPXYSI6IMXTSYVXIDANCNFSM4VYU6L2Q .

MengHao666 commented 3 years ago

From memory, the negative eigenvalue identifies a reflection, that therefore cannot be represented a rotation. Is that true here? On Thu, 7 Jan 2021, 08:38 Hao Meng, @.***> wrote: Hi, I used the function "mat2axangle", but got such error "raise ValueError("no unit eigenvector corresponding to eigenvalue 1") ValueError: no unit eigenvector corresponding to eigenvalue 1". The rotation matrix i used is R= [[ 0.0041258 0.20650078 0.97843774] [-0.99671762 -0.07826032 0.02071984] [-0.08085151 0.97531162 -0.20550008]] And I have tested it is an orthogonal matrix and one of its eigenvalue is -1. It seems a bug that overlook the eigenvalue of an orthogonal matrix is 1 or -1, that is to say ,not always 1. Anyway, just my 5 cents.What do u make of this? Do I miss anything? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#38>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQQHFH5C4USPXYSI6IMXTSYVXIDANCNFSM4VYU6L2Q .

You are true! Thanks!