Definitioncore
Unit quaternion representation of rotation
Also called rotation quaternion, versor.
A rotation as a unit quaternion q = (cos(theta/2), sin(theta/2) times the axis), acting on a vector v by q v q*, where q and -q give the same rotation.
A unit quaternion is a list of four numbers with , and it describes a rotation of 3D space. The rotation by the angle about the unit axis has the quaternion , and it moves a vector to the vector part of the product , where . The product of two quaternions gives the composition of the two rotations, and and give the same rotation. Quaternions are compact, have no singular orientation, and are easy to keep valid by normalization, so robotics, aerospace, computer graphics and CAD use them to store and combine orientations.
Notation on this page: quaternions are in the Hamilton convention with the scalar first, rotations are active (they move vectors), and is the skew-symmetric matrix of , so that .
Definition
The quaternions are the numbers with real and the rules of Hamilton,
Write with the scalar part and the vector part . The product, the conjugate and the norm are
The product is associative but not commutative, and . A unit quaternion has ; the unit quaternions form the sphere in , and for them . A vector is identified with the pure quaternion .
Definition. The rotation of a unit quaternion is the map with
A unit quaternion representation of a rotation is a unit quaternion with .
For the matrix is
The basic facts are:
- It is a rotation. keeps lengths, because , and it has determinant 1, because is connected and . So is in the special orthogonal group SO(3).
- Axis and angle. If with a unit , the matrix above is , which is Rodrigues' formula. Every unit quaternion has this form with , and by Euler's rotation theorem every rotation is reached.
- Composition. , because .
- Double cover. if and only if . So is a two-to-one map from onto SO(3), and the angles and give and .
- Inverse. , the inverse rotation.
The JPL convention, used in some estimation papers, writes the scalar last and takes . Its quaternion of a given rotation equals the Hamilton quaternion with the vector part negated, and its products come in the reverse order. Convert at every interface, and never mix the two in one formula.
Examples and non-examples
- A quarter turn about . and give . The matrix formula gives , which maps to .
- A half turn about . , and . Here , so a formula that divides by fails; Shepperd's method handles this case.
- Composition. With , the quarter turns about and about give . This is about , so , the map . The product in the other order, , is a different rotation.
- Acting on a vector. With and : , and . So maps to , as the matrix says.
- The sign. is the rotation by about the same axis, which is the same rotation. A test that compares two quaternions must allow both signs.
- Non-example: a quaternion that is not a unit. For , , a scaling by . After a numerical integration or many products, drifts from 1, and the map is then a rotation times a scaling. Divide by to return to .
- Non-example: the product without the conjugate. is not a rotation of in general; for and it gives , which is not even a pure quaternion. The conjugate on the right is essential.
- Non-example: a pure quaternion as a rotation. with is the rotation by about . It is not "the vector turned into a rotation" in any other sense.
Related definitions
- Axis-angle representation. The pair that the quaternion encodes by the half angle. The vector is the result of the logarithm map of SO(3).
- Euler-Rodrigues parameters. The four numbers under their older name, used for the composition of rotations before the quaternion notation.
- Cayley parameters. The vector , the quaternion divided by its scalar part. It is singular at the half turn, where .
- Euler angles and roll-pitch-yaw angles. Three-angle charts of SO(3) with gimbal lock. Stuelpnagel's theorem shows that every three-parameter chart has a singular point, which is the reason for the fourth number of the quaternion.
- Dual quaternion. Two quaternions that represent a rigid motion, a rotation and a translation together.
- Algorithms. Shepperd's method converts a matrix to a quaternion, spherical linear interpolation interpolates two quaternions, and the quaternion kinematic equation moves a quaternion with an angular velocity.
References
- William Rowan Hamilton, On quaternions; or on a new system of imaginaries in algebra, Philosophical Magazine (third series) 25, 10-13, 1844, the first part of the series (the units i, j, k and their products)
- Kevin M. Lynch and Frank C. Park, Modern Robotics, Mechanics, Planning, and Control, Cambridge University Press, 2017, Appendix B, Section B.3 (unit quaternions, equations B.9 to B.12)
- Bruno Siciliano, Lorenzo Sciavicco, Luigi Villani and Giuseppe Oriolo, Robotics, Modelling, Planning and Control, Springer, 2009, Chapter 2, Section 2.6 (unit quaternion)
- Joan Sola, Quaternion kinematics for the error-state Kalman filter, 2017, Sections 1 and 2 (quaternion algebra and the rotation by a unit quaternion) and Section 3 (the Hamilton and JPL conventions)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag F08Y79 Edit this page History Report an error Markdown