Why and How to Avoid the Flipped Quaternion Multiplication
Abstract
:1. Introduction
1.1. Original Problem and Shuster’s Solution
1.2. The Problem Today with Shuster’s Solution
1.3. Contribution
- give an overview over the two quaternion multiplications and their consequences for representing ;
- identify the problem with commonly using both;
- promote and explain a neglected alternative solution;
- demonstrate that this alternative yields a more formal similarity to corresponding formulas using matrices;
- advocate to discontinue Shuster’s multiplication;
- provide recipes to detect and migrate between quaternion multiplication conventions.
1.4. Outline
2. Notation
3. Background: Duality of Rotation Representations
4. The Proposed Alternative Solution
5. Literature Review
5.1. Literature on or Introducing Relevant Conventions
5.1.1. Aerospace
5.1.2. Robotics
5.2. Popularity in Influential and Recent Literature
6. Rationale against Shuster’s Multiplication
6.1. Overview
6.1.1. Both Multiplications Are Equally Capable and Interchangeable for Every Application
6.1.2. One of the Two Multiplications Should Be Discontinued
6.1.3. Hamilton’s Multiplication Is Preferable
6.2. Equal Capability Argument
6.3. Why Consistency Is Not Enough
6.4. Formal Differences
6.4.1. QM-Conventions
6.4.2. Formal Comparison Independent of the Usage
6.4.3. Formal Comparison Distinguishing Active and Passive Usage
7. Recipes
7.1. How to Detect Which QM-Convention Is Used
7.1.1. For the Quaternion Multiplication
7.1.2. The Quaternion-to-Matrix and Matrix-to-Quaternion Conversions
7.2. Migrating from one QM-Convention to Another
7.2.1. The Two Migration Procedures
Translate
Interface
7.2.2. Examples
- translates into , which simplifies to . Interfacing it would not change it since it has no inputs and only a logic output.
- interfaces into . When translating it, its implicit dependence on constants must be respected: The right hand side of translates into .
- could be first decomposed in , and . The first translates into (the variable q is an input and no constant). The second interfaces into . Putting these together yields the expected .
- interfaces into . Hence, the matrix part of the QM-convention is indeed migrated. translates into the same, , because must use coordinates with respect to a basis (constants) for its input and , because (compare 2).
- could be first decomposed in , interfacing into , and translating into , where the minus comes from translating constants in . Putting these together yields the expected result: .
7.2.3. Correctness of the Migration Recipes
Interfacing
Translation
8. Conclusions
Author Contributions
Funding
Acknowledgments
Nomenclature
implicitly identified | |
cross product | |
: | |
, gafterf | |
inner product (also called scalar or dot product) | |
4D Euclidean -vector space of quaternions (without quaternion-multiplication) | |
orthonormal standard basis for | |
, unit length quaternions | |
⊙ | Hamilton’s quaternion multiplication, i.e. |
⊗ | Shuster’s flipped quaternion multiplication [1]: |
, imaginary components of q | |
(shorthand) | |
, real component ofq | |
, conjugation | |
References
- Shuster, M.D. Survey of attitude representations. J. Astronaut. Sci. 1993, 41, 439–517. [Google Scholar]
- Shuster, M.D. The nature of the quaternion. J. Astronaut. Sci. 2008, 56, 359–373. [Google Scholar] [CrossRef]
- Sola, J. Quaternion Kinematics for the Error-State KF; Technical Report; LAAS-CNRS: Toulouse, France, 2012. [Google Scholar]
- Sommer, H.; Gilitschenski, I.; Bloesch, M.; Weiss, S.M.; Siegwart, R.; Nieto, J. Why and How to Avoid the Flipped Quaternion Multiplication. arXiv 2018, arXiv:1801.07478. [Google Scholar]
- Crassidis, J.L. Sigma-point Kalman filtering for integrated GPS and inertial navigation. IEEE Trans. Aerosp. Electron. Syst. 2006, 42, 750–756. [Google Scholar] [CrossRef]
- Lefferts, E.J.; Markley, F.L.; Shuster, M.D. Kalman filtering for spacecraft attitude estimation. JGCD 1982, 5, 417–429. [Google Scholar]
- Trawny, N.; Roumeliotis, S.I. Indirect Kalman Filter for 3D Attitude Estimation; Technical Report 2005-002; University of Minnesota, Department of Computer Science and Engineering: Minneapolis, MN, USA, 2005. [Google Scholar]
- Breckenridge, W.G. Quaternions—Proposed Standard Conventions; Technical Report JPL-IOM-343-79-1199; NASA: Washington, DC, USA, 1999.
- Junkins, J.L.; Turner, J.D. Optimal Spacecraft Rotational Maneuvers; Elsevier: New York, NY, USA, 1986; Volume 3. [Google Scholar]
- Yazell, D. Origins of the unusual space shuttle quaternion definition. In Proceedings of the 47th AIAA Aerospace Sciences Meeting including The New Horizons Forum and Aerospace Exposition, Orlando, FL, USA, 5–8 January 2009; American Institute of Aeronautics and Astronautics: Reston, VA, USA, 2009; Volume 66. [Google Scholar]
- Stevens, B.; Lewis, F. Aircraft Control and Simulation; Wiley: Hoboken, NJ, USA, 2003. [Google Scholar]
- Carroll, J. The Notation and Use of Quaternions for Shuttle Ascent Steering; Charles Stark Draper Laboratory Memo: SSV10C-75-47; Charles Stark Draper Laboratory: Cambridge, MA, USA, 1975. [Google Scholar]
- Naif, N. Quaternions White Paper; 2003; Technical Report NAIF; JPL: Pasadena, CA, USA, 2003. [Google Scholar]
- Markley, F.; Crassidis, J. Fundamentals of Spacecraft Attitude Determination and Control; Space Technology Library, Springer: New York, NY, USA, 2014. [Google Scholar]
- Chou, J.C.K. Quaternion kinematic and dynamic differential equations. IEEE TRA 1992, 8, 53–64. [Google Scholar] [CrossRef]
- Kuipers, J. Quaternions and Rotation Sequences: A Primer with Applications to Orbits, Aerospace, and Virtual Reality; Mathematical Sciences Series; Princeton University Press: Princeton, NJ, USA, 1999. [Google Scholar]
- Piniés, P.; Lupton, T.; Sukkarieh, S.; Tardós, J.D. Inertial aiding of inverse depth SLAM using a monocular camera. In Proceedings of the 2007 IEEE ICRA, Rome, Italy, 10–14 April 2007; pp. 2797–2802. [Google Scholar]
- Roussillon, C.; Gonzalez, A.; Solà, J.; Codol, J.-M.; Mansard, N.; Lacroix, S.; Devy, M. RT-SLAM: A Generic and Real-Time Visual SLAM Implementation; Lecture Notes in Computer Science; Springer: Berlin, Germany, 2011; pp. 31–40. [Google Scholar]
- Martinelli, A. Vision and IMU data fusion: Closed-form solutions for attitude, speed, absolute scale, and bias determination. IEEE Trans. Robot. 2012, 28, 44–60. [Google Scholar] [CrossRef]
- Hazewinkel, M. Encyclopedia of Mathematics: Volume 6: Subject Index—Author Index; Springer Science & Business Media: Berlin, Germany, 2013. [Google Scholar]
- Gowers, T.; Barrow-Green, J.; Leader, I. The Princeton Companion to Mathematics; Princeton University Press: Princeton, NJ, USA, 2010. [Google Scholar]
- Lengyel, E. Mathematics for 3D Game Programming and Computer Graphics; Cengage Learning: Boston, MA, USA, 2012. [Google Scholar]
- Rodman, L. Topics in Quaternion Linear Algebra; Princeton University Press: Princeton, NJ, USA, 2014. [Google Scholar]
- Battin, R. An Introduction to the Mathematics and Methods of Astrodynamics; AIAA Education Series; American Institute of Aeronautics and Astronautics: Reston, VA, USA, 1987. [Google Scholar]
- Shivarama, R.; Fahrenthold, E.P. Hamilton’s equations with Euler parameters for rigid body dynamics modeling. JDSMC 2004, 126, 124–130. [Google Scholar] [CrossRef]
- Bacon, B.J. Quaternion-based control architecture for determining controllability/maneuverability limits. In Proceedings of the AIAA Guidance, Navigation, and Control Conference, Minneapolis, MN, USA, 13–16 August 2012. [Google Scholar]
- Crassidis, J.L.; Markley, F.L.; Cheng, Y. Survey of nonlinear attitude estimation methods. JGCD 2007, 30, 12–28. [Google Scholar] [CrossRef]
- Barfoot, T.D.; Forbes, J.R.; Furgale, P.T. Pose Estimation using Linearized Rotations and Quaternion Algebra. Acta Astronaut. 2011, 68, 101–112. [Google Scholar] [CrossRef]
- Ainscough, T.; Zanetti, R.; Christian, J.; Spanos, P.D. Q-method extended Kalman filter. JGCD 2014, 38, 752–760. [Google Scholar] [CrossRef]
- Queen, S.Z. A Kalman Filter for Mass Property and Thrust Identification of the Spin-Stabilized Magnetospheric Multiscale Formation. In Proceedings of the 25th International Symposium on Space Flight Dynamics, Munich, Germany, 19–23 October 2015; NTRS: Chicago, IL, USA, 2015. [Google Scholar]
- Galante, J.M.; Van Eepoel, J.; D’Souza, C.; Patrick, B. Fast Kalman Filtering for Relative Spacecraft Position and Attitude Estimation for the Raven ISS Hosted Payload. In Proceedings of the 39th AAS Guidance and Control Conference, Breckenridge, CO, USA, 5–10 February 2016; NTRS: Chicago, IL, USA, 2016. [Google Scholar]
- McCabe, J.S.; Brown, A.J.; DeMars, K.J.; Carson, J.M., III. Comparison of Factorization-Based Filtering for Landing Navigation. In Proceedings of the AIAA Guidance, Navigation, and Control Conference, Grapevine, TX, 9–13 January 2017; NTRS: Chicago, IL, USA, 2017. [Google Scholar]
- Pervin, E.; Webb, J.A. Quaternions in Computer Vision and Robotics; Technical Report; Carnegie Mellon University: Pittsburgh, PA, USA, 1982. [Google Scholar]
- Murray, R.M.; Li, Z.; Sastry, S.S.; Sastry, S.S. A Mathematical Introduction to Robotic Manipulation; CRC Press: Boca Raton, FL, USA, 1994. [Google Scholar]
- Fresk, E.; Nikolakopoulos, G. Full quaternion based attitude control for a quadrotor. In Proceedings of the 2013 ECC, Zurich, Switzerland, 17–19 July 2013; pp. 17–19. [Google Scholar]
- Diebel, J. Representing attitude: Euler angles, unit quaternions, and rotation vectors. Matrix 2006, 58, 1–35. [Google Scholar]
- Li, M.; Mourikis, A.I. Improving the accuracy of EKF-based visual-inertial odometry. In Proceedings of the ICRA 2012, Saint Paul, MN, USA, 14–18 May 2012; pp. 828–835. [Google Scholar]
- Li, M.; Yu, H.; Zheng, X.; Mourikis, A.I. High-fidelity sensor modeling and self-calibration in vision-aided inertial navigation. In Proceedings of the 2014 IEEE International Conference on Robotics and Automation (ICRA), Hong Kong, China, 29 September 2014; pp. 409–416. [Google Scholar]
- Schwab, A.L. Quaternions, Finite Rotation and Euler Parameters; Technical Report; Delft University of Technology: Delft, The Netherlands, 2002. [Google Scholar]
- Schwab, A.L.; Meijaard, J. How to draw Euler angles and utilize Euler parameters. In Proceedings of the IDETC/CIE 2006 ASME 2006 International Design Engineering Technical Conferences & Computers and Information in Engineering Conference, Philadelphi, PA, USA, 10–13 September 2006; pp. 10–13. [Google Scholar]
- Holm, D. Geometric Mechanics: Part II: Rotating, Translating and Rolling; Imperial College Press: London, UK, 2008. [Google Scholar]
- Heard, W. Rigid Body Mechanics: Mathematics, Physics and Applications; Physics Textbook; Wiley: Hoboken, NJ, USA, 2008. [Google Scholar]
- Flügge, S. Principles of Classical Mechanics and Field Theory/Prinzipien der Klassischen Mechanik und Feldtheorie; Encyclopedia of Physics; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
- Mason, M.T. Mechanics of Robotic Manipulation; MIT Press: Cambridge, MA, USA, 2016. [Google Scholar]
- Bonnable, S.; Martin, P.; Salaün, E. Invariant Extended Kalman Filter: Theory and application to a velocity-aided attitude estimation problem. In Proceedings of the 48h IEEE Conference on Decision and Control (CDC) Held Jointly with 2009 28th Chinese Control Conference, Shanghai, China, 15–18 December 2009; pp. 1297–1304. [Google Scholar]
- Gui, H.; Vukovich, G. Finite-time angular velocity observers for rigid-body attitude tracking with bounded inputs. Int. J. Robust Nonlinear Control 2016. [Google Scholar] [CrossRef]
- Mukundan, R. Quaternions: From classical mechanics to computer graphics, and beyond. In Proceedings of the 7th Asian Technology Conference in Mathematics, Melaka, Malaysia, 17–21 December 2002; pp. 97–105. [Google Scholar]
- Shoemake, K. Quaternion calculus and fast animation, computer animation: 3-D motion specification and control. In Proceedings of the SIGGRAPH’87, Anaheim, CA, USA, 27–31 July 1987. [Google Scholar]
- Hanson, A.J. Visualizing quaternions. In Proceedings of the ACM SIGGRAPH 2005 Courses, Los Angeles, CA, USA, 31 July–4 August 2005; p. 1. [Google Scholar]
- Vince, J. Quaternions for Computer Graphics; Springer: London, UK, 2011. [Google Scholar]
- Kolaman, A.; Yadid-Pecht, O. Quaternion Structural Similarity: A New Quality Index for Color Images. IEEE Trans. Image Process. 2012, 21, 1526–1536. [Google Scholar] [CrossRef] [PubMed]
Type/Community | Hamilton | Shuster |
---|---|---|
Online encyclopedia | Encyclopedia of Math., Wolfram Mathworld, Planetmath, Britannica, Wikipedia | |
Mathematics | [16] (B!), [20] (Ba), [21] (Ba), [22] (Baw), [23] (B-) | |
Aerospace | [9,12] (B), [24] (Bw), [16] (B!), [11] (B!), [25] (w), [26] (!) | [1,5,6,14,27,28,29,30,31,32] |
Robotics | [33] (a), [15] (aw), [34] (Bw), [18] (w), [19] (w), [3] (w), [35] (w) | [7,28,36,37,38] |
Mechanics | [39] (w), [40] (w), [41] (Baw), [42] (Ba), [43] (Ba) [44] (Ba) | |
Control | [25] (w), [45] (!), [35] (w), [46] (!) | |
Computer vision | [33] (a), [47] (aw), [18] (w) | |
Computer graphics/visualization | [48] (!), [47] (aw), [49] (aw), [50] (B!), [22] (Baw), [51] (-) | |
Applications and software libraries | Wolfram Mathematica, Matlab’s aerospace (!) and robotics toolbox, C++ library Eigen, Google Ceres, Boost, GNU Octave, ROS, NASA’s SPICE (qxq_c, m2q_c) | Microsoft’s DirectXMath Library |
Expression | Equal Expression Given QM-Convention | |
---|---|---|
Hamilton, | Shuster, | |
Rot. rep. | Active | Passive | Composition |
---|---|---|---|
1) | · | ||
Homomorphic rotation quaternion options: | |||
2) | ⊙ | ||
3) | ⊙(act), ⊗(pass) | ||
4) | ⊗ |
© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sommer, H.; Gilitschenski, I.; Bloesch, M.; Weiss, S.; Siegwart, R.; Nieto, J. Why and How to Avoid the Flipped Quaternion Multiplication. Aerospace 2018, 5, 72. https://doi.org/10.3390/aerospace5030072
Sommer H, Gilitschenski I, Bloesch M, Weiss S, Siegwart R, Nieto J. Why and How to Avoid the Flipped Quaternion Multiplication. Aerospace. 2018; 5(3):72. https://doi.org/10.3390/aerospace5030072
Chicago/Turabian StyleSommer, Hannes, Igor Gilitschenski, Michael Bloesch, Stephan Weiss, Roland Siegwart, and Juan Nieto. 2018. "Why and How to Avoid the Flipped Quaternion Multiplication" Aerospace 5, no. 3: 72. https://doi.org/10.3390/aerospace5030072
APA StyleSommer, H., Gilitschenski, I., Bloesch, M., Weiss, S., Siegwart, R., & Nieto, J. (2018). Why and How to Avoid the Flipped Quaternion Multiplication. Aerospace, 5(3), 72. https://doi.org/10.3390/aerospace5030072