You are on page 1of 15

IEEE TRANSACTIONS ON ROBOTICS, VOL. 30, NO.

3, JUNE 2014 679

Associating Uncertainty With Three-Dimensional


Poses for Use in Estimation Problems
Timothy D. Barfoot, Member, IEEE, and Paul T. Furgale, Member, IEEE

Abstract—In this paper, we provide specific and practical ap- group that represents rotation
proaches to associate uncertainty with 4 × 4 transformation ma-  
trices, which is a common representation for pose variables in 3-D SO(3) := C ∈ R3×3 | CCT = 1, det C = 1
space. We show constraint-sensitive means of perturbing trans-
formation matrices using their associated exponential-map gener- where 1 is the identity matrix, and the special Euclidean group
ators and demonstrate these tools on three simple-yet-important that represents rotation and translation
estimation problems: 1) propagating uncertainty through a com-     
pound pose change, 2) fusing multiple measurements of a pose (e.g., C r 4×4 
SE(3) := T = ∈R  {C, r} ∈ SO(3) × R . 3
for use in pose-graph relaxation), and 3) propagating uncertainty 0T 1
on poses (and landmarks) through a nonlinear camera model. The (1)
contribution of the paper is the presentation of the theoretical tools, Both are examples of matrix Lie groups, for which Stillwell [4]
which can be applied in the analysis of many problems involving
3-D pose and point variables.
provides an accessible introduction. We will avoid rehashing
the basics of group theory here but stress that we cannot apply
Index Terms—Exponential maps, homogeneous points, matrix the usual approach of additive uncertainty for such quantities as
Lie groups, pose uncertainty, transformation matrices.
they are not members of a vector space. In other words
I. INTRODUCTION x = x̄ + δ (2)
HE main contribution of this paper is to provide simple and
T practical techniques to associate uncertainty with 4 × 4
transformation matrices (commonly used to represent pose vari-
where x ∈ Rn is a random variable, x̄ is a ‘large,’ noise-free
value, and δ is a ‘small,’ uncertain perturbation (i.e., zero-mean
noise), which does not directly apply to members of SO(3)
ables) for use in robotic estimation problems. The challenge in
and SE(3). This paper investigates one means to overcome this
choosing a representation of pose and its associated uncertainty
problem.
is that representations either have singularities or constraints;
In robotics, it has been well established that estimating un-
this results from the fact that rotation variables are not vectors
certain spatial relationships is a fundamentally important prob-
but rather members of a noncommutative group. The advantage
lem. For example, the early works of Brooks [5], Smith and
of the technique that we will present is that it is free of singu-
Cheeseman [6], Durrant-Whyte [7], and Smith et al. [8] spurred
larities but avoids the need to enforce constraints when solving
the popular subfield of simultaneous localization and map-
optimal estimation problems. This is accomplished by storing
ping [9]. Our approach is similar to the work of Chirikjian [10]
the mean as a (singularity-free) 4 × 4 transformation matrix
and [11], who provide a rigorous treatment of representing and
and using a 6 × 1 (constraint-sensitive) perturbation of the pose
propagating uncertainty on Lie groups. It is also related to and
(with an associated 6 × 6 covariance matrix). As we will see,
extends the ideas presented by Su and Lee [12], [13] and Smith
our approach amounts to getting the best of both worlds as it
et al. [14]. Finally, in a recent paper, Hertzberg et al. [15] take
facilitates rather straightforward implementations of common
a similar approach to associate uncertainty with general mani-
estimation problems such as bundle adjustment [1].
folds, while we provide more details on handling SE(3) specif-
Transformation matrices are by no means new, having risen to
ically. One could view our paper as providing an accessible
popularity through manipulator robotics [2] and computer vision
and specific implementation of a means of associating and ma-
[3]. We will use standard definitions for the special orthogonal
nipulating uncertainties for SE(3) [and, thus, collaterally with
SO(3)]. The differences between our approach and the pre-
viously published works are subtle but important. Rather than
Manuscript received August 8, 2013; revised November 17, 2013; accepted list them here in detail, we will take care to point out specific
December 20, 2013. Date of publication January 28, 2014; date of current ver- differences throughout the paper, then summarize them in the
sion June 3, 2014. This paper was recommended for publication by Associate conclusion.
Editor R. Eustice and Editor D. Fox upon evaluation of the reviewers’ comments.
This work was supported by the Natural Sciences and Engineering Research We also demonstrate the usefulness of our method on three
Council of Canada and the EU FP7 2007–2013 Programme, Challenge 2, Cog- key problems: 1) propagating uncertainty through a compound-
nitive Systems, Interaction, Robotics, under Grant 269916, V-Charge. ing of two transformation matrices, 2) fusing multiple uncertain
T. D. Barfoot is with the Autonomous Space Robotics Lab, University of
Toronto, ON M5S 2J7, Canada (e-mail: tim.barfoot@utoronto.ca). measurements of a pose into a single estimate, and 3) propagat-
P. T. Furgale is with the Autonomous Systems Lab, ETH Zurich, 8092 Zurich, ing pose (and landmark) uncertainty through a nonlinear (stereo)
Switzerland (e-mail: paul.furgale@mavt.ethz.ch). camera model. In our calculations, we will retain as many terms
Color versions of one or more of the figures in this paper are available online
at http://ieeexplore.ieee.org. in the noise variables as possible, thereby demonstrating the
Digital Object Identifier 10.1109/TRO.2014.2298059 power of our approach.
1552-3098 © 2014 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications standards/publications/rights/index.html for more information.
680 IEEE TRANSACTIONS ON ROBOTICS, VOL. 30, NO. 3, JUNE 2014

This paper is organized as follows. Section II presents the where


mathematical machinery that we will use throughout the paper.
T := exp (ξ + δξ)∧ T̄, T := exp ξ ∧ T̄. (8)
Section III discusses how to compound two poses and their
uncertainties, Section IV shows how to fuse multiple estimates It can then be shown that
of pose together, and Section V shows how to propagate pose and
δT = J δξ (9)
landmark uncertainty through a nonlinear measurement model.
A conclusion rounds out the paper. where
 1
exp ξ 
α
II. MATHEMATICAL PRELIMINARIES J := dα (10)
0
A. Random Variables and Probability Density Functions is referred to as the Jacobian for SE(3) [21]; we will discuss
In contrast with (2), we will define random variables for this in more detail in the next section. We define the  operator2
SE(3) according to to be
   ∧ 
ρ φ ρ∧
T := exp ξ ∧ T̄ (3) 
ξ = = (12)
φ 0 φ∧
where T̄ ∈ SE(3) is a ‘large,’ noise-free value, and ξ ∈ R6 is a which is 6 × 6. We will also use  as the inverse operation of
‘small,’ noisy perturbation. The ∧ operator1 turns ξ into a 4 × 4 , for convenience.
member of the Lie algebra se(3) according to The infinitesimal volume elements can then be related [21]
 ∧  ∧  by
ρ φ ρ
ξ ∧ := = (4)
φ 0T 0 dT = | det (J ) | dξ. (13)
−1 ∨
where ρ, φ ∈ R3 are 3 × 1, and ∧ also turns φ into a member Using ξ = ln TT̄ and (13) in (6), we may find the PDF
of the Lie algebra so(3): over T by a straightforward change of coordinates3
⎡ ⎤∧ ⎡ ⎤   
φ1 0 −φ3 φ2 1 T −1
1= η exp − ξ Σ ξ dξ
φ∧ := ⎣ φ2 ⎦ = ⎣ φ3 0 −φ1 ⎦. (5) R6 2
φ3 −φ2 φ1 0   
1 ∨T ∨
= β exp − ln TT̄−1 Σ−1 ln TT̄−1 dT
We will use ∨ as the inverse operation of ∧. This perturbation S E (3)

2
 
approach ensures that T ∈ SE(3) and is sometimes referred to p(T)
as an injection of noise onto the group SE(3) [20]. Additional 
notation and a closed-form expression for the matrix exponential = p(T) dT (14)
in (3) can be found in the Appendix. S E (3)
In this paper, we will define the small perturbation variable to where
be zero-mean Gaussian p(ξ) = N (0, Σ), where Σ is a 6 × 6 η 1
covariance matrix. We stress that we are directly defining this β= = . (15)
| det (J ) |
probability density function (PDF) in the vectorspace, R6 . This (2π)6 det(J ΣJ T )
choice in turn induces a PDF over SE(3), p(T). To see what
Importantly, p(T) is not Gaussian because of the fact that β
this PDF is, we note that by our definition
depends on T via J . Again, we stress that our p(T) is only
   
1 T −1 indirectly defined via p(ξ).
p (ξ) dξ = η exp − ξ Σ ξ dξ = 1 (6) Our approach to define uncertainty on SE(3) via ξ is very
R6 R6 2
similar to that introduced by Su and Lee [12] and [13], although
where η = √ 1
is the (constant) normalization factor. we apply the perturbation in (3) on the left rather than the right
(2π ) 6 det(Σ )
To switch variables and write a PDF over T, we must define (both are valid). However, our paper works out the consequences
what we mean by an infinitesimal volume of SE(3), which is
written as dT. Along the lines of Chirikjian [11], we will relate 2 Our  operator is similarly defined as × by D’Eleuterio [22] and [23] for

perturbations in ξ to perturbations in T according to use in manipulator kinematics/dynamics. In relation to the other notation in the
literature [11], we have

δT := ln T T−1 (7) Ad exp ξ∧ = exp ξ = exp ad ξ∧ (11)

where Ad(·) and ad(·) are the adjoints for SE(3) and se(3), respectively. Thus,
by introducing , we have a means to compute both adjoints.
1 The ∧ operator is ‘overloaded’ in the sense that it can be applied to both 6 × 1 3 Technically speaking, to carry out this change of coordinates rigorously,
and 3 × 1 columns [2] [11] [16]. For the 6 × 1 case, ∧ is similar to the operator we would like the integration limits on the φ part of ξ to be such that φ <
defined by [17] but without the negative sign in front of the ρ component. For π. However, a Gaussian has infinite tails, and therefore, we are effectively
the 3 × 1 case, φ∧ is sometimes written as φ× [18] or [[φ]] [19]; sometimes, allowing the tails to ‘fold’ around by integrating over all of R6 . In most practical
the ∧ is written above the symbol, as in φ̂; however, we shall stick to the original situations, the Gaussian is not too spread out, and there is very little probability
definition in Murray et al. [2, pp. 26 and 41], which has it off to the right, since mass beyond the π limit. When a global representation of uncertainty on SO(3)
we often apply it to expressions involving multiple variables. is required, we may turn to the approach of Lee et al. [24].
BARFOOT AND FURGALE: ASSOCIATING UNCERTAINTY WITH THREE-DIMENSIONAL POSES FOR USE IN ESTIMATION PROBLEMS 681

of this parameterization further (and to higher accuracy) than Su As pointed out by Wolfe et al. [27], using the other PDF defini-
and Lee, particularly the compounding and fusing of uncertain tion, p (T), it is not necessarily true that M = T̄, where
transformations.   ∨
−1
Our approach is also similar but subtly different from the ln TM p (T) dT = 0. (20)
approach of Chirikjian [11], Wang and Chirikjian [25], [26], and S E (3)
Wolfe et al. [27]. These works start by defining p(T) directly
Likewise, we see that our Σ matches one common (left) defini-
and switch to parameterizing T via exponential coordinates to
tion of covariance for SE(3) [25]
carry out computations. In terms of our notation, they define a

Gaussian PDF over T as ∨ ∨T
  Σ := ln TM−1 ln TM−1 p(T) dT
1 ∨T ∨ S E (3)
p (T) = β  exp − ln TT̄−1 Σ−1 ln TT̄−1 (16) 
2
= ξξ T p(ξ) dξ. (21)
R6
where β  is a (constant) normalization factor chosen to make
p (T) a valid PDF [27, eq. 14]. By contrast, we define p(ξ) Using the other PDF definition, p (T), we let
first and induce p(T) through (3). The difference between these   ∨  ∨T
works and ours is essentially between β  (a constant) and β Σ := ln TM
−1
ln TM
−1
p (T) dT (22)
(dependent on T); both are in fact valid PDFs, but we believe our S E (3)
approach has merit in terms of its relative ease of computation.
In practice, we simply work with p(ξ) and never need to and then it is not necessarily true that Σ = Σ. As discussed by
compute p(T). For example, if we want to compute the expected Wolfe et al. [27], as Σ gets very small, we have that
value E[·] of some nonlinear function of a transformation f (T), M ≈ M = T̄, Σ ≈ Σ (23)
we can simply use p(ξ) as follows:
 because in this case, J ≈ 1, and therefore, β  ≈ β.
E[f (T)] = f (T) p(T) dT There is another reason why our approach to inject uncertainty
S E (3) into SE(3) may be the more natural choice for robotics applica-
   tions. Consider the equation for the continuous-time kinematics
1 ∨T ∨
= f (T) β exp − ln TT̄−1 Σ−1 ln TT̄−1 dT of a rigid body
S E (3) 2
  
p(T) Ṫ =  ∧ T (24)
 
η
    where  := [ ω ν
] is the combined linear and angular velocity. If
∧ 1 T −1
= f exp ξ T̄ β | det (J ) | exp − ξ Σ ξ dξ we assume that  is constant from t1 to t2 , then the discrete-
R6 2
   time update is
p(ξ)
 T(t2 ) = exp (t ∧ ) T(t1 ) (25)

= f exp ξ T̄ p(ξ) dξ. (17)
R6 where t := t2 − t1 . If we are dead-reckoning from the measured
velocity, then in recursive estimation schemes such as the ex-
We underscore that we do not require any approximation to write tended Kalman filter, we typically assume that  is corrupted by
down this last expression, which does not contain | det (J ) |, Gaussian noise. This is precisely what our perturbation scheme
and this is because of our choice to define p(ξ) directly. How- in (3) assumes.
ever, f (·) is still a nonlinearity, and therefore, by expanding the Finally, a deterministic change of coordinates, via transfor-
matrix exponential, and performing a Taylor-series expansion mation Td ∈ SE(3), is straightforward under our parameteri-
in the ξ noise variables, we can easily compute approximations zation [12], since
of the expectation to as many terms as we like.
In terms of the statistical moments of p(T), our approach Td T = Td exp ξ ∧ T̄ = exp (T d ξ)∧ Td T̄, (26)
would seem to be the more natural choice, as we now show.
One common (left) definition of the mean of p(T) [25] is the where T d = Ad(Td ). The new mean is therefore Td T̄ and
unique M ∈ SE(3) that satisfies the following equation: the new covariance is T d Σ T Td . Thus, we do not require any
 approximation to apply a deterministic change of coordinates
∨ to our chosen PDF. We will further discuss the compounding of
ln TM−1 p(T) dT = 0. (18)
S E (3) two uncertain transformations in Section III.

It is easy to see, under our version of p(T), that in fact, M = T̄ B. Baker–Campbell–Hausdorff Formula
since
  One of the main tools that we will use to manipulate
∨ uncertainties on SE(3) is the Baker–Campbell–Hausdorff
ln TT̄−1 p(T) dT = ξ p(ξ) dξ = 0. (19)
S E (3) R6 (BCH) formula, which can be used to compound two matrix
682 IEEE TRANSACTIONS ON ROBOTICS, VOL. 30, NO. 3, JUNE 2014

exponentials
1 1
ln (exp(A) exp(B)) = A + B + [A, B] + [A, [A, B]]
2 12
1 1
+ [B, [B, A]] − [B, [A, [A, B]]] + · · · (27) Fig. 1. Combining a chain of two poses into a single compound pose.
12 24
where the Lie bracket is given by
A. Theory
[A, B] := AB − BA. (28)
Consider two noisy poses T1 and T2 ; we keep track of their
Note, the BCH formula is an infinite series. If we keep only nominal values and associated uncertainties
terms linear in A, it becomes [28]    
T̄1 , Σ1 , T̄2 , Σ2 .
∞
Bn     
ln (exp(A) exp(B)) ≈ B + B, B, . . . B, A . . . . Now, suppose, we let
n =0
n!   
n T = T1 T2
(29)
 
The Bn are the Bernoulli numbers as depicted in Fig. 1. What is T̄, Σ ? Under our perturbation
1 1 1 scheme, we have
B0 = 1, B1 = − , B2 = , B3 = 0, B4 = − , B5 = 0, . . . ,
2 6 30
(30) exp ξ ∧ T̄ = exp ξ ∧1 T̄1 exp ξ ∧2 T̄2 . (36)
which appear frequently in number theory. Moving all the uncertain factors to the left side, we have
In the particular case of SE(3), we can use the fact that  

 ∧ ∧ ∧ exp ξ ∧ T̄ = exp ξ ∧1 exp T̄ 1 ξ 2 T̄1 T̄2 (37)
ξ a , ξ b = ξ ∧a ξ ∧b − ξ ∧b ξ ∧a = ξ 
a ξb (31)
to show that where T̄ 1 = Ad T̄1 . If we let
∨ 1 T̄ = T̄1 T̄2 (38)
ln (Ta Tb )∨ = ln exp(ξ ∧a ) exp(ξ ∧b ) = ξa + ξb + ξ ξ
2 a b
we are left with
1   1 1  
+ ξ ξ ξ + ξ  ξ  ξ − ξ  ξ  ξ  ξ + · · · . (32) ∧
12 a a b 12 b b a 24 b a a b exp ξ ∧ = exp ξ ∧1 exp T̄ 1 ξ 2 . (39)
Alternatively, if we assume that ξ a is small, then using the
approximate formula stated previously, we can show that Letting ξ 2 := T̄ 1 ξ 2 , we can apply the BCH formula to find
∨ 1 1 1  
ln (Ta Tb )∨ = ln exp(ξ ∧a ) exp(ξ ∧b ) ≈ ξ b + J b−1 ξ a (33) ξ = ξ 1 + ξ 2 + ξ  ξ + ξ ξ ξ + ξ ξ ξ
2 1 2 12 1 1 2 12 2 2 1
where 1 

− ξ 2 ξ   
1 ξ1 ξ2 + · · · . (40)
 Bn  24
J b−1 =
n
ξ . (34)
n =0
n! b For our approach to hold, we require that E [ξ] = 0. Assuming
that ξ 1 ∼ N (0, Σ1 ) and ξ 2 ∼ N (0, Σ2 ) are uncorrelated with
Inverting, we find one another, we have


 1 1 1   
Jb = ξ
n
= exp ξ ∧b
α
dα. (35) E [ξ] = − E ξ 2 ξ   
1 ξ1 ξ2 + O ξ
6
(41)
n =0
(n + 1)! b 0
24
since everything except the fourth-order term has zero mean.
In Lie group theory, J b is referred to as the left4 Jacobian of Thus, to third order, we can safely assume that E [ξ] = 0, and
SE(3). We saw this quantity in action in the previous section thus, (38) seems to be a reasonable way to compound the mean
already; however, it is useful to understand that it comes directly transformations.
from the BCH formula under the assumption that ξ a is small. It is also
 possible toshow that the fourth-order term has zero
The appendix contains a closed-form expression to compute J b    
mean, E ξ 2 ξ 1 ξ 1 ξ 2 = 0, if Σ1 is of the special form
from ξ b .
 
  Σ1,ρρ 0
III. COMPOUNDING POSES Σ1 = E ξ 1 ξ T1 = 2 (42)
0 σ1,φφ 1
In this section, we investigate the problem of compounding ρ1
two poses, each with associated uncertainty, as depicted in Fig. 1. where ξ 1 = [ φ 1
]. This is a common situation for Σ1 when we
are, for example, propagating uncertainty on velocity, as in (25).
In this case, we are justified to assume E [ξ] = 0 all the way out
4 There is also a right Jacobian if we instead assume ξb is small. to fifth order (and possibly further).
BARFOOT AND FURGALE: ASSOCIATING UNCERTAINTY WITH THREE-DIMENSIONAL POSES FOR USE IN ESTIMATION PROBLEMS 683

 
The next task is to compute Σ = E ξξ T . Multiplying out different PDF, as discussed earlier; it is important to note that,
to fourth order, we have while our method is fourth order in the perturbation variables, it

1      T 
 T is only second order in the covariance, which is the same as [26].
≈ E ξ 1 ξ T1 + ξ 2 ξ 2 +
T
E ξξ ξ1 ξ1 ξ2 ξ2 In summary, to compound two poses, we propagate the mean
12 using (38) and the covariance using (55).
    
+ ξ 2 ξ 2 ξ  T
+ ξ 2 ξ 2
T
1 ξ1 ξ 1 ξ T1
B. Sigmapoint Method
    1   T
 
+ ξ2 ξ2 ξ1 ξ1 T
+ ξ1 ξ2 ξ2 ξ
  T
1 (43) We can also make use of the popular sigmapoint transforma-
4 tion [29] to pass uncertainty through the compound pose change.
where we have omitted showing any terms that have an odd In this section, we tailor this to our specific type of SE(3) per-
power in either ξ 1 or ξ 2 since these will by definition have turbation. Our approach to handling sigmapoints is quite similar
expectation zero. This expression may look daunting, but we to that taken by Hertzberg et al. [15] as well as Brookshire and
can take it term by term. To save space, we define and make use Teller [30]. In our case, we begin by approximating the joint
of the following two linear operators: input Gaussian using a finite number of samples, {T1, , T2, }
A := −tr (A) 1 + A (44) SST := diag{Σ1 , Σ2 }, (Cholesky decomposition)

A, B := A B + BA (45) ψ := λ col S, = 1...L

with A, B ∈ Rn ×n . These provide the useful identity ψ +L := − λ col S, = 1...L
 
−u∧ Av∧ ≡ vuT , AT (46) ξ 1,
:= ψ , = 1 . . . 2L
where u, v ∈ R and A ∈ R . Making use of this repeatedly,
3 3×3 ξ 2,
we have out to fourth order T1, := exp ξ ∧1, T̄1 , = 1 . . . 2L
 
  Σ1,ρρ Σ1,ρφ
T
E ξ 1 ξ 1 = Σ1 = (47) T2, := exp ξ ∧2, T̄2 , = 1 . . . 2L
ΣT1,ρφ Σ1,φφ
   where λ is a user-definable scaling constant,6 and L = 12. We
  Σ2,ρρ Σ2,ρφ
 T  T then pass each of these samples through the compound pose
E ξ 2 ξ 2 = Σ2 = T 
= T̄ 1 Σ2 T̄ 1 (48)
Σ2,ρφ Σ2,φφ change and compute the difference from the mean
  ∨
 ∧ ∧ Σ1,φφ Σ1,ρφ + ΣT1,ρφ ξ = ln T1, T2, T̄−1 , = 1 . . . 2L. (56)
E ξ 1 ξ 1 = A1 = (49)
0 Σ1,φφ These are combined to create the output covariance according
 ∧ ∧  
Σ2,φφ Σ2,ρφ + Σ2,ρφ
T
to
E ξ 2 ξ 2 = A2 = (50)
Σ2,φφ 1 
2L
0
  Σsp = ξ ξT . (57)
   T Bρρ Bρφ 2λ
E ξ 1 ξ  T
ξ
2 2 ξ 
1 = B = (51) =1
BTρφ Bφφ Note that we have assumed that the output sigmapoint sam-
where ples have zero mean in this formula, to be consistent with
our mean propagation. Interestingly, this turns out to be al-
Bρρ = Σ1,φφ , Σ2,ρρ + ΣT1,ρφ , Σ2,ρφ
gebraically equivalent to the second-order method (from the
+ Σ1,ρφ , Σ2,ρφ + Σ1,ρρ , Σ2,φφ
T
(52) previous section) for this particular nonlinearity, since the noise
sources on T1 and T2 are assumed to be uncorrelated.
Bρφ = Σ1,φφ , Σ2,ρφ + ΣT1,ρφ , Σ2,φφ
T
(53)
C. Simple Compound Example
Bφφ = Σ1,φφ , Σ2,φφ . (54)
In this section, we present a simple qualitative example of
The resulting covariance is then pose compounding and in Section III-D, we carry out a more
Σ4th ≈ Σ1 + Σ2 quantitative study on a different setup. To see the qualitative
   difference between the second- and fourth-order methods, let us
Σ2n d
consider the case of compounding transformations many times
1   1
A1 Σ2 + Σ2 AT1 + A2 Σ1 + Σ1 A2 + B (55) in a row
T
+ "
12  4 
!K

additional fourth-order term s exp ξ K T̄K = exp ξ T̄ exp ξ ∧0 T̄0 .

(58)
correct to fourth order.5 This result is essentially the same as k =1

that of Wang and Chirikjian [26] but worked out for our slightly
6 For all experiments in this paper, we used λ = 1; we need to ensure that the
5 Thesixth-order terms require a lot more work, but it is possible to compute sigmapoints associated with the rotational degrees of freedom have length less
them using Isserlis’ theorem. than π to avoid numerical problems.
684 IEEE TRANSACTIONS ON ROBOTICS, VOL. 30, NO. 3, JUNE 2014

As discussed earlier, this can be viewed as a discrete-time inte-


gration of the SE(3) kinematic equations, as in (25). To keep
things simple, we make the following assumptions:

T̄0 = 1, ξ 0 ∼ N (0, 0) (59)


 
C̄ r̄
T̄ = , ξ ∼ N (0, Σ) (60)
0T 1
⎡ ⎤
r
C̄ = 1, r̄ = ⎣ 0 ⎦, Σ = diag 0, 0, 0, 0, 0, σ 2 . (61)
0

Although this example uses our 3-D tools, it is confined to


a plane for the purpose of illustration and ease of plotting;
it corresponds to a rigid body moving along the x-axis but
with some uncertainty only on the rotational velocity about
the z-axis. This could model a unicycle robot driving in the
Fig. 2. Example of compounding K = 100 uncertain transformations (see
plane with a constant translational speed and slightly uncertain Section III-C). The light blue lines and blue dots show 1000 individual sampled
rotational speed (centered about zero). We are interested in how trajectories starting from (0, 0) and moving nominally to the right at constant
the covariance matrix fills in over time. translational speed but with some uncertainty on the rotational velocity. The
blue 1-sigma covariance ellipse is simply fitted to the blue samples to show
According to the second-order scheme, we have what keeping xy-covariance relative to the start looks like. The red (second
order) and green (fourth order) lines are the principal great circles of the 1-
⎡1 0 0 Kr
⎤ sigma covariance ellipsoid, given by Σ K , mapped to the xy plane. Looking
at the area (95, 0), corresponding to straight ahead, the fourth-order scheme
⎢0 1 0 0 ⎥ has some nonzero uncertainty (as do the samples), whereas the second-order
T̄ K = ⎣0 0 1 0
⎦ (62) scheme does not. We used r = 1 and σ = 0.03.
0 0 0 1
ΣK  

⎡0 ⎤ T̄1 := exp ξ̄ 1 , ξ̄ 1 := [ 0 2 0 π/6 0 0 ]T
0 0 0 0 0
K (K − 1)(2K − 1) 2 2 K (K − 1) 2  
⎢0 r σ 0 0 0 − rσ ⎥ 1 1
⎢ 6 2 ⎥ Σ1 := α × diag 10, 5, 5, , 1,
⎢0 0 0 0 0 0 ⎥
=⎢ ⎥ 2 2
⎢0 0 0 0 0 0 ⎥  
⎣0 ⎦ ∧
0
K (K − 1) 2
0 0 0 0 T̄2 := exp ξ̄ 2 , ξ̄ 2 := [ 0 0 1 0 π/4 0 ]T
0 − rσ 0 0 0 K σ2  
2
1 1
(63) Σ2 := α × diag 5, 10, 5, , , 1
2 2

where we see that the top-left entry of ΣK , corresponding to where α ∈ [0, 1] is a scaling parameter that increases the mag-
uncertainty in the x-direction, does not have any growth of un- nitude of the input covariances parametrically.
certainty. However, in the fourth-order scheme, the fill-in pattern We compounded these two poses according to (36), which re-
is such that the top-left entry is nonzero. This happens for several sults in a mean of T̄ = T̄1 T̄2 . The covariance Σ was computed
reasons, but mainly through the Bρρ submatrix of B. This leak- using four methods.
ing of uncertainty into an additional degree of freedom cannot 1) Monte Carlo: We drew a large number, M = 1 000 000,
be captured by keeping only the second-order terms. Fig. 2 pro- of random samples (ξ m 1 and ξ m 2 ) from the input covari-
vides a numerical example of this effect. It shows that both the ance matrices, compounded the resulting transformations,
second- and fourth-order schemes do a good job of representing %M T
and computed the covariance as Σm c = M1 m =1 ξ m ξ m
the ‘banana’-like distribution over poses, as discussed by Long ∧ ∧
with Tm = exp ξ m 1 T̄1 exp ξ m 2 T̄2 , and ξ m =
et al. [31]. However, the fourth-order scheme has some finite ∨
ln Tm T̄−1 . This slow-but-accurate approach served
uncertainty in the straight-ahead direction (as do the sampled
as our benchmark to which the other three much faster
trajectories), while the second-order scheme does not.
methods were compared.
2) Second Order: We used the second-order method de-
scribed previously to compute Σ2nd .
D. Compound Experiment 3) Fourth Order: We used the fourth-order method described
To quantitatively evaluate the pose-compounding techniques, previously to compute Σ4th .
we ran a second numerical experiment in which we compounded 4) Sigmapoint: We used the sigmapoint transformation de-
two poses including their associated covariance matrices scribed previously [29] to compute Σsp .
BARFOOT AND FURGALE: ASSOCIATING UNCERTAINTY WITH THREE-DIMENSIONAL POSES FOR USE IN ESTIMATION PROBLEMS 685

Fig. 4. Combining K pose estimates into a single fused estimate.

IV. FUSING POSES


This section will investigate a different type of nonlinearity,
i.e., the fusing of several pose estimates, as depicted in Fig. 4.

A. Theory
Suppose that we have K estimates of a pose and associated
uncertainties
     
T̄1 , Σ1 , T̄2 , Σ2 , . . . , T̄K , ΣK . (64)
Fig. 3. Results from compound experiment (see Section III-D): Error ε in com- If we think of these as uncertain measurements of the true pose,
puting covariance associated with compounding two poses using three methods,
as compared with Monte Carlo. The sigmapoint and second-order methods are Ttrue, how can
 we optimally combine these into a single esti-
algebraically equivalent for this problem and, thus, appear the same on the plot. mate T̄, Σ ?
The input covariances were gradually scaled up via the parameter α, highlight- The vectorspace solution to fusion is straightforward and can
ing the improved performance of the fourth-order method.
be found exactly in closed form
"−1
K K
−1 −1
x̄ = Σ Σk x̄k , Σ = Σk . (65)
We compared each of the last three covariance matrices with k =1 k =1
the Monte Carlo one, using the Frobenius norm
The situation is somewhat more complicated when dealing with
SE(3), and we shall resort to an iterative scheme.
&   We define the error (that we will seek to minimize) as k ∼
ε := tr (Σ − Σm c )T (Σ − Σm c ) . N (0, Σk ), which occurs between the individual estimate and
the optimal estimate T̄ so that
 ∨

Fig. 3 shows that for small input covariance matrices (i.e., α k := ln T̄ T̄−1 = ln exp ξ ∧ T̄ T̄−1
k
  
k
small), there is very little difference between the various meth- sm all
ods and the errors are all low compared with our benchmark. ∧ ∨
= ln exp ξ exp ξ ∧k (66)
However, as we increase the magnitude of the input covariances,
all the methods get worse, with the fourth-order method faring where T̄ is our best guess so far, ξ is a small (unknown but
the best by about a factor of seven based on our error metric. optimal) perturbation between our best guess and the optimum,
Note, since α is scaling the covariance, the applied noise is and
increasing quadratically. ∨
The second-order method and the sigmapoint method have ξ k := ln T̄ T̄−1
k (67)
indistinguishable performance, as they are algebraically equiv- is the difference between our best guess so far and each individ-
alent. The fourth-order method goes beyond both of these by ual estimate.
considering higher-order terms in the input covariance matri- Applying the version of the BCH formula in (29), we have
ces. We did not compare the computational costs of the various
methods as they are all extremely efficient, as compared with k ≈ ξ k + J −1
k ξ (68)
Monte Carlo.
correct to first order in ξ with
It is also worth noting that our ability to correctly keep track of
∞
uncertainties on SE(3) decreases with increasing uncertainty. Bn 
J −1
n
This can be seen directly in Fig. 3, as error increases with k := ξ . (69)
n =0
n! k
increasing uncertainty. This suggests that it may be wise to use
only relative pose variables in order to keep uncertainties small; Since ξ k is fairly small, this series will converge rapidly and we
this idea was suggested early on by Brooks [5] and demonstrated can get away with keeping just a few terms. With our iterative
recently by Sibley et al. [32]. If uncertainty must be tracked scheme, ξ will (hopefully) converge to zero, and hence, we are
globally on SE(3), it may be necessary to move to an approach justified to keep only terms linear in this quantity. Note that it is
more along the lines of Lee et al. [24]. also possible to keep all the terms in the previous expansion by
686 IEEE TRANSACTIONS ON ROBOTICS, VOL. 30, NO. 3, JUNE 2014

utilizing the expression in (100) to compute J k analytically and


then invert. The ξ k will be the residual errors after convergence.
We define the cost function that we want to minimize as
1  T −1
K
V := k Σk k
2
k =1

1
K
T
≈ ξ k + J −1
k ξ Σ−1
k ξ k + J −1
k ξ
2
k =1

which is already quadratic in ξ. It is in fact a Mahalanobis


distance [33], since we have chosen the weighting matrices to
be the inverse covariance matrices; thus, minimizing V with
respect to ξ is equivalent to maximizing the joint likelihood of
the individual estimates. It is worth noting that because we are
using a constraint-sensitive perturbation scheme, we do not need
to worry about enforcing any constraints on our state variables
during the optimization procedure. Taking the derivative with
Fig. 5. Results from the fusion experiment (see Section IV-B). (Left) Average
respect to ξ and setting to zero results in the following system final cost function V as a function of the number of terms N , kept in J −1 .
k
of linear equations for the optimal value of ξ: (Right) Same for the root-mean-squared pose error with respect to the true pose.
" Both plots show there is benefit in keeping more than one term in J −1 k
. The

K K
datapoint that is denoted by ‘∞’ uses the analytical expression in (100) to keep
−T −1 −1
J k Σk J k ξ=− J −T −1
k Σk ξ k . all the terms in the expansion.
k =1 k =1

While this may look strange compared with (65), the Jacobian B. Fusion Experiment
terms appear because our choice of error definition is in fact
To validate the pose fusion method from the previous section,
nonlinear owing to presence of the matrix exponentials. We
we used a true pose given by
then apply this optimal perturbation to our best guess so far
Ttrue := exp ξ ∧true , ξ true := [ 1 0 0 0 0 π/6 ]T
T̄ ← exp ξ ∧ T̄
and then generated three random pose measurements
which ensures T̄ remains in SE(3), and iterate to convergence.
This optimization strategy was also used by Strasdat et al. [34], T̄1 := exp ξ ∧1 Ttrue , T̄2 := exp ξ ∧2 Ttrue
who argued that it avoids singularities in the representation of
the mean, T̄, but retains a minimal parameterization during the T̄3 := exp ξ ∧3 Ttrue (70)
optimization step ξ. At the last iteration, we take where
"−1   
 K
ξ1 ∼ N
1
0, diag 10, 5, 5, , 1,
1
Σ= J −T −1
k Σk J k
−1
2 2
k =1   
1 1
for the covariance matrix. This approach has the form of a ξ 2 ∼ N 0, diag 5, 15, 5, , , 1
2 2
Gauss–Newton method.   
This fusion problem is similar to the one investigated by 1 1
ξ 3 ∼ N 0, diag 5, 5, 25, 1, , . (71)
Smith et al. [14], but they only discuss the K = 2 case. Our 2 2
study is closer to that of Long et al. [31], who discuss the
We then solved for the pose using our Gauss–Newton technique
N = 2 case and derive closed-form expressions for the fused
(iterating until convergence), using the initial condition T̄ = 1.
mean and covariance for an arbitrary number of individual mea-
We repeated this for N = 1 . . . 6, which is the number of terms
surements, K; however, they do not iterate their solution and
kept in J −1
k in (103), shown later. We also used the expression
they are tracking a slightly different PDF, as discussed earlier.
given in (100), shown later, to compute J k analytically (and
Wolfe et al. [27] also discuss fusion at length, albeit again us-
then inverted numerically) and this is denoted by ‘N = ∞.’
ing a slightly different PDF than us. They discuss noniterative
Fig. 5 plots two performance metrics. First, it plots the final
methods of fusion for arbitrary K and show numerical results
converged value of the cost function,
%M Vm , averaged over M =
for K = 2. We believe our approach generalizes all of these pre-
1000 random trials V := M1 m =1 Vm . Second, it plots the
vious works by 1) allowing the number of individual estimates
root-mean-squared pose error (with respect to the true pose) of
K to be arbitrary, 2) keeping an arbitrary number of terms in
our estimate T̄m , again averaged over the same M random trials
the approximation of the inverse Jacobian N , and 3) iterating '
to convergence via a Gauss–Newton style optimization method. (
( 1  M
Our approach may also be simpler to implement than some of ε := ) εT εm , εm := ln Ttrue T̄−1

.
these previous methods. M m =1 m m
BARFOOT AND FURGALE: ASSOCIATING UNCERTAINTY WITH THREE-DIMENSIONAL POSES FOR USE IN ESTIMATION PROBLEMS 687

A. Homogeneous Points
Points in R3 can be represented using 4 × 1 homogeneous
coordinates [3] as follows:
⎡ ⎤
sx  
⎢ sy ⎥ ε
p=⎣ ⎦=
sz η
s
where s is some real, non-negative scalar, ε ∈ R3 , and η is
scalar. When s is zero, it is not possible to convert back to R3 ,
as this case represents points that are infinitely far away. Thus,
homogeneous coordinates can be used to describe near and
distant landmarks with no singularities or scaling issues [37].
They are also a natural representation in that points may then
be transformed from one frame to another very easily using
transformation matrices (e.g., p2 = T21 p1 ).
We will also make use of the following two operators7 to
Fig. 6. Results from the fusion experiment. (Left) Convergence of the cost manipulate 4 × 1 columns
function V with successive Gauss–Newton iterations. This is for just one of the        
M trials that is used to generate Fig. 5. (Right) Same as left but zoomed in to ε η1 −ε∧ ε 0 ε
:= , := (72)
show that the N = 2, 4, ∞ solutions converge to progressively lower costs. η 0T 0T η −ε∧ 0
which result in a 4 × 6 and 6 × 4, respectively. With these defi-
The plots show that both measures of error are monotonically nitions, we have the following useful identities:
reduced with increasing N . Moreover, we see that for this ex- ξ ∧ p ≡ p ξ, pT ξ ∧ ≡ ξ T p (73)
ample, almost all of the benefit is gained with just four terms
(or possibly even two). The results for N = 2, 3 are identical as where ξ ∈ R6 and p ∈ R4 , which will prove useful when ma-
are those for N = 4, 5. This is because in the Bernoulli number nipulating expressions involving points and poses together. We
sequence, B3 = 0 and B5 = 0; therefore, these terms make no also have the identity
additional contribution to J −1
k in (103). It is also worth stating (Tp) ≡ Tp T −1 (74)
that if we make the rotational part of the covariances in (71) any
bigger, we end up with a lot of samples that have rotated by more which is similar to (108) and (109), shown later. To the best of
than angle π, and this can be problematic for the performance our knowledge, these operators and identities have not previ-
metrics we are using. ously appeared in the literature.
Fig. 6 shows the convergence history of the cost, V , for a To perturb points in homogeneous coordinates, we will oper-
single random trial. The left side shows the strong benefit of ate directly on the xyz components by writing
iterating over the solution, while the right side shows that the
cost converges to a lower value by keeping more terms in the p = p̄ + D ζ (75)
approximation of J −1 k (cases N = 2, 4, ∞ shown). It would where ζ ∈ R3 is the perturbation and D is a dilation matrix
seem that taking N = 4 for about seven iterations gains most of given by
the benefit, for this example. ⎡ ⎤
1 0 0
⎢0 1 0⎥
D := ⎣ ⎦. (76)
V. PROPAGATING UNCERTAINTY THROUGH A NONLINEAR 0 0 1
CAMERA MODEL 0 0 0
In estimation problems, we are often faced with passing un- We thus have that E[p] = p̄ and that
certain quantities through nonlinear measurement models to
produce expected measurements. Typically, this is carried out E[(p − p̄)(p − p̄)T ] = D E[ζζ T ] DT (77)
via linearization [35]. Sibley [36] shows how to carry out a with no approximation.
second-order propagation for a stereo camera model account-
ing for landmark uncertainty but not pose uncertainty. Here, we B. Taylor-Series Expansion of a Camera Model
derive the full second-order expression for the mean (and co-
variance) and compare this with Monte Carlo, the sigmapoint It is common to linearize a nonlinear observation model for
transformation, and linearization. We begin by discussing our use in pose estimation. In this section, we show how to do a
representation of points and then present the Taylor-series ex-
pansion of the measurement (camera) model followed by an 7 The  operator for 4 × 1 columns is similar to the  operator defined by
experiment. Furgale [17], which did not have the negative sign.
688 IEEE TRANSACTIONS ON ROBOTICS, VOL. 30, NO. 3, JUNE 2014

more general Taylor-series expansion of such a model and work j is an index over the J rows of f (·), and 1j is the jth column
out the second-order case in detail. Our camera model will be of the J × J identity matrix. The Jacobian of f (·) is F, and the
Hessian of the jth row fj (·) is F j .
y = f (Tp) (78)
If we only care about the first-order perturbation, we simply
where T is the pose of the camera, and p is the position of have
a landmark (as a homogeneous point). The nonlinear function
f (·) maps homogeneous points in the camera frame Tp to mea- f (Tp) = h + H θ (90)
surements y. Our task will be to pass a Gaussian representation where h and H are unchanged.
of the pose and landmark, given by {T, p, Ξ}, where Ξ is a These perturbed measurement equations can then be used
9 × 9 covariance for both quantities, through the camera model within any estimation scheme we like; in the next section, we
to produce a mean and covariance for the measurement {y, R}. will use these with a stereo camera model to show the benefit of
We can think of this as the composition of two nonlinearities, the second-order terms.
one to transfer the landmark into the camera frame and one
to produce the observations. We will treat each one in turn. If
C. Propagating Gaussian Uncertainty Through the Camera
we change the pose of the camera and/or the position of the
landmark a little bit, we have Suppose that the input uncertainties, embodied by θ, are zero-
mean, Gaussian
Tp = exp ξ ∧ T̄ (p̄ + D ζ)
  θ ∼ N (0, Ξ) (91)
1
≈ 1 + ξ ∧ + ξ ∧ ξ ∧ T̄ (p̄ + D ζ) (79)
2 where we note that in general there could be correlations be-
where we have kept the first two terms in the Taylor series for tween the pose T and the landmark p.
the pose perturbation. If we multiply out and continue to keep Then, to first order, our measurement is given by
only those terms that are second order or lower in ξ and ζ, we y1st = h + H θ (92)
have
and ȳ1st = E[y1st ] = h, since E[θ] = 0 by assumption. The
1 T
4
Tp ≈ g + G θ + θ G i θ 1i (80) (second-order) covariance associated with the first-order camera
2 i=1    model is given by
scalar
 
where 1i is the ith column of the 4 × 4 identity matrix, and R2nd = E (y1st − ȳ1st ) (y1st − ȳ1st )T = H Ξ HT . (93)
g := T̄p̄ (81)
For the second-order camera model, we have

G := [ T̄p̄ T̄D ] (82)
1 T
J
    y2nd = h + H θ + θ Hj θ 1j (94)
1i T̄p̄ 1i T̄D 2 j =1
G i := (83)
1
T
i T̄D 0 and consequently
 
1
ξ J
θ := . (84) ȳ2nd = E[y2nd ] = h + tr (Hj Ξ) 1j (95)
ζ
2 j =1
Arriving at these expressions requires repeated application of
which has an extra nonzero term as compared with the first-
the identities in the previous section.
order camera model. The larger the input covariance Ξ is, the
To then apply the nonlinear camera model, we use the chain
larger this term can become, depending on the nonlinearity. For
rule (for first and second derivatives) so that
a linear camera model, Hj = 0 and the second- and first-order
1 T
J camera model means are identical.
f (Tp) ≈ h + H θ + θ Hj θ 1j (85) We will also compute a (fourth-order) covariance, but with
2 j =1   
scalar just second-order terms in the camera model expansion. To do
correct to second order in θ, where this properly, we should expand the camera model to third order
as there is an additional fourth-order covariance term involving
h := f (g) (86) the product of first- and third-order camera-model terms; how-

∂f  ever, this would involve a complicated expression employing the
H := FG, F := (87)
∂g g third derivative of the camera model. As such, the approximate
fourth-order covariance we will use is given by

4  
Hj := GT F j G + 1Tj F 1i G i (88) R4th ≈ E (y2nd − ȳ2nd ) (y2nd − ȳ2nd )T
  
"⎛ J ⎞T
i=1
scalar
 1 
J 
∂ 2 fj  = H Ξ HT − tr (Hi Ξ) 1i ⎝ tr (Hj Ξ) 1j ⎠
F j := (89)
∂g ∂gT g 4 i=1 j =1
BARFOOT AND FURGALE: ASSOCIATING UNCERTAINTY WITH THREE-DIMENSIONAL POSES FOR USE IN ESTIMATION PROBLEMS 689

1   given by
J 9
+ Hik Hj m n (Ξk Ξm n
4 i,j =1 1
k , ,m ,n =1 f (p) = M p
p3
+ Ξk m Ξ n + Ξk n Ξ m)
where
where Hik l is the (k, )th element of Hi , and Ξk is the (k, )th ⎡
⎡ ⎤ ⎡ ⎤ b ⎤
element of Ξ. The first- and third-order terms in the covari- f1 p1 f 0 cu fu
⎢ u 2 ⎥
ance expansion are identically zero owing to the symmetry of ⎢f ⎥ ⎢p ⎥ ⎢ 0 fv cv 0 ⎥
the Gaussian density. The last term in the above makes use of f := ⎣ 2 ⎦, p := ⎣ 2 ⎦, M := ⎢
⎢ b⎥

f3 p3 ⎣ fu 0 cu −fu ⎦
Isserlis’ theorem for Gaussian variables f4 p4 2
0 fv cv 0
E[ξk ξ ξm ξn ] = E[ξk ξ ] E[ξm ξn ] + E[ξk ξm ] E[ξ ξn ]
and fu , fv are the horizontal, vertical focal lengths (in pixels),
+ E[ξk ξn ] E[ξ ξm ].
(cu , cv ) is the optical center of the images (in pixels), and b is
the separation between the cameras (in meters). The optical axis
D. Sigmapoint Method
of the camera is along the z-, or p3 -, direction.
Finally, we can also make use of the popular sigmapoint The Jacobian of this measurement model is given by
transformation [29] to pass uncertainty through the nonlinear ⎡ p1 ⎤
camera model. As in the pose compounding problem, we tai- 1 0 − 0
⎢ p3 ⎥
lor this to our specific type of SE(3) perturbation. We begin ⎢ p2 ⎥
∂f ⎢
1 0 1 − 0⎥
by approximating the input Gaussian using a finite number of =M ⎢ p ⎥
p3 ⎢ ⎥
3
samples {T , p } ∂p ⎢0 0
⎣ 0 0⎥⎦
SST := Ξ, (Cholesky decomposition) p4
0 0 − 1
p3
θ := 0
√ and the Hessian is given by
θ := L + κ col S, = 1...L ⎡ ⎤
√ 0 0 −1 0
θ +L := − L + κ col S, = 1...L ⎢ 0 0 0 0 ⎥
  ∂ 2 f1 fu ⎢⎢ −1 2p1 + bp4 ⎥
ξ = 0 − 2b ⎥
:= θ ∂p∂pT p23 ⎢
⎣ p3 ⎥

ζ b
00 − 0
T := exp ξ ∧ T̄ 2
⎡ ⎤
p := p̄ + D ζ 0 0 0 0
∂ 2 f2 ∂ 2 f4 fv ⎢⎢0 0 −1 0 ⎥ ⎥
where κ is a user-definable constant,8 and L = 9. We then pass = = ⎢ 2p 2
0⎥
∂p∂pT ∂p∂pT p23 ⎣ 0 −1 ⎦
each of these samples through the nonlinear camera model p3
0 0 0 0
y = f (T p ) , = 0 . . . 2L. ⎡ ⎤
0 0 −1 0
These are combined to create the output mean and covariance ⎢ 0 0 0 0⎥
according to ∂ 2 f3 fu ⎢
⎢ −1 0 2p1 − bp4 b ⎥

= ⎢
  ∂p∂p T 2
p3 ⎣ p3 2⎥ ⎦
1
2L
1 b
ȳsp = κ y0 + y 0 0 0
L+κ 2 2
=1
 where we have shown each component separately.
1
Rsp = κ (y0 − ȳsp )(y0 − ȳsp )T
L+κ
F. Camera Experiment

1
2L
+ (y − ȳsp )(y − ȳsp )T . We used the following methods to pass a Gaussian uncertainty
2 on camera pose and landmark position through the nonlinear
=1
stereo camera model.
The next section will provide the details for a specific nonlinear
1) Monte Carlo: We drew a large number M = 1000 000
camera model f (·) representing a stereo camera.
of random samples from the input distribution, passed
these through the camera model, and then computed the
E. Stereo Camera Model
mean ȳm c and covariance Rm c . This slow-but-accurate
To demonstrate the propagation of uncertainty through a non- approach served as our benchmark to which the other
linear measurement model, f (·), we will employ a stereo camera three much faster methods were compared.
2) First/Second Order: We used the first-order camera model
8 For all experiments in this paper, we used κ = 0. to compute ȳ1st and R2nd , as described previously.
690 IEEE TRANSACTIONS ON ROBOTICS, VOL. 30, NO. 3, JUNE 2014

Fig. 7. Results from the stereo camera experiment (see Section V-F). (Left)
Mean and (right) covariance errors εm e a n and εc ov for three methods of passing
a Gaussian uncertainty through a nonlinear stereo camera model, as compared
with Monte Carlo. The parameter α scales the magnitude of the input covariance
matrix.
Fig. 8. Results from the stereo camera experiment (see Section V-F). A portion
of the left image of a stereo camera showing the mean and covariance (as a
3) Second/Fourth Order: We used the second-order camera one-standard-deviation ellipse) for four methods of imaging a landmark with
Gaussian uncertainty on the camera’s pose and the landmark’s position. This
model to compute ȳ2nd and R4th , as described previously. case corresponds to the α = 1 datapoint in Fig. 7.
4) Sigmapoint: We used the sigmapoint method that has been
described previously to compute ȳsp and Rsp .
The camera parameters were covariance ellipses shown for all techniques. We see that the
sigmapoint technique does an excellent job on both the mean
b = 0.25 m, fu = fv = 200 pixels, cu = cv = 0 pixels. and the covariance, while the others do not fare as well.
We used the camera pose T := 1 and let the landmark be located We do not believe there has been another comparison of
at p := [ 10 10 10 1 ]T . For the combined pose/landmark these methods of propagating uncertainty through a nonlinear
uncertainty, we used an input covariance of camera model with uncertainty on the camera pose and landmark
  position, the closest being the work of Sibley [36].
1 1 1 1 1 1
Ξ := α × diag , , , , , , 1, 1, 1
10 10 10 100 100 100 VI. CONCLUSION
where α ∈ [0, 1] is a scaling parameter that allowed us to para- We have presented some generic techniques (and provided
metrically increase the magnitude of the uncertainty. accompanying MATLAB scripts9 ) to associate uncertainty with
To gauge the performance, we evaluated both the mean and 3-D pose (and landmark) variables and shown how to use these
covariance of each method by comparing the results to those of in three worked examples:
the Monte Carlo simulation according to the following metrics: 1) compounding two poses with associated uncertainties (to
 fourth order in our noise variables or second order in the
εm ean := (ȳ − ȳm c )T (ȳ − ȳm c ) associated covariances);
 2) fusing multiple uncertain estimates of a pose (iteratively,
εcov := tr ((R − Rm c )T (R − Rm c )) to arbitrary order);
3) propagating uncertainty through a nonlinear camera model
where the latter is the Frobenius norm.
(to fourth order in our noise variables or second order in
Fig. 7 shows the two performance metrics, εm ean and εcov ,
the associated covariances).
for each of the three techniques over a wide range of noise
The general outcome is that depending on the application, dif-
scalings α. We see that the sigmapoint technique does the best
ferent methods have advantages, with the higher-order methods
on both mean and covariance. The second-order technique does
always doing better than the lower ones. The choice of whether
reasonably well on the mean, but the corresponding fourth-
to use a sigmapoint method to propagate uncertainty depends on
order technique does poorly on the covariance (because of our
inability to compute a fully fourth-order-accurate covariance, as
explained earlier). 9 An accompanying set of scripts to implement many of the key equa-
Fig. 8 provides a snapshot of a portion of the left image of tions and regenerate all of the plots in the paper is downloadable from
the stereo camera with the mean and one-standard-deviation http://asrl.utias.utoronto.ca/code/
BARFOOT AND FURGALE: ASSOCIATING UNCERTAINTY WITH THREE-DIMENSIONAL POSES FOR USE IN ESTIMATION PROBLEMS 691

the application: no for pose compounding but yes to propagate ∞


Bn
J−1 = φ∧
n
uncertainty through a nonlinear camera model. n!
The contributions of this paper are both the specific exam- n =0
 
ples as well as the detailed notation and identities to manipulate φ φ φ φ φ
poses and associated uncertainties. Our use of the BCH for- = cot 1 + 1 − cot aaT − a∧ . (99)
2 2 2 2 2
mula in these manipulations, particularly our use of (29) and
the tangible connection to the SE(3) Jacobian, is novel; this is Similar closed-form expressions can be found in [21] and [38].
important because it allows us to avoid unnecessarily introduc- We can also compute the Jacobian for SE(3) according to
ing the concept of Lie derivatives, and instead, we can simply  1 ∞
  
1 J Q
ξ ≡
n
manipulate perturbations representing noise variables. We be- J := T α dα ≡ (100)
0 (n + 1)! 0 J
lieve our comparison of the sigmapoint transformation to the n =0

Taylor-expansion methods to be new as well. Finally, the ap- where


pendix contains a few previously unpublished tidbits including  
∧  C (Jρ)∧ C
a closed-form expression for the SE(3) Jacobian in terms of all T = Ad (T) = exp ad ξ = exp ξ = .
0 C
of its constituent blocks. (101)
We have been using these methods in several bundle- The closed-form expression on the right can be populated using
adjustment and pose-graph optimization problems for the past J above and
several years with good success. Looking forward, we believe ∞  ∞
these techniques could find application in other problems re-  1
φ∧ ρ∧ φ∧
n m
Q=
quiring detailed bookkeeping of pose uncertainties and, thus, (n + m + 2)!
n =0 m =0
hope others will find them useful.
1 ∧ φ − sin φ ∧ ∧
= ρ + φ ρ + ρ∧ φ∧ + φ∧ ρ∧ φ∧
2 φ3
APPENDIX φ2
1− − cos φ ∧ ∧ ∧
This Appendix contains additional notation and useful ex- − 2
φ φ ρ + ρ∧ φ∧ φ∧ − 3φ∧ ρ∧ φ∧
φ4
pressions for implementation of key expressions in this paper. "
2 3
1 1 − φ2 − cos φ φ − sin φ − φ6
− −3
2 φ4 φ5
A. Useful Closed-Form Expressions
The matrix exponential to build a transformation can be eval- × φ∧ ρ∧ φ∧ φ∧ + φ∧ φ∧ ρ∧ φ∧ . (102)
uated as
To the best of our knowledge, this last expression does not
∞   appear in the previous literature. The inverse of J is simply
 1 ∧ C Jρ
T = exp ξ ∧ = ξ
n
= (96) ∞  −1 
n! 0T 1 Bn  n J −J−1 QJ−1
n =0 J −1 = ξ ≡ . (103)
n! 0 J−1
n =0
where the rightmost expression can be computed in closed form.
ρ Bullo and Murray [39, eq. (2.21)] also discuss J −1 , pointing
To do so, we use the components of ξ = [ φ ] to compute the out that the two diagonal blocks are indeed J−1 but do not work
rotation matrix C ∈ SO(3) out the details of top-right block, which amounts to knowing the
details of Q.
∞
1
C := exp φ∧ = φ∧
n
n! B. Converting Between ξ and T
n =0
The detailed steps to convert (in closed form) between a
= cos φ 1 + (1 − cos φ)aaT + sin φ a∧ (97)
ξ ∈ R6 and a T ∈ SE(3) are provided as follows.
1) From ξ to T:
where φ = φ is the angle of rotation, and a = φ/φ is the axis a) Deconstruct ξ = [ φρ
] into ρ and φ.
of rotation. We also compute b) Using φ, compute C and J according to (97) and
(98).
 ∞

1
1 c) Using C, J, and ρ, construct T = [ 0CT Jρ 1 ].
φ∧
n
J := Cα dα =
0 n =0
(n + 1)! We have exactly that T = exp ξ ∧ .
  2) From T to ξ:
sin φ sin φ 1 − cos φ ∧ a) Deconstruct T = [ 0CT 1r ] into C and r.
= 1+ 1− aaT + a (98)
φ φ φ b) Using C, compute φ. This can be done by
i) computing the rotation axis a as the eigenvec-
which is the (left) Jacobian of SO(3). The inverse of C is simply tor corresponding to a unit eigenvalue of C
C−1 = CT , and the inverse of J is given by (since Ca = a);
692 IEEE TRANSACTIONS ON ROBOTICS, VOL. 30, NO. 3, JUNE 2014

ii) solving for the rotation angle φ in tr(C) = (T a ξ b ) ≡ T a ξ  −1


b Ta (109)
2 cos φ + 1 [check for the correct sign by plug- ∧
ging φ and a back into (97)]; exp (T a ξ b ) ≡ Ta exp ξ ∧b T−1
a (110)

iii) letting φ = φa. exp (T a ξ b ) ≡ T a exp ξ
b T −1
a (111)
c) Using φ, compute J−1 according to (99).
d) Using J−1 and r, compute ρ = J−1 r. Ad ξ ∧b Ta ≡ ξ  b Ta (112)
e) Using ρ and φ, construct ξ = [ φ ρ
].  ∧ ∧ ∧
ξ a , ξ b = ξ ∧a ξ ∧b − ξ ∧b , ξ ∧a ≡ ξ 
a ξb (113)

We have exactly that ξ = ln (T) .    
ξa , ξb = ξ   
a ξb − ξb , ξa ≡ ξa ξb

(114)
∧ ∧
C. Proof that Ad exp ξ ≡ exp ad ξ
where ξ a , ξ b ∈ R6 and Ta = exp ξ ∧a , T a = exp ξ 
a ∈
We were unable to find this direct proof in the literature and SE(3).
therefore provide it. Starting from the right-hand side, we have
∞ ACKNOWLEDGMENT
1 
exp ad ξ ∧ = exp ξ  =
n
ξ
n =0
n! The authors would like to thank Prof. F. Dellaert at Georgia
∞  n   Tech and H. Sommer at ETH for many useful discussions during
 1 φ∧ ρ∧ C K the preparation of this paper.
= = (104)
n! 0 φ∧ 0 C
n =0
REFERENCES
where C is the usual expression in (97), and

∞  [1] D. C. Brown, “A solution to the general problem of multiple station
 1 analytical stereotriangulation,” Patrick Air Force Base, Florida, RCA-
φ∧ ρ∧ φ∧
n m
K := MTP Data Reduction Tech. Rep. 43 (or AFMTC TR 58-8), 1958.
(n + m + 1)!
n =0 m =0 [2] R. M. Murray, Z. Li, and S. Sastry, A Mathematical Introduction to
Robotic Manipulation. Boca Raton, FL, USA: CRC, 1994.
which can be found through careful manipulation. Starting from [3] R. Hartley and A. Zisserman, Multiple View Geometry in Computer Vision.
the left-hand side, we have Cambridge, U.K.: Cambridge Univ. Press, 2000.
    [4] J. Stillwell, Naive Lie Theory. New York, NY, USA: Springer-Verlag,
C Jρ C (Jρ)∧ C
Ad exp ξ ∧ = Ad = 2008.
0T 1 0 C [5] R. Brooks, “Visual map making for a mobile robot,” in Proc. IEEE Int.
(105) Conf. Robot. Autom., Mar. 1985, vol. 2, pp. 824–829.
[6] R. C. Smith and P. Cheeseman, “On the representation and estimation of
where J is given in (98). Comparing (104) and (105), what spatial uncertainty,” Int. J. Robot. Res., vol. 5, no. 4, pp. 56–68, 1986.
remains to be shown is that K = (Jρ)∧ C. To see this, we use [7] H. F. Durrant-Whyte, “Uncertain geometry in robotics,” IEEE J. Robot.
the following sequence of manipulations: Autom., vol. 4, no. 1, pp. 23–31, Feb. 1988.
[8] R. C. Smith, M. Self, and P. Cheeseman, “Estimating uncertain spa-
 1 ∧  1 tial relationships in robotics,” in Autonomous Robot Vehicles, I. J. Cox
(Jρ)∧ C = Cα dα ρ C = (Cα ρ)∧ C dα and G. T. Wilfong, Eds. New York, NY, USA: Springer-Verlag, 1990,
0 0 pp. 167–193.
 1  1
[9] H. Durrant-Whyte and T. Bailey, “Simultaneous localisation and mapping
(SLAM): Part I the essential algorithms,” IEEE Robot. Autom. Mag.,
= Cα ρ∧ C1−α dα = exp αφ∧ ρ∧ exp (1 − α)φ∧ dα vol. 11, no. 3, pp. 99–110, Jun. 2006.
0 0 [10] G. S. Chirikjian, Stochastic Models, Information Theory, and Li Groups:
 ∞
" ∞
" Classical Results and Geometric Methods. vol. 1, New York, NY, USA:
1  1  1
αφ∧ ∧
(1−α)φ∧
n m Birkhauser, 2009.
= ρ dα [11] G. S. Chirikjian, Stochastic Models, Information Theory, and Li Groups:
0 n =0
n! m =0
m!
Analytic Methods and Modern Applications. vol. 2, New York, NY,
 ∞
∞   1  USA: Birkhauser, 2009.
1
αn (1−α)m dα φ∧ ρ∧ φ∧
n m [12] S. F. Su and C. S. G. Lee, “Uncertainty manipulation and propagation and
= verification of applicability of actions in assembly tasks,” in Proc. IEEE
n =0 m =0
n! m! 0
Int. Conf. Robot. Autom., 1991, vol. 3, pp. 2471–2476.
[13] S. F. Su and C. S. G. Lee, “Manipulation and propagation of uncertainty
where we have used that ∧ is linear and that (Cu)∧ = Cu∧ CT .
.1 and verification of applicability of actions in assembly tasks,” IEEE Trans.
We can show that 0 αn (1 − α)m dα = (n +m n! m!
+1)! (after several
Syst., Man Cybern., vol. 22, no. 6, pp. 1376–1389, Nov./Dec. 1992.
[14] P. Smith, T. Drummond, and K. Roussopoulos, “Computing MAP trajec-
integrations by parts), and therefore, K ≡ (Jρ)∧ C, concluding tories by representing, propagating, and combining PDFs over groups,” in
the proof. Proc. IEEE Int. Conf. Comput. Vis., 2003, pp. 1275–1282.
[15] C. Hertzberg, R. Wagner, U. Frese, and L. Schröder, “Integrating generic
sensor fusion algorithms with sound state representations through encap-
D. Additional Useful Identities sulation of manifolds,” Inf. Fusion, vol. 14, no. 1, pp. 57–77, 2013.
[16] S. Sastry, Nonlinear Systems: Analysis, Stability, and Control. New
Some more useful identities for SE(3) and se(3) are the York, NY, USA: Springer-Verlag, 1999.
following: [17] P. T. Furgale, “Extensions to the visual odometry pipeline for the explo-
ration of planetary surfaces” Ph.D. dissertation, Dept. Aerosp. Eng., Univ.
ξ
a ξa ≡ 0 (106) Toronto, Toronto, ON, Canada, 2011.
[18] P. C. Hughes, Spacecraft Attitude Dynamics. New York, NY, USA: Wi-
ξ 
a ξ b ≡ −ξ b ξ a (107) ley, 1986.
[19] M. D. Shuster, “A survey of attitude representations,” J. Astronaut. Sci.,

(T a ξ b ) ≡ Ta ξ ∧b T−1
a (108) vol. 41, no. 4, pp. 439–517, 1993.
BARFOOT AND FURGALE: ASSOCIATING UNCERTAINTY WITH THREE-DIMENSIONAL POSES FOR USE IN ESTIMATION PROBLEMS 693

[20] H. McKean, Stochastic Integrals. New York, NY, USA: Academic, [38] F. C. Park, J. E. Bobrow, and S. R. Ploen, “A Lie group formulation of
1969. robot dynamics,” Int. J. Robot. Res., vol. 14, pp. 609–618, 1995.
[21] F. C. Park, “The optimal kinematic design of mechanisms” Ph.D. disser- [39] F. Bullo and R. M. Murray, “Proportional derivative control on the Eu-
tation, Harvard Univ., Cambridge, MA, USA, 1991. clidean group,” in Proc. Eur. Control Conf., 1995, pp. 1091–1097.
[22] G. M. T. D’Eleuterio, “Multibody dynamics for space station manipu-
lators: Recursive dynamics of topological chains,” Dynacon Enterprises
Ltd., Mississauga, ON, Canada, Tech. Rep. SS-3, Jun. 1985
[23] G. M. T. D’Eleuterio, “Dynamics of an elastic multibody chain: Part C—
Recursive dynamics,” Dyn. Stabil. Syst., vol. 7, no. 2, pp. 61–89, 1992.
[24] T. Lee, M. Leok, and N. H. McClamroch, “Global symplectic uncertainty
propagation on SO(3),” in Proc. 47th IEEE Conf. Decision Control, 2008, Timothy D. Barfoot (M’10) received the Ph.D.
pp. 61–66. degree from University of Toronto, Toronto, ON,
[25] Y. Wang and G. S. Chirikjian, “Error propagation on the Euclidean group Canada, in 2002.
with applications to manipulator kinematics,” IEEE Trans. Robot., vol. 22, He currently leads the Autonomous Space
no. 4, pp. 591–602, Aug. 2006. Robotics Lab, University of Toronto, which develops
[26] Y. Wang and G. S. Chirikjian, “Nonparametric second-order theory of methods to allow mobile robots to operate in large-
error propagation on motion groups,” Int. J. Robot. Res., vol. 27, no. 11, scale, unstructured, 3-D environments, using rich on-
pp. 1258–1273, 2008. board sensing (e.g., cameras and laser rangefinders)
[27] K. Wolfe, M. Mashner, and G. Chirikjian, “Bayesian fusion on Lie and computation. He is also an Associate Professor
groups,” J. Algebr. Statist., vol. 2, no. 1, pp. 75–97, 2011. with the University of Toronto Institute for Aerospace
[28] S. Klarsfeld and J. A. Oteo, “The Baker-Campbell-Hausdorff formula and Studies, where he holds the Canada Research Chair
the convergence of the Magnus expansion,” J. Phys. A: Math. Gen., vol. 22, (Tier II) in Autonomous Space Robotics and works in the area of guidance,
pp. 4565–4572, 1989. navigation, and control of mobile robots for space and terrestrial applications.
[29] S. Julier and J. Uhlmann, “A general method for approximating nonlinear Prior to his current position, he spent four years at MDA Space Missions, where
transformations of probability distributions,” Robotics Res. Group, Univ. he developed autonomous vehicle navigation technologies for both planetary
Oxford, Oxford, U.K., Tech. Rep., 1996 rovers and terrestrial applications such as underground mining.
[30] J. Brookshire and S. Teller, “Extrinsic calibration from per-sensor ego- Dr. Barfoot is an Ontario Early Researcher Award holder and a licensed
motion,” presented at the Robot.: Sci. Syst. Conf., Sydney, Australia, Jul. Professional Engineer in the Province of Ontario.
2012.
[31] A. W. Long, K. C. Wolfe, M. J. Mashner, and G. S. Chirikjian, “The ba-
nana distribution is Gaussian: A localization study with exponential co-
ordinates,” presented at the Robot.: Sci. Syst. Conf., Sydney, Australia,
2012.
[32] G. Sibley, C. Mei, I. Reid, and P. Newman, “Vast scale outdoor navigation
using adaptive relative bundle adjustment,” Int. J. Robot. Res., vol. 29,
no. 8, pp. 958–980, Jul. 2010. Paul T. Furgale (M’11) received the B.A.Sc. de-
[33] P. Mahalanobis, “On the generalized distance in statistics,” in Proc. Nat. gree in computer science from the University of
Inst. Sci., 1936, vol. 2, pp. 49–55. Manitoba, Winnipeg, MB, Canada, in 2006 and the
[34] H. Strasdat, J. M. M. Montiel, and A. Davison, “Scale drift-aware large Ph.D. degree from the University of Toronto Institute
scale monocular SLAM,” presented at the Robot.: Sci. Syst. Conf., for Aerospace Studies, Toronto, ON, Canada, 2011.
Zaragoza, Spain, Jun. 2010. He is currently the Deputy Director with the Au-
[35] L. Matthies and S. A. Shafer, “Error modeling in stereo navigation,” IEEE tonomous Systems Lab, Swiss Federal Institute of
J. Robot. Autom., vol. RA-3, no. 3, pp. 239–248, Jun. 1987. Technology, Zurich, Switzerland, where he is the sci-
[36] G. Sibley, “Long range stereo data-fusion from moving platforms” Ph.D. entific coordinator of the European Project V-Charge.
dissertation, Dept. Comput. Sci., Univ. Southern California, Los Angeles, His research interests include state estimation, sen-
CA, USA, 2007. sor fusion, and calibration for complicated real-world
[37] W. Triggs, P. McLauchlan, R. Hartley, and A. Fitzgibbon, “Bundle adjust- robotic systems.
ment: A modern synthesis,” in Vision Algorithms: Theory and Practice
(LNCS series), W. Triggs, A. Zisserman, and R. Szeliski, Eds. New
York, NY, USA: Springer-Verlag, 2000, pp. 298–375.

You might also like