LieGroups.jl

Lie groups and Lie algebras in Julia

Work with Lie groups, their Lie algebras, and group actions

LieGroups.jl LieGroups.jl
๐Ÿชถ

Lightweight Interface

This package provides a lightweight interface to define Lie groups based on the LieGroup combining a AbstractManifold from ManifoldsBase.jl with a GroupOperation. Especially the exp and log maps are here the Lie group ones.

๐Ÿงฎ

Lie Algebra and group actions

The LieAlgebra is generically provided including an . Furthermore GroupActions allow Lie groups to act on other manifolds.

โšก๏ธ

Efficient

When possible, functions are available working in-place, like exp! or log! to reduce memory allocations. The neutral element, the Identity{<:GroupOperation} provides an allocation free implementation that can โ€œmaterialiseโ€ into the correct actual point on the Lie group when necessary.

LieGroups.jl LieGroups.jl

Library of Lie groups

This package provides a library of Lie groups. On the one hand there are abstract product- and power- as well as semidirect product Lie groups. On the other hand a library of concrete Lie groups is available as well.

๐Ÿ“š

Well-documented and -tested

All Lie groups are documented โ€“ both their theoretical foundation and all numerical functionality. The theoretical background also refers to further literature. A test suite provides a comprehensive verification for any Lie group, existing and newly written, as well.

Manifolds.jl Manifolds.jl

Manifolds.jl

The manifolds from Manifolds.jl build the foundation of the Lie groups implemented here. At the same time every LieGroup is also a manifold (with a different connection), so they can for example be used with Manopt.jl.

The implemented Lie groups use the interface for manifolds in ManifoldsBase.jl together with an interface for Lie groups and Lie algebras as well as internally using the manifolds implemented in Manifolds.jl.

For more general information about the history of and contributions to the package see the About page.

Getting started

To install the package just type

using Pkg; Pkg.add("LieGroups")

Then you can directly start, for example consider the SpecialEuclideanGroup $\mathrm{SE}(3)$ representing all orientations and places an object can take in $โ„^3$. These are characterised by a $3ร—3$ rotation matrix together with a point the object is at. For example. having such a point, we can use the Lie group logarithmic function log(G::SpecialEuclideanGroup, g) and the Lie group exponential function exp(G::SpecialEuclideanGroup, X) to create an orientation โ€œhalf the wayโ€ from the origin pose.

The default representation is in homogeneous coordinates

using LieGroupsSE3 = SpecialEuclideanGroup(3)g = 1/sqrt(2) .* [1.0 -1.0 0.0 0.0; 1.0 1.0 0.0 3.0*sqrt(2); 0.0 0.0 sqrt(2) 0.0; 0.0 0.0 0.0 sqrt(2)]
4ร—4 Matrix{Float64}:
 0.707107  -0.707107  0.0  0.0
 0.707107   0.707107  0.0  3.0
 0.0        0.0       1.0  0.0
 0.0        0.0       0.0  1.0

Then half that pose is

h = exp(SE3, 0.5 .* log(SE3, g))
4ร—4 Matrix{Float64}:
 0.92388   -0.382683  0.0  0.298369
 0.382683   0.92388   0.0  1.5
 0.0        0.0       1.0  0.0
 0.0        0.0       0.0  1.0

To check, just โ€œperform that movementโ€ twice with the group operation compose of h with itself to get g back

compose(SE3, h, h)
4ร—4 Matrix{Float64}:
 0.707107  -0.707107  0.0  3.33067e-16
 0.707107   0.707107  0.0  3.0
 0.0        0.0       1.0  0.0
 0.0        0.0       0.0  1.0

for more details see the get started tutorial.