Why and How to Avoid the Flipped Quaternion Multiplication

Over the last decades quaternions have become a crucial and very successful tool for attitude representation in robotics and aerospace. However, there is a major problem that is continuously causing trouble in practice when it comes to exchanging formulas or implementations: there are two quaternion multiplications in common use, Hamilton's original multiplication and its flipped version, which is often associated with NASA's Jet Propulsion Laboratory. We believe that this particular issue is completely avoidable and only exists today due to a lack of understanding. This paper explains the underlying problem for the popular passive world to body usage of rotation quaternions, and derives an alternative solution compatible with Hamilton's multiplication. Furthermore, it argues for entirely discontinuing the flipped multiplication. Additionally, it provides recipes for efficiently detecting relevant conventions and migrating formulas or algorithms between them.

[1]  Frank L. Lewis,et al.  Aircraft Control and Simulation , 1992 .

[2]  M. Hazewinkel Encyclopaedia of mathematics , 1987 .

[3]  John Vince,et al.  Quaternions for Computer Graphics , 2011 .

[4]  Emil Fresk,et al.  Full quaternion based attitude control for a quadrotor , 2013, 2013 European Control Conference (ECC).

[5]  Leiba Rodman,et al.  Topics in Quaternion Linear Algebra , 2014 .

[6]  A. Schwab,et al.  HOW TO DRAW EULER ANGLES AND UTILIZE EULER PARAMETERS , 2006 .

[7]  S. Flügge Principles of Classical Mechanics and Field Theory / Prinzipien der Klassischen Mechanik und Feldtheorie , 1960 .

[8]  Darryl D. Holm Book Review: Geometric Mechanics, Part II: Rotating, Translating and Rolling , 2008 .

[9]  Eric Lengyel,et al.  Mathematics for 3D Game Programming and Computer Graphics, Second Edition , 2001 .

[10]  F. Markley Attitude Error Representations for Kalman Filtering , 2003 .

[11]  J. S. Ortega Quaternion kinematics for the error-state KF , 2016 .

[12]  John Van Eepoel,et al.  Fast Kalman Filtering for Relative Spacecraft Position and Attitude Estimation for the Raven ISS Hosted Payload , 2016 .

[13]  George Vukovich,et al.  Finite‐time angular velocity observers for rigid‐body attitude tracking with bounded inputs , 2017 .

[14]  J.C.K. Chou,et al.  Quaternion kinematic and dynamic differential equations , 1992, IEEE Trans. Robotics Autom..

[15]  R. Mukundan Quaternions : From Classical Mechanics to Computer Graphics , and Beyond , 2002 .

[16]  M. Shuster A survey of attitude representation , 1993 .

[17]  Jack B. Kuipers,et al.  Quaternions and Rotation Sequences: A Primer with Applications to Orbits, Aerospace and Virtual Reality , 2002 .

[18]  E. J. Lefferts,et al.  Kalman Filtering for Spacecraft Attitude Estimation , 1982 .

[19]  Richard M. Murray,et al.  A Mathematical Introduction to Robotic Manipulation , 1994 .

[20]  Orly Yadid-Pecht,et al.  Quaternion Structural Similarity: A New Quality Index for Color Images , 2012, IEEE Transactions on Image Processing.

[21]  N. Trawny,et al.  Indirect Kalman Filter for 3 D Attitude Estimation , 2005 .

[22]  William B. Heard Rigid Body Mechanics , 2005 .

[23]  Jon A. Webb,et al.  Quaternions in Computer Vision and Robotics , 1982 .

[24]  Salah Sukkarieh,et al.  Inertial Aiding of Inverse Depth SLAM using a Monocular Camera , 2007, Proceedings 2007 IEEE International Conference on Robotics and Automation.

[25]  Nicolas Mansard,et al.  RT-SLAM: A Generic and Real-Time Visual SLAM Implementation , 2011, ICVS.

[26]  William B. Heard,et al.  Rigid Body Mechanics: Mathematics, Physics and Applications , 2005 .

[27]  Pol D. Spanos,et al.  Q-Method Extended Kalman Filter , 2015 .

[28]  P. Furgale,et al.  Pose estimation using linearized rotations and quaternion algebra , 2011 .

[29]  James Diebel,et al.  Representing Attitude : Euler Angles , Unit Quaternions , and Rotation Vectors , 2006 .

[30]  John L. Crassidis,et al.  Survey of nonlinear attitude estimation methods , 2007 .

[31]  Mingyang Li,et al.  Improving the accuracy of EKF-based visual-inertial odometry , 2012, 2012 IEEE International Conference on Robotics and Automation.

[32]  Andrew J. Hanson,et al.  Visualizing quaternions , 2005, SIGGRAPH Courses.

[33]  Steven Z. Queen A Kalman Filter for Mass Property and Thrust Identification of the Spin-Stabilized Magnetospheric Multiscale Formation , 2015 .

[34]  P. Hughes Spacecraft Attitude Dynamics , 1986 .

[35]  R. Battin An introduction to the mathematics and methods of astrodynamics , 1987 .

[36]  James S. McCabe,et al.  Comparison of Factorization-Based Filtering for Landing Navigation , 2017 .

[37]  James R. Wertz,et al.  Spacecraft attitude determination and control , 1978 .

[38]  Philippe Martin,et al.  Invariant Extended Kalman Filter: theory and application to a velocity-aided attitude estimation problem , 2009, Proceedings of the 48h IEEE Conference on Decision and Control (CDC) held jointly with 2009 28th Chinese Control Conference.

[39]  Malcolm D. Shuster,et al.  The nature of the quaternion , 2008 .

[40]  F. Markley,et al.  Quaternion Attitude Estimation Using Vector Observations , 2000 .

[41]  Ken Shoemake,et al.  Quaternion calculus and fast animation , 1987 .

[42]  Barton J Bacon,et al.  Quaternion-Based Control Architecture for Determining Controllability/Maneuverability Limits , 2012 .

[43]  Agostino Martinelli,et al.  Vision and IMU Data Fusion: Closed-Form Solutions for Attitude, Speed, Absolute Scale, and Bias Determination , 2012, IEEE Transactions on Robotics.

[44]  Eric P. Fahrenthold,et al.  Hamilton's Equations with Euler Parameters for Rigid Body Dynamics Modeling. Chapter 3 , 2004 .

[45]  Edmund Whittaker,et al.  A Treatise on the Analytical Dynamics of Particles and Rigid Bodies: THE REDUCTION OF THE PROBLEM OF THREE BODIES , 1988 .

[46]  Malcolm D. Shuster Survey of attitude representations , 1993 .

[47]  Matthew T. Mason,et al.  Mechanics of Robotic Manipulation , 2001 .

[48]  John L. Crassidis Sigma-point Kalman filtering for integrated GPS and inertial navigation , 2006 .

[49]  J. Junkins,et al.  Optimal Spacecraft Rotational Maneuvers , 1986 .

[50]  Douglas J. Yazell Origins of the Unusual Space Shuttle Quaternion Definition , 2009 .

[51]  Anastasios I. Mourikis,et al.  High-fidelity sensor modeling and self-calibration in vision-aided inertial navigation , 2014, 2014 IEEE International Conference on Robotics and Automation (ICRA).