This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1713 - Comparison between two quaternions modulo 2*pi
Summary: Comparison between two quaternions modulo 2*pi
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Geometry (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Wrong Result
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-14 00:56 UTC by Vincent Samy
Modified: 2019-12-04 18:38 UTC (History)
4 users (show)



Attachments

Description Vincent Samy 2019-05-14 00:56:12 UTC
Hello,

So i bumped into a problem with quaternion function `isApprox` that tells whether or not two quaternions are the same. Though, quaternions can represent the same rotation and have different values. Here is the code.

Eigen::Quaterniond q1 = Eigen::Quaterniond::UnitRandom();
Eigen::Quaterniond q2(-q1.w(), -q1.x(), -q1.y(), -q1.z());
q1.isApprox(q2); // return false
q1.angularDistance(q2); // return 0

q1 and q2 represent the same rotation (modulo 2*pi), maybe the function should return true?

Best,

Vincent S.
Comment 1 Nobody 2019-12-04 18:38:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1713.

Note You need to log in before you can comment on or make changes to this bug.