A Micro Lie Theory For State Estimation in Robotics

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

1

A micro Lie theory


for state estimation in robotics
Joan Solà, Jeremie Deray, Dinesh Atchuthan

Abstract—A Lie group is an old mathematical abstract object ⌧1 X3


dating back to the XIX century, when mathematician Sophus Lie log(X3 )
laid the foundations of the theory of continuous transformation
groups. Its influence has spread over diverse areas of science and vt
arXiv:1812.01537v9 [cs.RO] 8 Dec 2021

technology many years later. In robotics, we are recently expe- TE M


riencing an important trend in its usage, at least in the fields of exp(⌧1 ) ⌧2
E
estimation, and particularly in motion estimation for navigation.
Yet for a vast majority of roboticians, Lie groups are highly exp(vt)
abstract constructions and therefore difficult to understand and
to use. exp(⌧2 )
M
In estimation for robotics it is often not necessary to exploit
the full capacity of the theory, and therefore an effort of selection
of materials is required. In this paper, we will walk through the
most basic principles of the Lie theory, with the aim of conveying Figure 1. Representation of the relation between the Lie group and the Lie
algebra. The Lie algebra TE M (red plane) is the tangent space to the Lie
clear and useful ideas, and leave a significant corpus of the Lie
group’s manifold M (here represented as a blue sphere) at the identity E.
theory behind. Even with this mutilation, the material included Through the exponential map, each straight path vt through the origin on
here has proven to be extremely useful in modern estimation the Lie algebra produces a path exp(vt) around the manifold which runs
algorithms for robotics, especially in the fields of SLAM, visual along the respective geodesic. Conversely, each element of the group has
odometry, and the like. an equivalent in the Lie algebra. This relation is so profound that (nearly)
Alongside this micro Lie theory, we provide a chapter with all operations in the group, which is curved and nonlinear, have an exact
a few application examples, and a vast reference of formulas equivalent in the Lie algebra, which is a linear vector space. Though the
for the major Lie groups used in robotics, including most sphere in R3 is not a Lie group (we just use it as a representation that can be
Jacobian matrices and the way to easily manipulate them. We drawn on paper), that in R4 is, and describes the group of unit quaternions
—see Fig. 4 and Ex. 5.
also present a new C++ template-only library implementing all
the functionality described here.

and/or other modifications of bodies or reference frames. The


I. I NTRODUCTION origin frame may be identified with the group’s identity, and
There has been a remarkable effort in the last years in any other point on the manifold represents a certain ‘local’
the robotics community to formulate estimation problems frame. By resorting to these analogies, many mathematical
properly. This is motivated by an increasing demand for abstractions of the LT can be brought closer to intuitive
precision, consistency and stability of the solutions. Indeed, notions in vector spaces, geometry, kinematics, and other more
proper modeling of the states and measurements, the functions classical fields.
relating them, and their uncertainties, is crucial to achieving Lie theory is by no means simple. To grasp a minimum
these goals. This has led to designs involving what has been idea of what LT can be, we may consider the following
known as ‘manifolds’, which in this context are no less three references. First, Abbaspour’s “Basic Lie theory” [1]
than the smooth topologic surfaces of the Lie groups where comprises more than 400 pages. With a similar title, Howe’s
the state representations evolve. Relying on the Lie theory “Very basic Lie theory” [2] comprises 24 (dense) pages, and
(LT) we are able to construct a rigorous calculus corpus to is sometimes considered a must-read introduction. Finally,
handle uncertainties, derivatives and integrals with precision the more modern and often celebrated Stillwell’s “Naive
and ease. Typically, these works have focused on the well- Lie theory” [3] comprises more than 200 pages. With such
known manifolds of rotation SO(3) and rigid motion SE(3). precedents labeled as ‘basic’, ‘very basic’ and ‘naive’, the aim
When being introduced to Lie groups for the first time, it is of this paper at merely 17 pages is to simplify Lie theory even
important to try to regard them from different points of view. more (thus our adjective ‘micro’ in the title). This we do in
The topological viewpoint, see Fig. 1, involves the shape of two ways. First, we select a small subset of material from
the manifold and conveys powerful intuitions of its relation the LT. This subset is so small that it merely explores the
to the tangent space and the exponential map. The algebraic potential of LT. However, it appears very useful for uncertainty
viewpoint involves the group operations and their concrete management in the kind of estimation problems we deal with
realization, allowing the exploitation of algebraic properties in robotics (e.g. inertial pre-integration, odometry and SLAM,
to develop closed-form formulas or to simplify them. The visual servoing, and the like), thus enabling elegant and
geometrical viewpoint, particularly useful in robotics, asso- rigorous designs of optimal optimizers. Second, we explain
ciates group elements to the position, velocity, orientation, it in a didactical way, with plenty of redundancy so as to
2

reduce the entry gap to LT even more, which we believe is TX M


still needed. That is, we insist on the efforts in this direction Ẋ
TX M
of, to name a paradigmatic title, Stillwell’s [3], and provide X X
yet a more simplified version. The main text body is generic,
though we try to keep the abstraction level to a minimum. M M

Inserted examples serve as a grounding base for the general


concepts when applied to known groups (rotation and motion
matrices, quaternions, etc.). Also, plenty of figures with very Figure 2. A manifold M and the vector space TX M (in this case ∼ = R2 )
tangent at the point X , and a convenient side-cut. The velocity element, Ẋ =
verbose captions re-explain the same concepts once again. We ∂X /∂t, does not belong to the manifold M but to the tangent space TX M.
put special attention to the computation of Jacobians (a topic
that is not treated in [3]), which are essential for most optimal
estimators and the source of much trouble when designing and we believe they make the understanding of the LT and the
new algorithms. We provide a chapter with some applicative manipulation of its tools easier.
examples for robot localization and mapping, implementing This paper is accompanied by a new open-source C++
EKF and nonlinear optimization algorithms based on LT. And header-only library, called manif [7], which can be found
finally, several appendices contain ample reference for the at https://github.com/artivis/manif. manif implements the
most relevant details of the most commonly used groups widely used groups SO(2), SO(3), SE(2) and SE(3), with
in robotics: unit complex numbers, quaternions, 2D and 3D support for the creation of analytic Jacobians. The library is
rotation matrices, 2D and 3D rigid motion matrices, and the designed for ease of use, flexibility, and performance.
trivial translation groups.
Yet our most important simplification to Lie theory is in II. A MICRO L IE T HEORY
terms of scope. The following passage from Howe [2] may
serve us to illustrate what we leave behind: “The essential A. The Lie group
phenomenon of Lie theory is that one may associate in a The Lie group encompasses the concepts of group and
natural way to a Lie group G its Lie algebra g. The Lie algebra smooth manifold in a unique body: a Lie group G is a smooth
g is first of all a vector space and secondly is endowed with manifold whose elements satisfy the group axioms. We briefly
a bilinear nonassociative product called the Lie bracket [...]. present these two concepts before joining them together.
Amazingly, the group G is almost completely determined by g On one hand, a differentiable or smooth manifold is a
and its Lie bracket. Thus for many purposes one can replace topological space that locally resembles linear space. The
G with g. Since G is a complicated nonlinear object and g reader should be able to visualize the idea of manifold (Fig. 2):
is just a vector space, it is usually vastly simpler to work it is like a curved, smooth (hyper)-surface, with no edges or
with g. [...] This is one source of the power of Lie theory.” spikes, embedded in a space of higher dimension. In robotics,
In [3], Stillwell even speaks of “the miracle of Lie theory”. we say that our state vector evolves on this surface, that is, the
In this work, we will effectively relegate the Lie algebra to manifold describes or is defined by the constraints imposed on
a second plane in favor of its equivalent vector space Rn , the state. For example, vectors with the unit norm constraint
and will not introduce the Lie bracket at all. Therefore, the define a spherical manifold of radius one. The smoothness of
connection between the Lie group and its Lie algebra will not the manifold implies the existence of a unique tangent space
be made here as profound as it should. Our position is that, at each point. This space is a linear or vector space on which
given the target application areas that we foresee, this material we are allowed to do calculus.
is often not necessary. Moreover, if included, then we would On the other hand, a group (G, ◦) is a set, G, with a
fail in the objective of being clear and useful, because the composition operation, ◦, that, for elements X , Y, Z ∈ G,
reader would have to go into mathematical concepts that, by satisfies the following axioms,
their abstraction or subtleness, are unnecessarily complicated.
Our effort is in line with other recent works on the sub- Closure under ‘◦’ : X ◦ Y ∈ G (1)
ject [4], [5], [6], which have also identified this need of Identity E : E ◦ X = X ◦ E = X (2)
bringing the LT closer to the roboticist. Our approach aims Inverse X −1 : X −1 ◦ X = X ◦ X −1 = E (3)
at appearing familiar to the target audience of this paper: an Associativity : (X ◦ Y) ◦ Z = X ◦ (Y ◦ Z) . (4)
audience that is skilled in state estimation (Kalman filtering,
graph-based optimization, and the like), but not yet familiar In a Lie group, the manifold looks the same at every point
with the theoretical corpus of the Lie theory. We have for this (like e.g. in the surface of a sphere, see Exs. 1 and 2), and
taken some initiatives concerning notation, especially in the therefore all tangent spaces at any point are alike. The group
definition of the derivative, bringing it close to the vectorial structure imposes that the composition of elements of the
counterparts, thus making the chain rule clearly visible. As manifold remains on the manifold, (1), and that each element
said, we opted to practically avoid the material proper to the has an inverse also in the manifold, (3). A special one of
Lie algebra, and prefer instead to work on its isomorphic tan- these elements is the identity, (2), and thus a special one of
gent vector space Rn , which is where we ultimately represent the tangent spaces is the tangent at the identity, which we call
uncertainty or (small) state increments. All these steps are the Lie algebra of the Lie group. Lie groups join the local
undertaken with absolutely no loss in precision or exactness, properties of smooth manifolds, allowing us to do calculus,
3

exp
S1 i log S1 z ✓ S3 q ✓ S3 q S3 q ✓
z z = x exp(i✓) ✓
✓ i✓ = log(x⇤ z) p
x
1 1
z = exp(i✓) q = exp(u✓) q=p ✓
i✓ = log(z) Tx S 1 ⇠
=R u✓ = log(q) ✓=q p ⇠ 3
=R
T1 S 1 = iR ⇠
=R
Hp ⇠
= R3 Hp ⇠
= R3

Figure 3. The S 1 manifold is a unit circle (blue) in the plane C, where the unit
complex numbers z∗ z = 1 live. The Lie algebra s1 = TE S 1 is the line of Figure 4. The S 3 manifold is a unit 3-sphere (blue) in the 4-space of
imaginary numbers iR (red), and any tangent space T S 1 is isomorphic to the quaternions H, where the unit quaternions q∗ q = 1 live. The Lie algebra
line R (red). Tangent vectors (red segment) wrap the manifold creating the arc is the space of pure imaginary quaternions ix + jy + kz ∈ Hp , isomorphic
of circle (blue arc). Mappings exp and log (arrows) map (wrap and unwrap) to the hyperplane R3 (red grid), and any other tangent space T S 3 is also
elements of iR to/from elements of S 1 (blue arc). Increments between unit isomorphic to R3 . Tangent vectors (red segment) wrap the manifold over the
complex numbers are expressed in the tangent space via composition and the great arc or geodesic (dashed). The centre and right figures show a side-cut
exponential map (and we will define special operators ⊕, for this). See the through this geodesic (notice how it resembles S 1 in Fig. 3). Mappings exp
text for explanations, and Fig. 4 for a similar group. and log (arrows) map (wrap and unwrap) elements of Hp to/from elements of
S 3 (blue arc). Increments between quaternions are expressed in the tangent
space via the operators ⊕, (see text).
Example 1: The unit complex numbers group S 1
Example 2: The unit quaternions group S 3
Our first example of Lie group, which is the easiest to
visualize, is the group of unit complex numbers under A second example of Lie group, which is also relatively
complex multiplication (Fig. 3). Unit complex numbers easy to visualize, is the group of unit quaternions under
take the form z = cos θ + i sin θ. quaternion multiplication (Fig. 4). Unit quaternions take
– Action: Vectors x = x + iy rotate in the plane by an the form q = cos(θ/2) + u sin(θ/2), with u = iux +
angle θ, through complex multiplication, x0 = z x. juy + kuz a unitary axis and θ a rotation angle.
– Group facts: The product of unit complex numbers is – Action: Vectors x = ix + jy + kz rotate in 3D space
a unit complex number, the identity is 1, and the inverse by an angle θ around the unit axis u through the double
is the conjugate z∗ . quaternion product x0 = q x q∗ .
– Manifold facts: The unit norm constraint defines the – Group facts: The product of unit quaternions is a
unit circle in the complex plane (which can be viewed as unit quaternion, the identity is 1, and the inverse is the
the 1-sphere, and hence the name S 1 ). This is a 1-DoF conjugate q∗ .
curve in 2-dimensional space. Unit complex numbers – Manifold facts: The unit norm constraint defines the 3-
evolve with time on this circle. The group (the circle) sphere S 3 , a spherical 3-dimensional surface or manifold
ressembles the linear space (the tangent line) locally, but in 4-dimensional space. Unit quaternions evolve with
not globally. time on this surface. The group (the sphere) ressembles
the linear space (the tangent hyperplane R3 ⊂ R4 )
locally, but not globally.
with the global properties of groups, enabling the nonlinear
composition of distant objects.
motion SE(n). Their respective actions on vectors satisfy

SO(n) : rotation matrix R · x , Rx


B. The group actions
SE(n) : Euclidean matrix H · x , Rx + t
Importantly, Lie groups come with the power to transform 1
S : unit complex z · x , zx
elements of other sets, producing e.g. rotations, translations,
scalings, and combinations of them. These are extensively used
3
S : unit quaternion q · x , q x q∗
in robotics, both in 2D and 3D.
See Table I for a more detailed exposition, and the appendices.
Given a Lie group M and a set V, we note X · v the action
The group composition (1) may be viewed as an action of
of X ∈ M on v ∈ V,
the group on itself, ◦ : M × M → M. Another interesting
action is the adjoint action, which we will see in Section II-F.
· : M × V → V ; (X , v) 7→ X · v . (5)

For · to be a group action, it must satisfy the axioms, C. The tangent spaces and the Lie algebra
Given X (t) a point moving on a Lie group’s manifold M,
Identity : E ·v =v (6)
its velocity Ẋ = ∂X /∂t belongs to the space tangent to M
Compatibility : (X ◦ Y) · v = X · (Y · v) . (7) at X (Fig. 2), which we note TX M. The smoothness of the
manifold, i.e., the absence of edges or spikes, implies the
Common examples are the groups of rotation matrices existence of a unique tangent space at each point. The structure
SO(n), the group of unit quaternions, and the groups of rigid of such tangent spaces is the same everywhere.
4

Table I
T YPICAL L IE GROUPS USED IN 2D AND 3D MOTION , INCLUDING THE TRIVIAL Rn . S EE THE APPENDICES FOR FULL REFERENCE

Lie group M, ◦ size dim X ∈M Constraint τ∧ ∈ m τ ∈ Rm Exp(τ ) Comp. Action


n-D vector Rn , + n n v∈ Rn v−v =0 v∈ Rn v ∈ Rn v = exp(v) v1 +v2 v+x
circle S1, · 2 1 z∈C z∗ z
=1 iθ ∈ iR θ∈R z = exp(iθ) z1 z2 zx
Rotation SO(2), · 4 1 R R> R = I h [θ]× ∈i so(2) θ∈R R =hexp([θ]×
i) R1 R2 Rx
[θ]× ρ ρ [θ]× ρ
R> R = I θ ∈R
3
 t
Rigid motion SE(2), · 9 3 M= R0 1 ∈ se(2) exp M1 M2 R x+t
0 0 0 0

3-sphere S3, · 4 3 q∈H q∗ q = 1 θ/2 ∈ Hp θ ∈ R3 q = exp(uθ/2) q1 q2 q x q∗


Rotation SO(3), · 9 3 R R> R = I h × ∈i so(3)
[θ] θ ∈ R3 R =hexp([θ]×
i) R1 R2 Rx
[θ]× ρ ρ [θ]× ρ
R> R = I θ ∈R
6
 t
Rigid motion SE(3), · 16 6 M= R0 1 ∈ se(3) exp M1 M2 R x+t
0 0 0 0

z ^ 1 ^
v = i! 2 iR v = i! 2 iR Tangent TE M Manifold
exp
ż = z · i! 2
/ iR z(t) ż = i! 2 iR Lie algebra ⌧^ 2 m
!t log
1 (·)^ (·)_ X 2M
Exp
Vector ⌧ 2 Rm
Log
Tz S 1 T1 S 1 = iR
S1
Figure 6. Mappings between the manifold M and the representations of its
tangent space at the origin TE M (Lie algebra m and Cartesian Rm ). Maps
Figure 5. Let a point z ∈ S 1 move at constant rotation rate ω, z(t) =
hat (·)∧ and vee (·)∨ are the linear invertible maps or isomorphisms (10–11),
cos ωt + i sin ωt. Its velocities when passing through 1 and z are in the
exp(·) and log(·) map the Lie algebra to/from the manifold, and Exp(·) and
respective tangent spaces, T1 S 1 and Tz S 1 . In the case of Tz S 1 , the velocity
Log(·) are shortcuts to map directly the vector space Rm to/from M.
is ż = z iω = −ω sin ωt + iω cos ωt when expressed in the global
coordinates, and zv∧ = iω when expressed locally. Their relation is given
by zv∧ = z−1 ż = z∗ ż. In the case of T1 S 1 , this relation is the identity
1v∧ = ż = iω. Clearly, the structure of all tangent spaces is iR, which is
For multiplicative groups this yields the new constraint
the Lie algebra. This is also the structure of ż at the identity, and this is why
the Lie algebra is defined as the tangent space at the identity. X −1 Ẋ + X ˙−1 X = 0, which applies to the elements tangent at
X (the term X ˙−1 is the derivative of the inverse). The elements
of the Lie algebra are therefore of the form,2
1) The Lie algebra m: The tangent space at the identity,
TE M, is called the Lie algebra of M, and noted m, v∧ = X −1 Ẋ = −X ˙−1 X . (9)

Lie algebra : m , TE M . (8) 2) The Cartesian vector space Rm : The elements τ ∧ of


the Lie algebra have non-trivial structures (skew-symmetric
Every Lie group has an associated Lie algebra. We relate the matrices, imaginary numbers, pure quaternions, see Table I)
Lie group with its Lie algebra through the following facts [5] but the key aspect for us is that they can be expressed as linear
(see Figs. 1 and 6): combinations of some base elements Ei , where Ei are called
1
• The Lie algebra m is a vector space. As such, its the generators of m (they are the derivatives of X around the
elements can be identified with vectors in Rm , whose origin in the i-th direction). It is then handy to manipulate
dimension m is the number of degrees of freedom of just the coordinates as vectors in Rm , which we shall note
M. simply τ . We may pass from m to Rm and vice versa through
• The exponential map, exp : m → M, exactly converts two mutually inverse linear maps or isomorphisms, commonly
elements of the Lie algebra into elements of the group. called hat and vee (see Fig. 6),
The log map is the inverse operation. m
• Vectors of the tangent space at X can be transformed
X
Hat : Rm → m ; τ 7→ τ ∧ = τi Ei (10)
to the tangent space at the identity E through a linear i=1
transform. This transform is called the adjoint. m
X
Lie algebras can be defined locally to a tangent point X , Vee : m → Rm ; τ ∧ 7→ (τ ∧ )∨ = τ = τi ei , (11)
establishing local coordinates for TX M (Fig. 5). We shall i=1

denote elements of the Lie algebras with a ‘hat’ decorator, with ei the vectors of the base of Rm (we have e∧ i = Ei ).
such as v∧ for velocities or τ ∧ = (vt)∧ = v∧ t for general This means that m is isomorphic to the vector space Rm —
elements. A left superscript may also be added to specify the one writes m ∼
= Rm , or τ ∧ ∼= τ . Vectors τ ∈ Rm are handier
precise tangent space, e.g., Xv∧ ∈ TX M and Ev∧ ∈ TE M. for our purposes than their isomorphic τ ∧ ∈ m, since they
The structure of the Lie algebra can be found (see Exam- can be stacked in larger state vectors, and more importantly,
ples 3 and 5) by time-differentiating the group constraint (3).
2 For additive Lie groups the constraint X −X = 0 differentiates to Ẋ = Ẋ ,
1 Inany Lie algebra, the vector space is endowed with a non-associative that is, no constraint affects the tangent space. This means that the tangent
product called the Lie bracket. In this work, we will not make use of it. space is the same as the group space. See App. E for more details.
5

Example 3: The rotation group SO(3), its Lie algebra Example 4: The exponential map of SO(3)
so(3), and the vector space R3
We have seen in Ex. 3 that Ṙ = R [ω]× ∈ TR SO(3).
In the rotation group SO(3), of 3 × 3 rotation matrices For ω constant, this is an ordinary differential equation
R, we have the orthogonality condition R> R = I. The (ODE), whose solution is R(t) = R0 exp([ω]× t). At the
tangent space may be found by taking the time derivative origin R0 = I we have the exponential map,
of this constraint, that is R> Ṙ + Ṙ> R = 0, which we
rearrange as R(t) = exp([ω]× t) ∈ SO(3) .
R> Ṙ = −(R> Ṙ)> .
We now define the vector θ , uθ , ωt ∈ R3 as
This expression reveals that R> Ṙ is a skew-symmetric the integrated rotation in angle-axis form, with angle θ
matrix (the negative of its transpose). Skew-symmetric and unit axis u. Thus [θ]× ∈ so(3) is the total rotation
matrices are often noted [ω]× and have the form expressed in the Lie algebra. We substitute it above. Then
  write the exponential as a power series,
0 −ωz ωy
[ω]× = ωz 0 −ωx . X θk
−ωy ωx 0 R = exp([θ]× ) = ([u]× )k .
k!
This gives R> Ṙ = [ω]× . When R = I we have k

In order to find a closed-form expression, we write down


Ṙ = [ω]× , a few powers of [u]× ,
that is, [ω]× is in the Lie algebra of SO(3), which 0
[u]× = I,
1
[u]× = [u]× ,
we name so(3). Since [ω]× ∈ so(3) has 3 DoF, the 2 3
dimension of SO(3) is m = 3. The Lie algebra is a [u]× = uu> − I, [u]× = − [u]× ,
4 2
vector space whose elements can be decomposed into [u]× = − [u]× , ···
[ω]× = ωx Ex + ωy Ey + ωz Ez and realize that all can be expressed as multiples of I,
2
h0 0 0 i h 0 0 1i h 0 −1 0 i [u]× or [u]× . We thus rewrite the series as,
with Ex = 0 0 −1 , Ey = 0 0 0 , Ez = 1 0 0 the
01 0 −1 0 0 0 0 0 1 3 1 5

generators of so(3), and where ω = (ωx , ωy , ωz ) ∈ R3 R = I + [u]× θ − 3! θ + 5! θ − ···
2
+ [u]× 12 θ2 − 4!
1 4 1 6

is the vector of angular velocities. The one-to-one linear θ + 6! θ − ··· ,
relation above allows us to identify so(3) with R3 —
where we identify the series of sin θ and cos θ, yielding
we write so(3) ∼ = R3 . We pass from so(3) to R3 and
the closed form,
viceversa using the linear operators hat and vee,
2
R = exp([uθ]× ) = I + [u]× sin θ + [u]× (1−cos θ) .
Hat : R3 → so(3); ω 7→ ω ∧ = [ω]×

Vee : so(3) → R3 ; [ω]× 7→ [ω]× = ω . This expression is the well known Rodrigues rotation
formula. It can be used as the capitalized exponential
just by doing R = Exp(uθ) = exp([uθ]× ).
manipulated with linear algebra using matrix operators. In
this work, we enforce this preference of Rm over m, to the
point that most of the operators and objects that we define Since X (t) and X (0) are elements of the group, then
(specifically: the adjoint, the Jacobians, the perturbations and exp(v∧ t) = X (0)−1 X (t) must be in the group too, and so
their covariances matrices, as we will see soon) are on Rm . exp(v∧ t) maps elements v∧ t of the Lie algebra to the group.
This is known as the exponential map.
D. The exponential map In order to provide a more generic definition of the expo-
The exponential map exp() allows us to exactly transfer nential map, let us define the tangent increment τ , vt ∈ Rm
elements of the Lie algebra to the group (Fig. 1), an operation as velocity per time, so that we have τ ∧ = v∧ t ∈ m a point
generically known as retraction. Intuitively, exp() wraps the in the Lie algebra. The exponential map, and its inverse the
tangent element around the manifold following the great arc logarithmic map, can be now written as,
or geodesic (as when wrapping a string around a ball, Figs. 1,
3 and 4). The inverse map is the log(), i.e., the unwrapping exp : m→M ; τ ∧ 7→ X = exp(τ ∧ ) (14)
operation. The exp() map arises naturally by considering the ∧
log : M→m ; X 7→ τ = log(X ) . (15)
time-derivatives of X ∈ M over the manifold, as follows.
From (9) we have, Closed forms of the exponential in multiplicative groups are
∧ obtained by writing the absolutely convergent Taylor series,
Ẋ = X v . (12)
2 1 ∧3
For v constant, this is an ordinary differential equation (ODE) exp(τ ∧ ) = E + τ ∧ + 21 τ ∧ + 3! τ + ··· , (16)
whose solution is
and taking advantage of the algebraic properties of the powers
X (t) = X (0) exp(v∧ t) . (13) of τ ∧ (see Ex. 4 and 5 for developments of the exponential
6

Example 5: The unit quaternions group S 3 (cont.)


X X

X
In the group S 3 (recall Ex. 2 and see e.g. [8]), the time X Y=E X =X X

Y
derivative of the unit norm condition q∗ q = 1 yields E
⌧ Y = E⌧ X =X X

X
∗ ∗ ∗ E E
q q̇ = −(q q̇) . E
⌧ = AdX X⌧
M
This reveals that q∗ q̇ is a pure quaternion (its real part
is zero). Pure quaternions uv ∈ Hp have the form
Figure 7. Two paths, X ◦ Xδ and Eδ ◦ X , join the origin E with the point
Y. They both compose the element X with increments or ‘deltas’ expressed
uv = (iux + juy + kuz )v = ivx + jvy + kvz , either in the local frame, Xδ, or in the origin, Eδ. Due to non-commutativity,
the elements Xδ and Eδ are not equal. Their associated tangent vectors Xτ =
where u , iux + juy + kuz is pure and unitary, v is Log(Xδ) and Eτ = Log(Eδ) are therefore unequal too. They are related by
the norm, and i, j, k are the generators of the Lie algebra the linear transform Eτ = AdX Xτ where AdX is the adjoint of M at X .
s3 = Hp . Re-writing the condition above we have,
q̇ = q uv ∈ Tq S 3 , Clearly from Fig. 6,
which integrates to q = q0 exp(uvt). Letting q0 = 1 X = Exp(τ ) , exp(τ ∧ ) (23)
and defining φ , uφ , uvt we get the exponential map,
τ = Log(X ) , log(X )∨ . (24)
X φk
q = exp(uφ) , uk ∈ S3 . See the Appendices for details on the implementation of these
k!
The powers of u follow the pattern 1, u, −1, −u, 1, · · · . maps for different manifolds.
Thus we group the terms in 1 and u and identify the
series of cos φ and sin φ. We get the closed form, E. Plus and minus operators
q = exp(uφ) = cos(φ) + u sin(φ) , Plus and minus allow us to introduce increments between
elements of a (curved) manifold, and express them in its (flat)
which is a beautiful extension of the Euler formula,
tangent vector space. Denoted by ⊕ and , they combine one
exp(iφ) = cos φ+i sin φ. The elements of the Lie algebra
Exp/Log operation with one composition. Because of the non-
φ = uφ ∈ s3 can be identified with the rotation vector
commutativity of the composition, they are defined in right-
θ ∈ R3 trough the mappings hat and vee,
and left- versions depending on the order of the operands. The
Hat : R3 → s3 ; θ 7→ θ ∧ = θ/2 right operators are (see Fig. 4-right),
Vee : s 3 → R3 ; φ 7→ φ∨ = 2φ , right-⊕ : Y = X ⊕ Xτ , X ◦ Exp(Xτ ) ∈ M (25)
X −1
where the factor 2 accounts for the double effect of the right- : τ = Y X , Log(X ◦Y) ∈ TX M . (26)
quaternion in the rotation action, x0 = q x q∗ . With this
choice of Hat and Vee, the quaternion exponential Because in (25) Exp(Xτ ) appears at the right hand side of the
composition, Xτ belongs to the tangent space at X (see (26)):
q = Exp(uθ) = cos(θ/2) + u sin(θ/2) we say by convention3 that Xτ is expressed in the local frame
is equivalent to the rotation matrix R = Exp(uθ). at X — we note reference frames with a left superscript.
The left operators are,

left-⊕ : Y = Eτ ⊕ X , Exp(Eτ ) ◦ X ∈ M (27)


map in SO(3) and S 3 ). These are then inverted to find the E −1
left- : τ = Y X , Log(Y ◦X ) ∈ TE M . (28)
logarithmic map. Key properties of the exponential map are
exp((t + s)τ ∧ ) = exp(tτ ∧ ) exp(sτ ∧ ) (17) Now, in (27) Exp(Eτ ) is on the left and we have Eτ ∈ TE M:
we say that Eτ is expressed in the global frame.
exp(tτ ∧ ) = exp(τ ∧ )t (18) Notice that while left- and right- ⊕ are distinguished by the
∧ ∧ −1
exp(−τ ) = exp(τ ) (19) operands order, the notation in (26) and (28) is ambiguous.
∧ −1 ∧ −1 In this work, we express perturbations locally by default and
exp(X τ X ) = X exp(τ )X , (20)
therefore we use the right- forms of ⊕ and by default.
where (20), a surprising and powerful statement, can be proved
easily by expanding the Taylor series and simplifying the many
terms X −1 X . F. The adjoint, and the adjoint matrix
1) The capitalized exponential map: The capitalized Exp If we identify Y in (25, 27), we arrive at Eτ ⊕ X = X ⊕ Xτ ,
and Log maps are convenient shortcuts to map vector elements which determines a relation between the local and global
τ ∈ Rm (∼ = TE M) directly with elements X ∈ M. We have,
3 The convention sticks to that of frame transformation, e.g. Gx = RLx,
Exp : Rm → M ; τ 7→ X = Exp(τ ) (21) where the matrix R ∈ SO(3) transforms local vectors into global. Notice
that this convention is not shared by all authors, and for example [9] uses the
Log : M → Rm ; X 7→ τ = Log(X ) . (22) opposite, Lx = RGx.
7

tangent elements (Fig. 7). We develop it with (20, 25, 27) as Example 6: The adjoint matrix of SE(3)

Exp(Eτ )X = X Exp(Xτ ) The SE(3) group of rigid body motions (see App. D) has
E ∧ X ∧ −1 X ∧ −1 group, Lie algebra and vector elements,
exp( τ ) = X exp( τ )X = exp(X τ X )
E ∧ X ∧ −1
     
τ =X τ X R t [θ]× ρ ρ
M= , τ∧ = , τ = .
0 1 0 0 θ
1) The adjoint: We thus define the adjoint of M at X ,
The adjoint matrix is identified by developing (31) as
noted AdX , to be
AdM τ = (Mτ ∧ M−1 )∨ = · · · =
AdX : m → m; τ ∧ 7→ AdX (τ ∧ ) , X τ ∧ X −1 , (29) ∨
R [θ]× R> −R [θ]× R> t + Rρ

=
so that Eτ ∧ = AdX (Xτ ∧ ). This defines the adjoint action 0 0
∨
of the group on its own Lie algebra. The adjoint has two

[Rθ]× [t]× Rθ + Rρ
interesting (and easy to prove) properties, =
0 0
    
Linear : AdX (aτ ∧ + bσ ∧ ) = aAdX (τ ∧ ) [t]× Rθ + Rρ R [t]× R ρ
= =
Rθ 0 R θ
+ bAdX (σ ∧ )
Homomorphism : AdX (AdY (τ ∧ )) = AdX Y (τ ∧ ) . where we used [Rθ]× = R [θ]× R> and [a]× b =
− [b]× a. So the adjoint matrix is
2) The adjoint matrix: Since AdX () is linear, we can find 
R [t]× R

an equivalent matrix operator AdX that maps the Cartesian AdM = ∈ R6×6 .
0 R
tangent vectors Eτ ∼
= Eτ ∧ and Xτ ∼
= Xτ ∧ ,
X
AdX : Rm → Rm ; τ 7→ Eτ = AdX Xτ , (30)
1) Reminder: Jacobians on vector spaces: For a multivari-
which we call the adjoint matrix. This can be computed by ate function f : Rm → Rn , the Jacobian matrix is defined as
applying ∨ to (29), thus writing the n × m matrix stacking all partial derivatives,
 ∂f1 ∂f1 
AdX τ = (X τ ∧ X −1 )∨ , (31) ∂x1 · · · ∂x m
∂f (x)  . ..  ∈ Rn×m .
J= ,  .. .  (35)
then developing the right hand side to identify the adjoint ∂x ∂fn ∂fn
∂x1 · · · ∂xm
matrix (see Ex. 6 and the appendices). Additional properties
of the adjoint matrix are, It is handy to define this matrix in the following form. Let us
partition J = [j1 · · · jm ], and let ji = [ ∂f ∂fn >
∂xi · · · ∂xi ] be its i-th
1

X ⊕ τ = (AdX τ ) ⊕ X (32) column vector. This column vector responds to


−1
AdX −1 = AdX (33) ∂f (x) f (x + hei ) − f (x)
AdX Y = AdX AdY . (34) ji = , lim ∈ Rn , (36)
∂xi h→0 h
Notice in (33, 34) that the left parts of the equality are usually where ei is the i-th vector of the natural basis of Rm .
cheaper to compute than the right ones. We will use the adjoint Regarding the numerator, notice that the vector
matrix often as a way to linearly transform vectors of the vi (h) , f (x + hei ) − f (x) ∈ Rn (37)
tangent space at X onto vectors of the tangent space at the
origin, with Eτ = AdX Xτ , (30). In this work, the adjoint is the variation of f (x) when x is perturbed in the direction
matrix will be referred to as simply the adjoint. of ei , and that the respective Jacobian column is just ji =
∂vi (h)/∂h|h=0 = limh→0 vi (h)/h. In this work, for the sake
of convenience, we introduce the compact form,
G. Derivatives on Lie groups
∂f (x) f (x + h) − f (x)
Among the different ways to define derivatives in the J= , lim ∈ Rn×m , (38)
∂x h→0 h
context of Lie groups, we concentrate on those in the form
with h ∈ Rm , which aglutinates all columns (36) to form
of Jacobian matrices mapping vector tangent spaces. This
the definition of (35). We remark that (38) is just a notation
is sufficient here since in these spaces uncertainties and
convenience (just as (35) is), since division by the vector h
increments can be properly and easily defined. Using these
is undefined and proper computation requires (36). However,
Jacobians, the formulas for uncertainty management in Lie
this form may be used to calculate Jacobians by developing
groups will largely resemble those in vector spaces.
the numerator into a form linear in h, and identifying the left
The Jacobians described hereafter fulfill the chain rule, so
hand side as the Jacobian, that is,
that we can easily compute any Jacobian from the partial
Jacobian blocks of inversion, composition, exponentiation and f (x+h)−f (x) Jh ∂Jh
lim = · · · = lim , = J. (39)
action. See Section III-A for details and proofs. h→0 h h→0 h ∂h
8

⌧2 = he2 X
TX M Tf (X ) N E DY
X DY Y = f (X )
j1 DX
⌧1 = he1 f (X ) XDX
Y
AdX AdY
X X

E
X ⌧1 ⌧ E Y
DY E
1 (h) 2 (h) EDX
M E N
M
f (·) j2 E
DY
f (X ⌧1 ) DX
N
Figure 9. Linear maps between all tangent spaces involved in a function Y =
Figure 8. Right Jacobian of a function f : M → N . The perturbation vectors f (X ), from M to N . The linear maps Eτ = AdX Xτ , Eσ = AdY Yσ,
in the canonical directions, τi = hei ∈ TX M, are propagated to perturbation Eσ = E DY Eτ , and Yσ = X DY Xτ , form a loop (solid) that leads to (46).
DX DX
vectors σi ∈ Tf (X ) N through the processes of plus, apply f (), and minus The crossed Jacobians (dashed) form more mapping loops leading to (47,48).
(green arrows), obtaining σi (h) = f (X ⊕hei ) f (X ). For varying values of
h, notice that in M the perturbations τi (h) = hei (thick red) produce paths
in M (blue) along the geodesic (recall Fig. 1). Notice also that in N , due to
the non-linearity of f (·), the image paths (solid blue) are generally not in the (see Fig. 8 again, and compare σi in (42) with vi in (37)) is
geodesic (dashed blue). These image paths are lifted onto the tangent space the variation of f (X ) when X varies in the direction of ei .
Tf (X ) N , producing smooth curved paths (thin solid red). The column vectors Its respective Jacobian column is ji = ∂σi (h)/∂h|h=0 .
ji of J (thick red) are the derivatives of the lifted paths evaluated at f (X ), i.e.,
ji = limh→0 σi (h)/h. Each hei ∈ TX M gives place to a ji ∈ Tf (X ) N , As before, we use (41a) to actually find Jacobians by
and thus the resulting Jacobian matrix J = [ j1 · · · jm ] ∈ Rn×m linearly resorting to the same mechanism (39). For example, for a 3D
maps vectors from TX M ∼ = Rm to Tf (X ) N ∼ = Rn . rotation f : SO(3) → R3 ; f (R) = Rp, we have M = SO(3)
and N = R3 and so (see App. B-C5),
R
Notice finally that for small values of h we have the linear DRp (R ⊕ θ)p Rp R Exp(θ)p − Rp
= lim = lim
approximation, DR θ→0 θ θ→0 θ
∂f (x) R(I + [θ]× )p − Rp R [θ]× p
f (x + h) −−−→ f (x) + h. (40) = lim = lim
h→0 ∂x θ→0 θ θ→0 θ
−R [p]× θ 3×3
2) Right Jacobians on Lie goups: Inspired by the standard = lim = −R [p]× ∈ R .
derivative definition (38) above, we can now use our ⊕ and θ→0 θ
operators to define Jacobians of functions f : M → N acting Many examples of this mechanism can be observed in Sec-
on manifolds (see Fig. 8). Using the right- {⊕, } in place of tion III and the appendices. Remark that whenever the function
{+, −} we obtain a form akin to the standard derivative,4 f passes from one manifold to another, the plus and minus
X operators in (41a) must be selected appropriately: ⊕ for the
Df (X ) f (X ⊕ τ ) f (X )
, lim ∈ Rn×m (41a) domain M, and for the codomain or image N .
DX τ →0 τ For small values of τ , the following approximation holds,
which develops as, X
Df (X ) X
Log f (X )−1 ◦ f (X ◦ Exp(τ )) f (X ⊕ Xτ ) −−−−→ f (X ) ⊕ τ ∈N . (43)

= lim (41b) Xτ →0 DX
τ →0 τ 3) Left Jacobians on Lie groups: Derivatives can also be
∂ Log f (X )−1 ◦ f (X ◦Exp(τ ))

= . (41c) defined from the left- plus and minus operators, leading to,
∂τ

E

τ =0 Df (X ) f (τ ⊕ X ) f (X )
We call this Jacobian the right Jacobian of f . Notice that (41c) , lim ∈ Rn×m (44)
DX τ →0 τ
is just the standard derivative (38) of the rather complicated Log(f (Exp(τ ) ◦ X ) ◦ f (X )−1 )
function g(τ ) = Log f (X )−1 ◦ f (X ◦ Exp(τ )) . Writing it = lim
τ →0 τ
as in (41a) conveys much more intuition: it is the derivative 
∂ Log f (Exp(τ ) ◦ X ) ◦ f (X )−1
of f (X ) with respect to X , only that we expressed the = ,
∂τ

infinitesimal variations in the tangent spaces! Indeed, thanks

τ =0
to the way right- ⊕ and operate, variations in X and f (X ) which we call the left Jacobian of f . Notice that now
are now expressed as vectors in the local tangent spaces, i.e., τ ∈ TE M, and the numerator belongs to TE N , thus the left
tangent respectively at X ∈ M and f (X ) ∈ N . This derivative Jacobian is a n×m matrix mapping the global tangent spaces,
is then a proper Jacobian matrix Rn×m linearly mapping the TE M → TE N , which are the Lie algebras of M and N (and
local tangent spaces TX M → Tf (X ) N (and we mark the we mark the derivative with a global or origin ‘E’ superscript).
derivative with a local ‘X ’ superscript). Just as in vector For small values of τ the following holds,
spaces, the columns of this matrix correspond to directional E
derivatives. That is, the vector Df (X ) E
f (Eτ ⊕ X ) −−−−→ τ ⊕ f (X ) ∈N . (45)
n
Eτ →0 DX
σi (h) = f (X ⊕ hei ) f (X ) ∈R (42)
We can show from (32, 43, 45) (see Fig. 9) that left and
4 The notation DY
=
Df (X )
is chosen in front of other alternatives in right Jacobians are related by the adjoints of M and N ,
DX DX
DZ
order to make the chain rule readable, i.e., DX = DZ DY
DY DX
. We will later E
Df (X ) X
Df (X )
Y DY
introduce the lighter notation JX , DX . AdX = Adf (X ) . (46)
DX DX
9

TX 0 M X3 ⌧4
TX̄ M ⌧1
⌧3
X̄ 4
⌧2 3
1 X4
⌧1 2 X2
X1
1
M X0
M

M
Figure 11. Motion integration on a manifold. Each motion data produces
a step τk ∈ TXk−1 M, which is wrapped to a local motion increment or
Figure 10. Uncertainty around a point X̄ ∈ M is properly expressed as a ‘delta’ δk = Exp(τk ) ∈ M, and then composed with Xk−1 to yield Xk =
covariance on the vector space tangent at the point (red). Using ⊕ (51), the Xk−1 ◦ δk = Xk−1 ◦ Exp(τk ) = Xk−1 ⊕ τk ∈ M.
probability ellipses in the tangent space are wrapped over the manifold (blue),
thus illustrating the probability concentration region on the group.
a covariance E Σ = diag(σφ2 , σθ2 , ∞). Since “horizontal” is
a global specification, E Σ must be specified in the global
4) Crossed right–left Jacobians: One can also define Jaco-
reference.
bians using right-plus but left-minus, or vice versa. Though
Since global and local perturbations are related by the
improbable, these are sometimes useful, since they map local
adjoint (30), their covariances can be transformed with
to global tangents or vice versa. To keep it short, we will just
relate them to the other Jacobians through the adjoints, E
ΣX = AdX X
ΣX AdX > . (54)
E E Y
DY DY DY Covariance propagation through a function f : M →
X DX
= E DX
AdX = AdY X DX
(47)
N ; X 7→ Y = f (X ) just requires the linearization (43) with
Y Y E
DY DY −1 −1 DY Jacobian matrices (41a) to yield the familiar formula,
E DX
= X DX
Ad X = Ad Y E DX
, (48)
Df Df >
where Y = f (X ). Now, the upper and lower super-scripts ΣY ≈ ΣX ∈ Rn×n . (55)
DX DX
indicate the reference frames where the differentials are ex-
pressed. Respective small-tau approximations read,
I. Discrete integration on manifolds
E
Df (X ) X The exponential map X (t) = X0 ◦ Exp(vt) performs the
f (X ⊕ X τ ) −−−−→ X τ ⊕ f (X ) (49)
Xτ →0 DX continuous-time integral of constant velocities v ∈ TX0 M
f (X )
Df (X ) E onto the manifold. Non-constant velocities v(t) are typically
f (E τ ⊕ X ) −−−−→ f (X ) ⊕ E DX
τ . (50)
Eτ →0 handled by segmenting them into piecewise constant bits
vk ∈ TXk−1 M, of (short) duration δtk , and writing the
H. Uncertainty in manifolds, covariance propagation discrete integral
We define local perturbations τ around a point X̄ ∈ M in Xk = X0 ◦ Exp(v1 δt1 ) ◦ Exp(v1 δt2 ) ◦ · · · ◦ Exp(vk δtk )
the tangent vector space TX̄ M, using right- ⊕ and ,
= X0 ⊕ v1 δt1 ⊕ v1 δt2 ⊕ · · · ⊕ vk δtk .
X = X̄ ⊕ τ , τ = X X̄ ∈ TX̄ M . (51)
Equivalently (Fig. 11), we can define τk = vk δtk and
Covariances matrices can be properly defined on this tangent construct the integral as a “sum” of (small) discrete tangent
space at X̄ through the standard expectation operator E[·], steps τk ∈ TXk−1 M, i.e., Xk , X0 ⊕ τ1 ⊕ τ2 ⊕ · · · ⊕ τk . We
write all these variants in recursive form,
ΣX , E[τ τ > ] = E[(X X̄ )(X X̄ )> ] ∈ Rm×m , (52)
Xk = Xk−1 ⊕ τk = Xk−1 ◦ Exp(τk ) = Xk−1 ◦ Exp(vk δtk ) .
allowing us to define Gaussian variables on manifolds, X ∼
(56)
N (X̄ , ΣX ), see Fig. 10. Notice that although we write ΣX , the
covariance is rather that of the tangent perturbation τ . Since Common examples are the integration of 3D angular rates
the dimension m of T M matches the degrees of freedom of ω into the rotation matrix, Rk = Rk−1 Exp(ωk δt), or into
M, these covariances are well defined.5 the quaternion, qk = qk−1 Exp(ωk δt).
Perturbations can also be expressed in the global reference,
that is, in the tangent space at the origin TE M, using left- ⊕ III. D IFFERENTIATION RULES ON MANIFOLDS
and ,
For all the typical manifolds M that we use, we can deter-
X = τ ⊕ X̄ , τ = X X̄ ∈ TE M . (53) mine closed forms for the elementary Jacobians of inversion,
composition, exponentiation and action. Moreover, some of
This allows global specification of covariance matrices using
these forms can be related to the adjoint AdX , which becomes
left-minus in (52). For example, a 3D orientation that is known
a central block of the differentiation process. Other forms for
up to rotations in the horizontal plane can be associated to
Log, ⊕ and can be easily derived from them. Once these
5 A naive definition Σ
X , E[(X − X̄ )(X − X̄ ) ] is always ill-defined if
> forms or ‘blocks’ are found, all other Jacobians follow by
size(X ) > dim(M), which is the case for most non-trivial manifolds. the chain rule. Except for the so-called left Jacobian, which
10

we also present below, all Jacobians developed here are right- 2) Composition: We define with (41a)
Jacobians, i.e., defined by (41a). By following the hints here, X
DX ◦ Y
the interested reader should find no particular difficulties in JX
X
◦Y
, ∈ Rm×m (63)
DX
developing the left-Jacobians. For the reader not willing to do Y
DX ◦Y
this effort, equation (46) can be used to this end, since JX
Y
◦Y
, ∈ Rm×m , (64)
DY
E X
Df (X ) Df (X ) and using (20, 31) as above and (33),
= Adf (X ) AdX −1 . (57)
DX DX Log((X Y)−1 (X Exp(τ )Y))
f (X )
JX
X
◦Y
= lim
We use the notations JX , Df (X )
DX and , . JY
X
DY
DX
τ →0 τ
We notice also that AdX −1
should rather be
implemented Log(Y −1 Exp(τ )Y)
= lim
by AdX −1 —see (33, 34) and the comment below them. τ →0 τ
(Y −1 τ ∧ Y)∨
= lim = AdY −1 (65)
τ →0 τ
A. The chain rule JX ◦Y
= ··· = I (66)
Y
For Y = f (X ) and Z = g(Y) we have Z = g(f (X )). The
3) Jacobians of M: We define the right Jacobian of M as
chain rule simply states,
the right Jacobian of X = Exp(τ ), i.e., for τ ∈ Rm ,
DZ DZ DY τ
D Exp(τ )
= or JZ Z Y
X = J Y JX . (58) Jr (τ ) , ∈ Rm×m , (67)
DX DY DX Dτ
We prove it here for the right Jacobian using (43) thrice, which is defined with (41a). The right Jacobian maps vari-
ations of the argument τ into variations in the local tangent
g(f (X )) ⊕ JZ Y
X τ ← g(f (X ⊕ τ )) → g(f (X ) ⊕ JX τ ) space at Exp(τ ). From (41a) it is easy to prove that, for small
→ g(f (X )) ⊕ JZ Y
Y JX τ δτ , the following approximations hold,
with the arrows indicating limit as τ → 0, and so JZ Exp(τ + δτ ) ≈ Exp(τ ) Exp(Jr (τ )δτ ) (68)
X =
Y
JZ J
Y X . The proof for the left and crossed Jacobians is akin, Exp(τ ) Exp(δτ ) ≈ Exp(τ + J−1
r (τ ) δτ ) (69)
using respectively (45, 49, 50). Notice that when mixing right, Log(Exp(τ ) Exp(δτ )) ≈ τ + J−1
r (τ ) δτ . (70)
left and crossed Jacobians, we need to chain also the reference
frames, as in e.g. Complementarily, the left Jacobian of M is defined by,
E
Z Z Y Z E D Exp(τ )
DZ DZ DY DZ DY Jl (τ ) , ∈ Rm×m , (71)
E DX
= Y E DX
= E DY E DX
(59) Dτ
DY
E E Y E E using the left Jacobian (44), leading to the approximations
DZ DZ DY DZ DY
=Y = , (60)
X DX DY X DX E DY X DX Exp(τ + δτ ) ≈ Exp(Jl (τ )δτ ) Exp(τ ) (72)
where the first identity of (59) is proven by writing, Exp(δτ ) Exp(τ ) ≈ Exp(τ + J−1
l (τ ) δτ ) (73)
Z Log(Exp(δτ ) Exp(τ )) ≈ τ + J−1
l (τ ) δτ . (74)
(50) DZ E
g(f (Eτ ⊕ X )) −−−−→ g(f (X )) ⊕ E τ ;
Eτ →0 DX The left Jacobian maps variations of the argument τ into vari-
Y ations in the global tangent space or Lie algebra. From (68, 72)
 
E (50) DY E
g(f ( τ ⊕ X )) −−−−→ g f (X ) ⊕ E τ → we can relate left- and right- Jacobians with the adjoint,
Eτ →0 DX
(43)
Z
DZ Y DY E AdExp(τ ) = Jl (τ ) Jr −1 (τ ) . (75)
−−−−→ g(f (X )) ⊕ Y τ ,
Eτ →0 DY E DX Also, the chain rule allows us to relate Jr and Jl ,
and identifying (59) in the first and third rows. Exp(−τ ) −1
Jr (−τ ) , J−τ = JExp(−τ
τ
) τ
J−τ = JExp(τ
τ
)
(−I)
Exp(τ )−1
= −JExp(τ ) JExp(τ
τ
)
= AdExp(τ ) Jr (τ )
B. Elementary Jacobian blocks
= Jl (τ ) . (76)
1) Inverse: We define with (41a)
X
Closed forms of Jr , Jr −1 , Jl and Jl −1 exist for the typical
−1 DX −1
JX
X , ∈R m×m
. (61) manifolds in use. See the appendices for reference.
DX 4) Group action: For X ∈ M and v ∈ V, we define with
This can be determined from the adjoint using (20) and (31), (41a)
X
Log((X −1 )−1 (X Exp(τ ))−1 ) DX · v
JX
−1
= lim JX
X
·v
, (77)
X
τ →0 τ DX
v
DX · v
Log(X Exp(−τ )X −1 ) JXv
·v
, . (78)
= lim Dv
τ →0 τ
(X (−τ )∧ X −1 )∨ Since group actions depend on the set V, these expressions
= lim = −AdX . (62) cannot be generalized. See the appendices for reference.
τ →0 τ
11

C. Useful, but deduced, Jacobian blocks Example 7: SE(n) vs. T (n)×SO(n) vs. hRn , SO(n)i
1) Log map: For τ = Log(X ), and from (70),
We consider the space of translations t ∈ Rn and rota-
Log(X )
JX = J−1
r (τ ) . (79) tions R ∈ SO(n). We have for this the well-known SE(n)
manifold of rigid motions M = [ R t
0 1 ] (see Apps. C and
2) Plus and minus: We have D), which can also be constructed as T (n)×SO(n) (see
X ◦(Exp(τ )) Apps. A, B and E). These two are very similar, but have
JX
X
⊕τ
= JX = AdExp(τ ) −1 (80)
X ◦(Exp(τ )) Exp(τ )
different tangent parametrizations: while SE(n) uses τ =
JX
τ
⊕τ
= JExp(τ ) Jτ = Jr (τ ) (81) (θ, ρ) with M = exp(τ ∧ ), T (n)×SO(n) uses τ = (θ, p)
with M = exp(p∧ ) exp(θ ∧ ). They share the rotational
and given Z = X −1 ◦ Y and τ = Y X = Log(Z),
part θ, but clearly ρ 6= p (see [11, pag. 35] for further
Log(Z) Z −1
JY X
X = JZ JX −1 JX
X = −J−1
l (τ ) (82) details). In short, SE(n) performs translation and rotation
Log(Z) Z simultaneously as a continuum, while T (n) × SO(n)
JY X
Y = JZ JY = J−1
r (τ ) . (83)
performs chained translation+rotation. In radical contrast,
where the former is proven here in the composite hRn , SO(n)i rotations and translations
Log(X −1 ◦Y) (X −1 ◦Y) −1
do not interact at all. By combining composition with
JY X
X = J(X −1 ◦Y) JX −1 JX
X Exp() we obtain the (right) plus operators,
−1
(79, 65, 62) = J−1
r (τ ) AdY (−AdX )
 
R Exp(θ) t + RV(θ)ρ
SE(n) : M ⊕ τ =
(33, 34) = −J−1
r (τ ) AdY −1 X 0 1
−1
 
= −J−1
r (τ ) AdExp(τ ) T (n)×SO(n) : M ⊕ τ =
R Exp(θ) t + Rp
(75) = −J−1 0 1
l (τ ) .  
t+p
hRn , SO(n)i : M τ =
IV. C OMPOSITE MANIFOLDS R Exp(θ)
At the price of losing some consistency with the Lie theory, where either ⊕ may be used for the system dynamics,
but at the benefit of obtaining some advantages in notation and e.g. motion integration, but usually not , which might
manipulation, one can consider large and heterogeneous states however be used to model perturbations. Their respective
as manifold composites (or bundles). minus operators read,
A composite manifold M = hM1 , · · · , MM i is no less  −1 >
V1 R1 (p2 − p1 )

than the concatenation of M non-interacting manifolds. This SE(n) : M2 M1 =
Log(R>1 R2 )
stems from defining identity, inverse and composition acting  > 
R1 (p2 − p1 )
on each block of the composite separately, T (n)×SO(n) : M2 M1 =
   −1    Log(R>1 R2 )
E1 X X ◦ Y1 
p2 − p1

hRn , SO(n)i : M2 M1 = ,
E ,  ...  , X  ,  ...  , X  Y ,  ..
, Log(R>1 R2 )
     
.
−1
EM XM XM ◦ YM where now, interestingly, can be used to evaluate
(84) errors and uncertainty. This makes , valuable op-
thereby fulfilling the group axioms, as well as a non- erators for computing derivatives and covariances.
interacting retraction map, which we will also note as “ex-
ponential map” for the sake of unifying notations (notice the
angled brackets), With this derivative, Jacobians of functions f : M → N
    acting on composite manifolds can be determined in a per-
Exp(τ1 ) Log(X )
.. .. block basis, which yields simple expressions requiring only
Exphτ i ,   , LoghX i ,   , (85)
   
. . knowledge on the manifold blocks of the composite,
Exp(τM ) Log(XM )  Df1 Df1
···

DX1 DXM
thereby ensuring smoothness. These yield the composite’s Df (X )  . .. ..  ,
right- plus and minus (notice the diamond symbols), =  .. . .  (89)
DX Df DfN
DX1
N
··· DXM
X τ , X  Exphτ i (86)
Y X , LoghX   Yi . (87) Dfi
where DX are each computed with (41a). For small values
j

The key consequence of these considerations (see Ex. 7) is of τ the following holds,
that new derivatives can be defined,6 using and , Df (X )
f (X τ ) −−−→ f (X ) τ ∈N . (90)
Df (X ) f (X τ) f (X ) τ →0 DX
, lim . (88)
DX τ →0 τ
When using these derivatives, covariances and uncertainty
6 We assume here right derivatives, but the same applies to left derivatives. propagation must follow the convention. In particular, the
12

covariance matrix (52) becomes b5


> n×n X3
ΣX , E[(X X̄ )(X X̄ ) ] ∈ R , (91) X1
X2 b6
for which the linearized propagation (55) using (88) applies. b4

Figure 12. SAM factor graph with 3 poses and 3 beacons. Each measurement
V. L ANDMARK - BASED LOCALIZATION AND MAPPING contributes a factor in the graph. There are 2 motion factors (black) and 5
We provide three applicative examples of the theory for beacon factors (gray). A prior factor on X1 provides global observability.
robot localization and mapping. The first one is a Kalman
filter for landmark-based localization. The second one is a
At each robot motion we apply ESKF prediction,
graph-based smoothing method for simultaneous localization
and mapping. The third one adds sensor self-calibration. They X̂j = X̂i ⊕ uj (99)
are based on a common setup, explained as follows. > >
Pj = F Pi F + G Wj G , (100)
We consider a robot in the plane (see Section V-D for the
3D case) surrounded by a small number of punctual landmarks with the Jacobians computed from the blocks in App. C,
or beacons. The robot receives control actions in the form of X X̂ ⊕uj
axial and angular velocities and is able to measure the location F , JXji = JX̂i = AdExp(uj ) −1
i
of the beacons with respect to its own reference frame. X X̂ ⊕uj
G , Jujj = Juji = Jr (uj ) .
The robot pose is in SE(2) (App. C) and the beacon
positions in R2 (App. E), At each beacon measurement yk we apply ESKF correction,
   
R t x z = yk − X̂ −1 · bk
X = ∈ SE(2) , bk = k ∈ R2 . Innovation :
0 1 yk
Innovation cov. : Z = H P H> + N
The control signal u is a twist in se(2) comprising longitu- Kalman gain : K = P H> Z−1
dinal velocity v and angular velocity ω, with no lateral velocity
component, integrated over the sampling time δt. The control Observed error : δx = Kz
is corrupted by additive Gaussian noise w ∼ N (0, W). This State update : X̂ ← X̂ ⊕ δx (101)
noise accounts for possible lateral wheel slippages us through Cov. update : P ← P − KZK >
, (102)
a value of σs 6= 0,
    with the Jacobian computed from the blocks in App. C,
uv v δt
−1 −1 −1
u =  us  =  0  + w ∈ se(2) (92) H , JX ·bk X ·bk X
= JX J
X
X
−1
uω ω δt  > −R [1]× t

>

 2
σv δt 0 0
 = R R [1]× bk
0 −1
W= 0 σs2 δt 0  ∈ R3×3 . (93)  >

2 = − I R [1]× (bk − t) .
0 0 σw δt
At the arrival of a control uj at time j, the robot pose is Notice that the only changes with respect to a regular EKF
updated with (56), are in (99) and (101), where regular + are substituted by ⊕.
The Jacobians on the contrary are all computed using the Lie
Xj = Xi ⊕ uj , Xi Exp(uj ) . (94) theory (see App. C). Interstingly, their usage is the same as
in standard EKF — see e.g. the equation of the Kalman gain,
Landmark measurements are of the range and bearing type,
which is the standard K = PH> (HPH> + N)−1 .
though they are put in Cartesian form for simplicity. Their
noise n ∼ N (0, N) is zero mean Gaussian,
B. Smooting and Mapping with graph-based optimization
yk = X −1 · bk + n = R> (bk − t) + n ∈ R2 (95)
 2  We consider now the problem of smoothing and mapping
σx 0 2×2
N= ∈R , (96) (SAM), where the variables to estimate are the beacons’
0 σy2 locations and the robot’s trajectory. The solver of choice is
where we notice the rigid motion action X −1 ·bk (see App. C). a graph-based iterative least-squares optimizer. For simplicity,
we assume the trajectory comprised of three robot poses
{X1 · · · X3 }, and a world with three beacons {b4 · · · b6 }. The
A. Localization with error-state Kalman filter on manifold problem state is the composite
We initially consider the beacons bk situated at known
positions. We define the pose to estimate as X̂ ∈ SE(2). The X = hX1 , X2 , X3 , b4 , b5 , b6 i, Xi ∈ SE(2), bk ∈ R2 .
estimation error δx and its covariance P are expressed in the (103)
tangent space at X̂ with (51, 52), The resulting factor graph [12] is shown in Fig. 12. Each
δx , X X̂ ∈R 3
(97) prior or measurement contributes a factor in the graph. Motion
> 3×3
measurements from pose i to j are derived from (94), while
P , E[(X X̂ )(X X̂ ) ] ∈R . (98) measurements of beacon k from pose i respond to (95),
13

uij = Xj Xi + wij = Log(Xi−1 Xj ) + wij (104) so that the control is now ũ = (vδt + cv , 0, ωδt + cω )> + w.
yik = Xi−1 · bk + nik . (105) We define the bias correction function c(),
 
ũv − cv
Each factor comes with an information matrix, Ω1 , W1−1 ,
−1 u = c (ũ, c) ,  ũs  ∈ R3 ∼ = se(2) . (111)
Ωij , Wij and Ωik , N−1
ik . The expectation residuals are, ũω − cω
>/2
prior residual : r1 (X ) = Ω1 (X1 X̂1 ) The state composite is augmented with the unknowns c,
>/2
motion residual : rij (X ) = Ωij (uij − (X̂j X̂i )) X = hc, X1 , X2 , X3 , b4 , b5 , b6 i ,
>/2
beacon residual : rik (X ) = Ωik (yik − X̂i−1 · b̂k ) . c ∈ R2 , Xi ∈ SE(2), bk ∈ R2 ,

The optimum update step δx stems from minimizing and the motion residual becomes
>/2 
δx∗ = arg min
X
rp (X δx)> rp (X δx) (106) rij (X ) = Ωij c (ũij , c) − (X̂j X̂i ) .
δx p∈P The procedure is as in Section V-B above, and just the total
with P = {1, 12, 23, 14, 15, 25, 26, 36} the set of node pairs Jacobian is modified with an extra column on the left,
of each measurement (see Fig. 12). The problem is solved 0 JrX11 0 0 0 0 0
 
r
Jc12 JX r r
iteratively as follows. Each residual in the sum (106) is 12
1
J X212
0 0 0 0 
r r23 r23
linearized to rp (X δx) ≈ rp (X ) JXp δx following (90),
 r23 
Jc 0 J X2 J X3 0 0 0 
rp r14 r14
where JX are sparse Jacobians. The non-zero blocks of these
 
 0 J X1 0 0 J b4 0 0 
r r
Jacobians, that is JrX11 , JXiji , JXijj , JrXiki and Jrbik , can be easily J=  r15 r15
 ,
k 0 J X1 0 0 0 J b5 0 
r25 r25
 
computed following the methods in Section V-A, and noticing  0 0 J X2 0 0 Jb5 0 
f (X ⊕δx) f (X ⊕δx) f (X )
that by definition Jδx |δx=0 = JX |δx=0 = JX . JrX262 Jrb26
 
 0 0 0 0 0 
6
Building the total Jacobian matrix and residual vector, r36 r36
0 0 0 J X3 0 0 Jb6
 r1
JX1 0 0 0 0 0
  
r1 r >/2 c(u ,c) c(u ,c)
where Jcij = Ωij Jc ij , with Jc ij the 3 × 2 Jacobian
JrX12 JrX12 0 0 0 0 r12 
of (111). The optimal solution is obtained with (109, 110). The

 1 2
r23 r23   
 0
 r14 JX2 JX3 0 0 0  r23 
r14    resulting optimal state X includes an optimal estimate of c,
JX 0 0 J 0 0 r14 
that is, the self-calibration of the sensor bias.
b4

J =  r15
 1
r15  r = r15 
  
J
 X1 0 0 0 J b5 0
JrX252 Jrb25
  
 0 0 0 0  r25 
5
D. 3D implementations
JrX262 Jrb26
   
 0 0 0 0  r26 
6
0 0 JrX363 0 0 Jrb36
6
r36 It is surprisingly easy to bring all the examples above to
(107) 3D. It suffices to define all variables in the correct spaces:
X ∈ SE(3) and u ∈ R6 ∼ = se(3) (App. D), and {bk , y} ∈ R3
the linearized (106) is now transformed [12] to minimizing (App. E). Jacobians and covariances matrices will follow with
2 appropriate sizes. The interest here is in realizing that all the
δx∗ = arg min kr + Jδxk . (108)
δx math in the algorithms, that is from (97) onwards, is exactly
the same for 2D and 3D: the abstraction level provided by the
This is solved via least-squares using the pseudoinverse of Lie theory has made this possible.
J (for large problems, QR [12], [13] or Cholesky [14], [15]
factorizations are required),
VI. C ONCLUSION
∗ > −1 >
δx = −(J J) J r, (109) We have presented the essential of Lie theory in a form that
should be useful for an audience skilled in state estimation,
yielding the optimal step δx∗ used to update the state,
with a focus on robotics applications. This we have done
X ←X δx∗ . (110) through several initiatives:
First, a selection of materials that avoids abstract mathe-
The procedure is iterated until convergence. matical concepts as much as possible. This helps to focus Lie
We highlight here the use of the composite notation in (103), theory to make its tools easier to understand and to use.
which allows block-wise definitions of the Jacobian (107) and Second, we chose a didactical approach, with significant
the update (110). We also remark the use of the SE(2) manifold redundancy. The main text is generic and covers the abstract
in the motion and measurement models, as we did in the ESKF points of Lie theory. It is accompanied by boxed examples,
case in Section V-A. which ground the abstract concepts to particular Lie groups,
and plenty of figures with very verbose captions.
Third, we have promoted the usage of handy operators,
C. Smoothing and mapping with self-calibration such as the capitalized Exp() and Log() maps, and the plus
We consider the same problem as above but with a motion and minus operators ⊕, , , . They allow us to work on
sensor affected by an unknown calibration bias c = (cv , cω )> , the Cartesian representation of the tangent spaces, producing
14

formulas for derivatives and covariance handling that greatly where (114) is the Euler formula, whereas for SO(2),
resemble their counterparts in standard vector spaces. 
cos θ − sin θ

Fourth, we have made special emphasis on the definition, R = Exp(θ) = ∈ R2×2 (116)
sin θ cos θ
geometrical interpretation, and computation of Jacobians. For
this, we have introduced notations for the Jacobian matrices θ = Log(R) = arctan(r21 , r11 ) ∈R. (117)
and covariances that allow a manipulation that is visually
powerful. In particular, the chain rule is clearly visible with B. Inverse, composition, exponential map
this notation. This helps to build intuition and reducing errors. We consider generic 2D rotation elements, and note them
Fifth, we present in the appendices that follow an extensive with the sans-serif font, Q, R. We have
compendium of formulas for the most common groups in
robotics. In 2D, we present the rotation groups of unit complex R(θ)−1 = R(−θ) (118)
numbers S 1 and rotation matrices SO(2), and the rigid motion Q◦R=R◦Q , (119)
group SE(2). In 3D, we present the groups of unit quaternions i.e., planar rotations are commutative. It follows that
S 3 and rotation matrices SO(3), both used for rotations, and
the rigid motion group SE(3). We also present the translation Exp(θ1 + θ2 ) = Exp(θ1 ) ◦ Exp(θ2 ) (120)
groups for any dimension, which can be implemented by either Log(Q ◦ R) = Log(Q) + Log(R) (121)
the standard vector space Rn under addition, or by the matrix Q R = θQ − θR . (122)
translation group T (n) under multiplication.
Sixth, we have presented some applicative examples to
C. Jacobian blocks
illustrate the capacity of Lie theory to solve robotics problems
with elegance and precision. The somewhat naive concept of Since our defined derivatives map tangent vector spaces, and
composite group helps to unify heterogeneous state vectors these spaces coincide for the planar rotation manifolds of S 1
into a Lie-theoretic form. and SO(2), i.e., θ = Log(z) = Log(R), it follows that the
Finally, we accompany this text with the new C++ library Jacobians are independent of the representation used (z or R).
manif [7] implementing the tools described here. manif can 1) Adjoint and other trivial Jacobians: From (41a), Sec-
be found at https://github.com/artivis/manif. The applications tion III-B and the properties above, the following scalar
in Section V are demonstrated in manif as examples. derivative blocks become trivial,
Though we do not introduce any new theoretical material, AdR = 1 ∈R (123)
we believe the form in which Lie theory is here exposed −1

will help many researchers enter the field for their future JRR = −1 ∈R (124)
developments. We also believe this alone represents a valuable JQ◦R
Q = JQ◦R
R =1 ∈R (125)
contribution. Jr (θ) = Jl (θ) =1 ∈R (126)
A PPENDIX A JR = JθR⊕θ
R⊕θ
=1 ∈R (127)
T HE 2D ROTATION GROUPS S 1 AND SO(2)
JQ R
Q = −JQ R
R =1 ∈R (128)
The Lie group S 1 is the group of unit complex numbers
under the complex product. Its topology is the unit circle, or 2) Rotation action: For the action R · v we have,
the unit 1-sphere, and therefore the name S 1 . The group, Lie R Exp(θ)v − Rv
JRR·v = lim
algebra and vector elements have the form, θ→0 θ
z = cos θ + i sin θ, τ ∧ = iθ, τ =θ . (112) R(I + [θ]× )v − Rv
= lim
θ→0 θ
Inversion and composition are achieved by conjugation z−1 = R [θ]× v
z∗ , and product za ◦ zb = za zb . = lim = R [1]× v ∈ R2×1 (129)
The group SO(2) is the group of special orthogonal matrices θ→0 θ
in the plane, or rotation matrices, under matrix multiplication. and
Group, Lie algebra and vector elements have the form, DRv
JR·v
v = =R ∈ R2×2 . (130)
 θ − sin θ 
R = cos , τ ∧ = [θ]× , θ0 −θ
 
, τ = θ . (113) Dv
sin θ cos θ 0
Inversion and composition are achieved by transposition A PPENDIX B
R−1 = R> , and product Ra ◦ Rb = Ra Rb . T HE 3D ROTATION GROUPS S 3 AND SO(3)
Both groups rotate 2-vectors, and they have isomorphic The Lie group S 3 is the group of unit quaternions under
tangent spaces. We thus study them together. quaternion multiplication. Its topology is the unit 3-sphere in
R4 , and therefore its name S 3 . Quaternions (please consult
A. Exp and Log maps [8] for an in-depth reference) may be represented by either of
Exp and Log maps may be defined for complex numbers of these equivalent forms,
S 1 and rotation matrices of SO(2). For S 1 we have, q = w + ix + jy + kz = w + v ∈ H
z = Exp(θ) = cos θ + i sin θ ∈C (114)
 
> w (131)
∈H,

= w x y z =
θ = Log(z) = arctan(Im(z), Re(z)) ∈R, (115) v
15

where w, x, y, z ∈ R, and i, j, k are three unit imaginary C. Elementary Jacobian blocks


numbers such that i2 = j 2 = k 2 = ijk = −1. The scalar w is
Since our defined derivatives map tangent vector spaces,
known as the scalar or real part, and v ∈ Hp as the vector or
and these spaces coincide for the 3D rotation manifolds of S 3
imaginary part. We note Hp the set of pure quaternions, i.e., of
and SO(3), i.e., θ = Log(q) = Log(R), it follows that the
null scalar part, with dimension 3. Inversion and composition
Jacobians are independent of the representation used (q or R).
are achieved by conjugation q−1 = q∗ , where q∗ , w − v is
We thus consider generic 3D rotation elements and note them
the conjugate, and product qa ◦ qb = qa qb .
with the sans-serif font R.
The group SO(3) is the group of special orthogonal matrices
1) Adjoint: We have from (31)
in 3D space, or rotation matrices, under matrix multiplication.
Inversion and composition are achieved with transposition and AdR θ = (R [θ]× R> )∨ = ([(Rθ)]× )∨ = Rθ
product as in all groups SO(n).
Both groups rotate 3-vectors. They have isomorphic tangent therefore
spaces whose elements are identifiable with rotation vectors in
R3 , so we study them together. It is in this space R3 where we AdR = R , (139)
define the vectors of rotation rate ω , uω, angle-axis θ , uθ,
and all perturbations and uncertainties. which means, just to clarify it once again, that Adq = R(q),
The quaternion manifold S 3 is a double cover of SO(3), see (138), and AdR = R.
i.e., q and −q represent the same rotation R. The first cover 2) Inversion, composition: We have from Section III-B,
corresponds to quaternions with positive real part w > 0. The −1
two groups can be considered isomorphic up to the first cover. JRR = −AdR = −R (140)
−1 >
JQR
Q = AdR = R (141)
A. Exp and Log maps JQR
R =I. (142)
The Exp and Log maps may be defined for quaternions
3) Right and left Jacobians: They admit the closed forms
of S 3 and rotation matrices of SO(3). For quaternions q =
[11, pag. 40],
(w, v) ∈ H we have (see Ex. 5),
1−cos θ θ−sin θ 2
q = Exp(θu) , cos(θ/2) + u sin(θ/2) ∈H (132) Jr (θ) = I− [θ] + [θ] (143)
θ2  × θ3  ×
arctan(kvk, w) 1 1 1+cos θ
θu = Log(q) , 2 v ∈ R3 . (133) Jr −1 (θ) = I+ [θ]× + 2 −
2
[θ]× (144)
kvk 2 θ 2θ sin θ
We can avoid eventual problems due to the double cover of q 1 − cos θ θ − sin θ 2
Jl (θ) = I + 2
[θ]× + [θ]× (145)
by ensuring that its scalar part w is positive before doing the θ  θ3 
Log. If it is not, we can substitute q by −q before the Log. 1 1 1 + cos θ 2
Jl −1 (θ) = I − [θ]× + 2
− [θ]× (146)
For rotation matrices we have (see Ex. 4), 2 θ 2θ sin θ
2
R = Exp(θu) , I + sin θ [u]× + (1 − cos θ) [u]× ∈ R3×3 where we can observe that
(134)
J l = Jr > , Jl −1 = Jr −> . (147)
θ(R − R> )∨ 3
θu = Log(R) , ∈R , (135)
2 sin θ 4) Right- plus and minus: We have for θ = Q R,
trace(R)−1
with θ = cos−1

2 . JRR⊕θ = R(θ)> JR⊕θ = Jr (θ) (148)
θ
JQ R
Q = J−1
r (θ) JQ R
R = −J−1
l (θ) (149)
B. Rotation action
Given the expressions above for the quaternion and the 5) Rotation action: We have
rotation matrix, the rotation action of quaternions on 3-vectors (R ⊕ θ)v − Rv
is performed by the double quaternion product, JRR·v , lim =
θ
θ→0

x0 = q x q ∗ (136) R Exp(θ)v − Rv R(I+[θ]× )v − Rv


lim = lim
θ→0 θ θ→0 θ
while rotation matrices use a single matrix product, R [θ]× v −R [v]× θ
= lim = lim = −R [v]×
θ→0 θ θ→0 θ
x0 = Rx . (137) (150)
Both correspond to a right-hand rotation of θ rad around the where we used the properties Exp(θ) ≈ I+[θ]× and [a]× b =
axis u. Identifying in them x and x0 yields the identity − [b]× a. The second Jacobian yields,
" 2 2 2 2 #
w +x −y −z 2(xy−wz) 2(xz+wy)
R(q) = 2(xy+wz) w2 −x2 +y 2 −z 2 2(yz−wx) (138) R(v + ∂v) − Rv
2(xz−wy) 2(yz+wx) w2 −x2 −y 2 +z 2
JR·v
v , lim =R. (151)
∂v→0 ∂v
16

A PPENDIX C 4) Rigid motion action: We have the action on points p,


T HE 2D RIGID MOTION GROUP SE(2)
M · p , t + Rp , (165)
We write elements of the rigid motion group SE(2) as

R t
 therefore and since for τ → 0 we have Exp(τ ) → I + τ ∧ ,
M= ∈ SE(2) ⊂ R3×3 , (152)
0 1 M Exp(τ ) · p − M · p 
JM·p

M = lim = R R [1]× p
with R ∈ SO(2) a rotation and t ∈ R a translation. The
2 τ →0 τ
Lie algebra and vector tangents are formed by elements of the (166)
type JM·p
p =R. (167)
   
[θ]× ρ ρ
τ∧ = ∈ se(2) , τ = ∈ R3 . (153) A PPENDIX D
0 0 θ
T HE 3D RIGID MOTION GROUP SE(3)
A. Inverse, composition
We write elements of the 3D rigid motion group SE(3) as
Inversion and composition are performed respectively with  
matrix inversion and product, R t
M= ∈ SE(3) ⊂ R4×4 , (168)
 > 0 1
−R> t

R
M−1 = (154)
0 1 with R ∈ SO(3) a rotation matrix and t ∈ R3 a translation
vector. The Lie algebra and vector tangents are formed by
 
Ra Rb t a + Ra t b
Ma Mb = . (155) elements of the type
0 1
   
[θ]× ρ ρ
B. Exp and Log maps τ∧ = ∈ se(3) , τ = ∈ R6 . (169)
0 0 θ
Exp and Log are implemented via exponential maps directly
from the scalar tangent space R3 ∼= se(2) = T SE(2) — see
[5] for the derivation, A. Inverse, composition
Inversion and composition are performed respectively with
 
Exp(θ) V(θ) ρ
M = Exp(τ ) , (156) matrix inversion and product,
0 1
 −1   >
−R> t

V (θ) t −1 R
τ = Log(M) , . (157) M = (170)
Log(R) 0 1
 
with Ra Rb ta + Ra tb
Ma Mb = . (171)
sin θ 1 − cos θ 0 1
V(θ) = I+ [1]× . (158)
θ θ
C. Jacobian blocks B. Exp and Log maps
1) Adjoint: The adjoint is easily found from (31) using the Exp and Log are implemented via exponential maps directly
fact that planar rotations commute, from the vector tangent space R6 ∼
= se(3) = T SE(3) — see
    [5] for the derivation,
Rρ − [θ]× t ρ
AdM τ = (Mτ ∧ M−1 )∨ = = AdM , 
Exp(θ) V(θ) ρ

θ θ
M = Exp(τ ) , (172)
0 1
leading to  −1 
  V (θ) t
R − [1]× t τ = Log(M) , . (173)
AdM = . (159) Log(R)
0 1
2) Inversion, composition: We have from Section III-B, with (recall for Log(M) that θ = θu = Log(R))
1 − cos θ θ − sin θ 2
 
−1 −R [1]× t
JMM = −Ad M = (160) V(θ) = I + 2
[θ]× + [θ]× (174)
0 −1 θ θ3
 >
Rb R>

JM a Mb
= Ad −1
= b [1]× tb (161)
which, notice, matches (145) exactly.
Ma M b
0 1
JM
Mb
a Mb
=I. (162) C. Jacobian blocks
3) Right and left Jacobians: We have from [11, pag. 36], 1) Adjoint: We have (see Ex. 6),
(1−cos θ)/θ (θρ1 −ρ2 +ρ2 cos θ−ρ1 sin θ)/θ 2
 
sin θ/θ
   
Jr = (cos θ−1)/θ sin θ/θ (ρ1 +θρ2 −ρ1 cos θ−ρ2 sin θ)/θ2 Rρ + [t]× Rθ ρ
AdM τ = (Mτ ∧ M−1 )∨ = = AdM
0 0 1 Rθ θ
(163)

sin θ/θ (cos θ−1)/θ (θρ1 +ρ2 −ρ2 cos θ−ρ1 sin θ)/θ 2
 therefore,
Jl = (1−cos θ)/θ sin θ/θ (−ρ1 +θρ2 +ρ1 cos θ−ρ2 sin θ)/θ 2 .  
R [t]× R
0 0 1 AdM = ∈ R6×6 . (175)
(164) 0 R
17

2) Inversion, composition: We have from Section III-B, The T (n) exponential can be obtained also from the Taylor
  expansion of exp(t∧ ) noticing that (t∧ )2 = 0. This serves as
M−1 R [t]× R immediate proof for the equivalent exponential of the (Rn , +)
JM =− (176)
0 R group, which is the identity,
 >
Rb −R>

JM a Mb
= b [tb ]× (177) Exp : Rn → Rn t = Exp(t) . (185)
Ma 0 R>b
JM a Mb
= I6 . (178) This derives in trivial, commutative, right- and left- alike, plus
Mb
and minus operators in Rn ,
3) Right and left Jacobians: Closed forms of the left
Jacobian and its inverse are given by Barfoot in [10], t1 ⊕ t2 = t1 + t2 (186)
h
J (θ) Q(ρ,θ)
i t2 t1 = t2 − t1 . (187)
Jl (ρ, θ) = l0 J (θ) (179a)
l
h −1
Jl (θ) −J−1 −1 i
l (θ) Q(ρ,θ) Jl (θ) A. Jacobian blocks
J−1
l (ρ, θ) = 0 J−1 (θ)
(179b)
l
We express translations indistinctly for T (n) and Rn , and
where Jl (θ) is the left Jacobian of SO(3), see (145), and note them S and T. The Jacobians are trivial (compare them
1 θ−sin θ with those of S 1 and SO(2) in Section A-C1),
Q(ρ, θ) = ρ× + (θ× ρ× + ρ× θ× + θ× ρ× θ× )
2 θ3 AdT = I ∈ Rn×n (188)
2
1− θ2 −cos θ 2 −1
n×n
− 2
(θ× ρ× + ρ× θ× − 3θ× ρ× θ× ) JT
T = −I ∈R (189)
θ4 n×n
2 3
! JT◦S = JT◦S =I ∈R (190)
1 1 − θ2 − cos θ θ − sin θ − θ6 T S
− −3 Jr = J l =I ∈ Rn×n (191)
2 θ4 θ5
n×n
2 2
T⊕v
JT = JT⊕v
v =I ∈R (192)
× (θ× ρ× θ× + θ× ρ× θ× ) . (180)
n×n
JSS T = −JS T
T =I ∈R . (193)
The right Jacobian and its inverse are obtained using (76), that
−1
is, Jr (ρ, θ) = Jl (−ρ, −θ) and J−1
r (ρ, θ) = Jl (−ρ, −θ). R EFERENCES
4) Rigid motion action: We have the action on points p,
[1] H. Abbaspour and M. Moskowitz, Basic Lie Theory. WORLD
M · p , t + Rp , (181) SCIENTIFIC, 2007. [Online]. Available: https://worldscientific.com/
doi/abs/10.1142/6462
therefore and since for τ → 0 we have Exp(τ ) → I + τ ∧ , [2] R. Howe, “Very basic Lie theory,” The American Mathematical Monthly,
vol. 90, pp. 600–623, 1983.
M Exp(τ ) · p − M · p  [3] J. Stillwell, Naive Lie Theory. Springer-Verlag New York, 2008.
JM·p

M = lim = R −R [p]× [4] T. D. Barfoot, State Estimation for Robotics. Cambridge University
τ →0 τ Press, 2017.
(182) [5] E. Eade, “Lie groups for 2d and 3d transformations,” Tech. Rep.
JM·p
p =R. (183) [6] C. Forster, L. Carlone, F. Dellaert, and D. Scaramuzza, “On-manifold
preintegration for real-time visual–inertial odometry,” IEEE Transactions
on Robotics, vol. 33, no. 1, pp. 1–21, 2017.
A PPENDIX E [7] J. Deray and J. Solà, “Manif: A micro lie theory library for
state estimation in robotics applications,” Journal of Open Source
T HE TRANSLATION GROUPS (Rn , +) AND T (n) Software, vol. 5, no. 46, p. 1371, 2020. [Online]. Available:
The group (Rn , +) is the group of vectors under addition https://doi.org/10.21105/joss.01371
[8] J. Solà, “Quaternion kinematics for the error-state Kalman filter,”
and can be regarded as a translation group. We deem it trivial CoRR, vol. abs/1711.02508, 2017. [Online]. Available: http://arxiv.org/
in the sense that the group elements, the Lie algebra, and the abs/1711.02508
tangent spaces are all the same, so t = t∧ = Exp(t). Its [9] G. Gallego and A. Yezzi, “A compact formula for the derivative of a
3-D rotation in exponential coordinates,” Tech. Rep., 2013.
equivalent matrix group (under multiplication) is the transla- [10] T. D. Barfoot and P. T. Furgale, “Associating uncertainty with three-
tion group T (n), whose group, Lie algebra and tangent vector dimensional poses for use in estimation problems,” IEEE Transactions
elements are, on Robotics, vol. 30, no. 3, pp. 679–693, June 2014.
    [11] G. Chirikjian, Stochastic Models, Information Theory, and Lie Groups,
I t ∧ 0 t Volume 2: Analytic Methods and Modern Applications, ser. Applied and
T, ∈ T (n), t , ∈ t(n), t ∈ Rn . Numerical Harmonic Analysis. Birkhäuser Boston, 2011. [Online].
0 1 0 0
Available: https://books.google.ch/books?id=hZ1CAAAAQBAJ
Equivalence is easily verified by observing that T(0) = I, [12] F. Dellaert and M. Kaess, “Square Root SAM: Simultaneous Localiza-
tion and Mapping via Square Root Information Smoothing,” vol. 25,
T(−t) = T(t)−1 , and that the commutative composition no. 12, pp. 1181–1203, 2006.
  [13] M. Kaess, H. Johannsson, R. Roberts, V. Ila, J. Leonard, and F. Dellaert,
I t1 + t2 “iSAM2: Incremental smoothing and mapping with fluid relineariza-
T1 T2 = ,
0 1 tion and incremental variable reordering,” in Robotics and Automation
(ICRA), 2011 IEEE International Conference on, May 2011, pp. 3281–
effectively adds the vectors t1 and t2 together. Since the sum 3288.
in Rn is commutative, so is the composition product in T (n). [14] R. Kummerle, G. Grisetti, H. Strasdat, K. Konolige, and W. Burgard,
“G2o: A general framework for graph optimization,” in Robotics and
Since T (n) is a subgroup of SE(n) with R = I, we can easily Automation (ICRA), 2011 IEEE International Conference on, May 2011,
determine its exponential map by taking (156, 172) with R = I pp. 3607–3613.
and generalizing to any n, [15] V. Ila, L. Polok, M. Solony, and P. Svoboda, “SLAM++ - a highly
  efficient and temporally scalable incremental SLAM framework,” The
n I t International Journal of Robotics Research, vol. 36, no. 2, pp. 210–230,
Exp : R → T (n) ; T = Exp(t) = . (184)
0 1 2017. [Online]. Available: https://doi.org/10.1177/0278364917691110

You might also like