Orientation averaging using spatial extension
Damien Jade Duff
Department of Computer Engineering
Istanbul Technical University
Abstract—Orientation and rotation averaging are considered
as minimisers of a novel and generalisable error metric based
on the displacement of points within the object or space being
rotated. The resulting metrics and O(N)averaging algorithm are
formally equivalent to approaches currently recommended in the
literature. The new approach justiﬁes the use of chordal L2mean
in robotics applications and promises useful generalisations.
Keywords—orientation, rotation, orientation averaging
We often come across cases where it would be nice to be
able to average orientations or rotations: designing a controller
that smoothly tracks multiple target orientations, smoothing the
results of a particle ﬁlter to reduce jitter , combining the
output of multiple forward models , or creating exemplars
from low-level states for reasoning .
Here, I give an approach to averaging orientations and
rotations that should be intuitive to roboticists and is well-
justiﬁed by a concept of what it might mean to average
orientations. I consider orientations primarily in their form
as transforms or motion of the constitutive points of some
generic spatially extended object or volume. To average a set
of component orientations1I ask for the orientation that gets
the object’s constitutive points closest to the locations they
assume when the object is oriented according to the component
orientations - see Fig. 1 for an intuition about what is meant
For the case of symmetric objects/spaces considered here,
this intuition coincides with recent approaches in the literature
based apon abstract geometry, and unlike those approaches can
be easily extended to deal with non-symmetric shapes.
A. Related Work
By analogy to the process of averaging Euclidean vectors,
we quickly get efﬁcient algorithms  but when not guided
by obvious criteria it is easy to get lost in details (e.g. ). On
the other hand, starting with some principled measure of what
constitutes a good average, two good deﬁnitions of rotation
averages have been proposed [6,7,8,9]. They correspond to
ﬁnding an orientation that minimises either the sum of squared
matrix-distances to component orientations, called the chordal
L2-mean  or Euclidean mean [7,9], or ﬁnding an orientation
that minimises the sum of squared geodesic distances through
the space of rotations, called the geodesic L2-mean  or the
Riemannian mean [7,9].
The approach followed in the current paper is also a
measure-based approach but the measure is the sum of the
displacement of points across an object. It grows out of the use
of error measures evaluating the success of forward models and
for optimizing trajectories against pose observations [2,10].
1Here, component orientations means the orientations to be averaged.
a. Chordal Distance: b. Geodesic Distance:
Fig. 1. Two orientations of an object and the spatially extended (left) chordal
and (right) geodesic orientation metrics between these two orientations. We can
use these metrics to ﬁnd an orientation that is close to component orientations.
An alternative approach is to combine both process-analogy
and measure-derived approaches by examining efﬁcient prac-
tical approaches with respect to how close they get to more
well-motivated alternatives, so as to bound the performance of
algorithms. Examples include arithmetic renormalised averag-
ing of rotation matrices and quaternions [4,8]. However, when
an efﬁcient and well-bounded algorithm exists for rotation
averaging we should not need this approach.
III. ORIENTATION VS. ROTATION
When considered as a transform of points of an object (that
is, a displacement of all its constituent points), a rotation is
a rigid-body (distance and orientation preserving) transform
with a ﬁxed point. It is also a linear transform and can be
represented as a 3×3orthogonal matrix with determinant +1.
An orientation is a particular kind of conﬁguration of
an abstract rigid body with a ﬁxed point and as long as a
reference frame for the object is assumed, an orientation can
be expressed as a rotation, so for the purposes of this paper,
rotations and orientations can be treated the same.
A rotation can also be thought of, not just as a transform
(displacement of constituent points), but also as a motion in
which there is a ﬁxed point and distance is preserved over
every part of the motion. Similarly, an orientation in this view
is the motion of an object from its reference frame into the
This difference in conception of a rotation as a transform
or a motion results in two different approaches to averaging
them, though the conception as a transform is more intuitive
in general given that in the motion-based formulation there is
also the path of motion to consider.
IV. PRINCIPLES OF AVERAGING
The arithmetic mean ¯p=1
NPpiof a set of Npoints in
3D can be justiﬁed as the unique point that minimises the sum
of squared distances between itself and the component points
(differentiate and set to 0to solve):
d(p, pi)2= argmin
urkiye Otonom Robotlar Konferansı, 2015
How to deﬁne the distance d(R1, R2)between two rotations?
The two best candidates in the literature are the squared
Froebenius norm2of rotation matrix differences R1−R2
(the chordal metric) or the minimal squared angle of rotation
needed to align the two rotations R1RT
2(the geodesic metric):
dC(R1, R2) = kR1−R2k2(1)
dG(R1, R2) = kΘ(R1RT
Θreturns the angle rotated through by a rotation matrix. In
abstract geometry, the chordal metric is the distance between
rotations in the 9D Euclidean space in which the manifold of
rotations is embedded and the geodesic metric is the shortest
distance along the surface of the rotation manifold [8,9].
In my approach I offer two deﬁnitions of distance between
rotations. I call these dcand dgbecause they turn out to be
equivalent, up to a multiplication by a constant, to the chordal
and geodesic metrics in the restricted case considered here, in
which I assume that RppTp= 0 and RpppT=Ifor all points
pin the object or volume3. In both of the below deﬁnitions,
our error metric is the sum of the distances by which all points
in a generic or abstract object are either displaced or moved
during a rotation.
A. Spatially extended chordal metric
The spatially extended chordal metric is derived from the
sum of squared displacement distances in 3D Euclidean space
between two orientations R1and R2:
Here, the integral is over all points pin the object. See Fig.
1(a) for an example of this metric applied to an arbitrarily
shaped object. This corresponds to 2−cos(θ)where θis the
angle between the two orientations - the chordal metric is also
known to maximise cos(θ).
This general approach can apply to any transformation
or conﬁguration, not just rotations. It is not necesssary to
consider the paths that points must take during rotation, only
their displacement; this is a metric that considers rotation as
a pure transform and not as a motion. This, along with its
ammenability to analysis, means that it should be the metric
of choice in most robot applications.
B. Spatially extended geodesic metric
The sum of the squared shortest possible distances in 3D
Euclidean space during rotation is the same, up to a constant,
as the geodesic distance:
The problems with this approach, apart from the non-
intuitiveness of applying the concept of motion-paths to deﬁne
orientation, are that we need to apply each motion constraint
(e.g. obstacles, differential constraints), when deﬁning the
metric rather than just when analysing it in the context of the
relevant transform, and no closed-form is yet known for the
averaging solution [8,9]. Moreover, it generally gives similar
results to the chordal metric when averaging rotations .
2The Euclidean norm applied directly to the entries of a matrix.
3Imagine the space being rotated as the limit of an expanding sphere of
Fig. 2. Visualisation of a 3D slice of the 4D quaternion sphere. Orientations
are shown as line segments passing through the sphere origin. The contour
corresponds to the sum of squared chordal L2distances to the component
orientations. Left: a random set of quaternions. Right: a set of quaternions
chosen to be balanced across two rotation axes.
C. Averaging with the spatially extended chordal metric
Applying the above principals, integrating over all the
points in the presumed symmetric object/space, we obtain:
= 2 −2 cos(Θ(RT
Candidate and components expressed as quaternions q,qi:
dc(q, qi)2= argmax
i(symmetric). See Fig. 2 for a visualisa-
tion of the objective function. To get the mean, we normalise
the ﬁrst eigenvector of A, a theoretically O(1) operation for
a4×4matrix. Multiple solutions can occur when component
rotations are perfectly balanced but in practice this happens
inﬁnitesimally often, and we can return a random solution from
To average orientations, I use new error metrics invariant to
order change, inversion and rotation, describe their relationship
with other metrics in the literature, and emphasise the intuition
of rotations as either transforms or motion in arguing for using
the chordal mean in robot applications.
 T. M¨
orwald, M. Zillich, and M. Vincze, “Edge Tracking of Textured
Objects with a Recursive Particle Filter,” in Intl. Conf. on Computer
Graphics and Vision, Moscow, Russia, Oct. 2009, pp. 96–103.
 M. Kopicki, R. Stolkin, S. Zurek, T. M¨
orwald, and J. Wyatt, “Predicting
workpiece motions under pushing manipulations using the principle of
minimum energy,” in RSS Workshop: Representation for Obj. Grasping
& Manipulation in Single & Dual Arm Tasks, Zaragoza, Spain, 2010.
 F. Fern´
andez and M. Veloso, “Probabilistic policy reuse in a reinforce-
ment learning agent,” in Proc. 5th Intl. Joint Conf. on Autonomous
agents and Mmultiagent Systems. ACM, 2006, pp. 720–727.
 C. Gramkow, “On averaging rotations,” Journal of Mathematical Imag-
ing and Vision, vol. 15, no. 1-2, pp. 7–16, 2001.
 L. Vicci, “Averages of Rotations and Orientations in 3-space,” UNC
Chapel Hill, Department of Computer Science (unpublished), 2001.
 F. L. Markley, Y. Cheng, J. L. Crassidis, and Y. Oshman, “Averaging
Quaternions,” in AAS/AIAA Space Flight Mech., 2007, pp. 1675–1682.
 M. R. Pierrynowski and K. A. Ball, “Oppugning the assumptions
of spatial averaging of segment and joint orientations,” Journal of
Biomechanics, vol. 42, no. 3, pp. 375–378, Feb. 2009.
 R. Hartley, J. Trumpf, Y. Dai, and H. Li, “Rotation Averaging,” Intl.
Journal of Computer Vision, vol. 103, no. 3, pp. 267–305, Jul. 2013.
 M. Moakher, “Means & averaging in the group of rotations,” SIAM
Matrix Analysis & Applications, vol. 24, no. 1, pp. 1–16, 2002.
 D. J. Duff, “Visual motion estimation and tracking of rigid bodies by
physical simulation,” PhD Thesis, Univ. Birmingham, Dec. 2011.