Content uploaded by Damien Jade Duff
Author content
All content in this area was uploaded by Damien Jade Duff on Jan 11, 2017
Content may be subject to copyright.
Orientation averaging using spatial extension
Damien Jade Duff
Department of Computer Engineering
Istanbul Technical University
Istanbul, Turkey
Email: djduff@itu.edu.tr
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 justifies the use of chordal L2mean
in robotics applications and promises useful generalisations.
Keywords—orientation, rotation, orientation averaging
I. INTRODUCTION
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 filter to reduce jitter [1], combining the
output of multiple forward models [2], or creating exemplars
from low-level states for reasoning [3].
Here, I give an approach to averaging orientations and
rotations that should be intuitive to roboticists and is well-
justified 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
by closeness.
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.
II. BACKGROUND
A. Related Work
By analogy to the process of averaging Euclidean vectors,
we quickly get efficient algorithms [4] but when not guided
by obvious criteria it is easy to get lost in details (e.g. [5]). On
the other hand, starting with some principled measure of what
constitutes a good average, two good definitions of rotation
averages have been proposed [6,7,8,9]. They correspond to
finding an orientation that minimises either the sum of squared
matrix-distances to component orientations, called the chordal
L2-mean [8] or Euclidean mean [7,9], or finding an orientation
that minimises the sum of squared geodesic distances through
the space of rotations, called the geodesic L2-mean [8] 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.
d2
d1
d2
d1
a. Chordal Distance: b. Geodesic Distance:
dc=d2
1+d2
2+··· dg=d2
1+d2
2+···
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 find an orientation that is close to component orientations.
An alternative approach is to combine both process-analogy
and measure-derived approaches by examining efficient 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 efficient 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 fixed 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 configuration of
an abstract rigid body with a fixed 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 fixed 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
oriented frame.
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 justified as the unique point that minimises the sum
of squared distances between itself and the component points
(differentiate and set to 0to solve):
¯p= argmin
p∈R3X
0≤i<N
d(p, pi)2= argmin
p∈R3X
0≤i<N
kp1−p2k2
T¨
urkiye Otonom Robotlar Konferansı, 2015
How to define 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
2)k2(2)
Θ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 definitions 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 definitions,
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:
dc(R1, R2)2=Zp
kR1(p)−R2(p)k2dxdydz (3)
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(θ)[8].
This general approach can apply to any transformation
or configuration, 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:
dg(R1, R2)2=Zp
ΘR1(p)RT
2(p)2dxdydz (4)
The problems with this approach, apart from the non-
intuitiveness of applying the concept of motion-paths to define
orientation, are that we need to apply each motion constraint
(e.g. obstacles, differential constraints), when defining 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 [9].
2The Euclidean norm applied directly to the entries of a matrix.
3Imagine the space being rotated as the limit of an expanding sphere of
unit density.
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:
dc(R1, R2)2=Zp
kR1p−R2pk2dxdydz
= 2 −2 cos(Θ(RT
1R2)) (5)
Candidate and components expressed as quaternions q,qi:
¯q= argmin
q∈SO(3) X
i
dc(q, qi)2= argmax
q∈SO(3)
qTAq
Where A=PiqiqT
i(symmetric). See Fig. 2 for a visualisa-
tion of the objective function. To get the mean, we normalise
the first 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
infinitesimally often, and we can return a random solution from
the Eigenspace.
V. DISCUSSION
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.
REFERENCES
[1] 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.
[2] 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.
[3] 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.
[4] C. Gramkow, “On averaging rotations,” Journal of Mathematical Imag-
ing and Vision, vol. 15, no. 1-2, pp. 7–16, 2001.
[5] L. Vicci, “Averages of Rotations and Orientations in 3-space,” UNC
Chapel Hill, Department of Computer Science (unpublished), 2001.
[6] F. L. Markley, Y. Cheng, J. L. Crassidis, and Y. Oshman, “Averaging
Quaternions,” in AAS/AIAA Space Flight Mech., 2007, pp. 1675–1682.
[7] 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.
[8] 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.
[9] M. Moakher, “Means & averaging in the group of rotations,” SIAM
Matrix Analysis & Applications, vol. 24, no. 1, pp. 1–16, 2002.
[10] D. J. Duff, “Visual motion estimation and tracking of rigid bodies by
physical simulation,” PhD Thesis, Univ. Birmingham, Dec. 2011.