Re: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle? |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: "eigen@xxxxxxxxxxxxxxxxxxx" <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: Re: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?*From*: "Dluhosch, Michael" <michael.dluhosch@xxxxxxxxxx>*Date*: Thu, 16 Aug 2018 07:54:22 +0000*Accept-language*: en-US*Thread-index*: AQHULltCSIGa5cOXIEGKjqg2RSTbI6S1YUGAgAG7qOyABwUTAIAAhBAAgANXX2Q=*Thread-topic*: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?

Thanks for the detailed explanation. Like mentioned before I can see your point but nevertheless the absolute value still in some applications removes valuable information. Have a look at http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/ There is a picture where you see that by taking the absolute value you removing one quadrant. From a mathematical point of view with the absolute value I cannot determine anymore the direction of rotation.
With the absolute value an angle of 190° would result in a return value 10° which makes sense because the two quaternions are 10° apart but I don't know in which direction. In my case in a realtime simulation moving a camera I want to always go the shortest way and therefore need that Information. By now I know I can get the direction information from the sign of q.w() but for me it makes more sense to retrieve that information by using the atan2 formula without the abs and ensuring the result is [-pi,pi).
Like I said in my second mail the angularDistance() method should not be changed but for some application it would be nice to have something like: double angularDirection() { return std::copysign( angularDistance(), q.w() ); }
Regards, Michael
From: Gabriel Nützi <gnuetzi@xxxxxxxxx>Sent: Tuesday, August 14, 2018 7:46 AMTo: eigen@xxxxxxxxxxxxxxxxxxxSubject: Re: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?
@gael: Very good explanation Chapter 3 https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/117165/eth-49175-02.pdf?sequence=2&isAllowed=y BR Gabriel Am 13.08.2018 um 23:53 schrieb Gael Guennebaud:
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. |

**References**:**[eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?***From:*Dluhosch, Michael

**Re: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?***From:*Gael Guennebaud

**Re: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?***From:*Dluhosch, Michael

**Re: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?***From:*Gael Guennebaud

**Re: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?***From:*Gabriel Nützi

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: Eigen 3.3 vs 3.2 Performance (was RE: [eigen] 3.3-beta2 released!)** - Next by Date:
**[eigen] alignment issues, conversion between aligned / unaligned data, unaligned Eigen::Rotation2D** - Previous by thread:
**Re: [eigen] Why does Eigen::Quaterniond::angularDistance() method return the absolute angle?** - Next by thread:
**Re: [eigen] Adding support for AMD GPUs in Eigen**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |