Skip to content

Commit

Permalink
Merge pull request #834 from mateuszbaran/patch-1
Browse files Browse the repository at this point in the history
Small changes to using_manifolds.md docs
  • Loading branch information
dehann authored Apr 5, 2022
2 parents ebeff87 + d95da80 commit 8af4d9d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/src/concepts/using_manifolds.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ If you are drinking some coffee right now, then you are moving the cup in `Eucli

What if you are concerned with the orientation of the cup too---as in not spill the hot contents everywhere---then you might actually want to work on the [`SpecialEuclidean(3)`](https://juliamanifolds.github.io/Manifolds.jl/stable/manifolds/group.html#Special-Euclidean-group) manifold -- that is 3 degrees of translational freedom, and 3 degrees of rotational freedom. You might have heard of [Lie Groups](https://en.wikipedia.org/wiki/Lie_group) and [Lie Algebras](https://en.wikipedia.org/wiki/Lie_algebra), well that is exactly it, Lie Groups are a special set of Group Manifolds and associated operations that are already supported by [JuliaManifolds/Manifolds.jl](https://github.com/JuliaManifolds/Manifolds.jl).

Things are a little easier for a robot traveling around on a flat 2D surface. If you robot is moving around with coordinates ``[x,y,\theta]``, well then you are working with the coordinates of the `SpecialEuclidean(2)` manifold. There is more to say on how you the coordinates ``[x,y,\theta]`` get converted into the `se(2)` Lie algebra, and that gets converted into a Lie Group element -- i.e. ``([x;y], RotMat(\theta))``. More on that later.
Things are a little easier for a robot traveling around on a flat 2D surface. If your robot is moving around with coordinates ``[x,y,\theta]``, well then you are working with the coordinates of the `SpecialEuclidean(2)` manifold. There is more to say on how the coordinates ``[x,y,\theta]`` get converted into the `se(2)` Lie algebra, and that gets converted into a Lie Group element -- i.e. ``([x;y], \mathrm{RotMat}(\theta))``. More on that later.

Perhaps you are interested in relativistic effects where time as the fourth dimension is of interest, well then the [Minkowski space](https://en.wikipedia.org/wiki/Minkowski_space) provides Group and Manifold constructs for that -- actually Minkowski falls under the supported [Lorentz Manifolds](https://juliamanifolds.github.io/Manifolds.jl/stable/manifolds/lorentz.html).

Expand All @@ -63,11 +63,11 @@ Although you will be able to find many answers for these seven questions in many

### Manifold Tutorials

The rest of this page is devoted to showing you how to use the math, write your own code to do new things beyond what Caesar.jl can already do. If are willing to share any contributions, please do so by opening pull requests against the related repos.
The rest of this page is devoted to showing you how to use the math, write your own code to do new things beyond what Caesar.jl can already do. If you are willing to share any contributions, please do so by opening pull requests against the related repos.

## Using Manifolds in Factors

The best way to show this is just dive straight into a factor that actually uses a Manifolds mechanization, and [`RoME.Pose2Pose2`](@ref) is a fairly straight forward example. This factor gets used for rigid transforms on a 2D plane, with coordinates ``[x,y,\theta]`` as elluded to above.
The best way to show this is just dive straight into a factor that actually uses a Manifolds mechanization, and [`RoME.Pose2Pose2`](@ref) is a fairly straight forward example. This factor gets used for rigid transforms on a 2D plane, with coordinates ``[x,y,\theta]`` as alluded to above.

### A Tutorial on Rotations

Expand Down Expand Up @@ -100,7 +100,7 @@ JuliaManifolds.jl is designed to make [it as easy as possible to define your own
### Q1) What are Point, Tangents, Coordinates

A manifold ``M`` is a collection of points that together create the given space. **Points** are like round sprinkles on the donut. The representation of points will vary from manifold to manifold. Sometimes it is even possible to have different representations for the same point on a manifold. These are usually denoted as ``p``.
Tangent **vectors** (we prefer _tangents_ for clarity) is a vector ``x`` that emminates from a point on a manifold. A vector lives in the tangent space of the manifold, a local flat region around a point ``x \in T_M(p)``. On the donut, imagine a rod-shaped sprinkle stuck along the tangent of the surface at a particular point ``p``. The **tangent space** is the collection of all possible tangents at ``p``.
Tangent **vectors** (we prefer _tangents_ for clarity) is a vector ``x`` that emanates from a point on a manifold. A vector lives in the tangent space of the manifold, a locally flat region around a point ``x \in T_M(p)``. On the donut, imagine a rod-shaped sprinkle stuck along the tangent of the surface at a particular point ``p``. The **tangent space** is the collection of all possible tangents at ``p``.

**Coordinates** are a user defined property that uses the Euclidean nature of the tangent space at point ``p`` to operate as a regular linear space. Coordinates are just a list of the indepedent coordinate dimensions of the tangent space values collected together. Read this part carefully, as it can easily be confused with a conventional tangent vector in a regular Euclidean space.

Expand All @@ -110,23 +110,23 @@ This trivial overlapping of "vectors" in the Euclidean Manifold, and in a tangen

### Q2) What is the Logarithm map

Multiple ``x = logmap(M,p,q)`` types can exist for some manifolds. The logarithm computes, based at point ``p``, the tangent vector ``x`` on the tangent plane ``T_M(p)`` from ``p``. In other words, image a string following the curve of a manifold from ``p`` to ``q``, pick up that string from ``q`` while holding ``p`` firm, until the string is flat against the tangent space emminating from ``p``. The logarithm is the opposite of the exponential map.
Multiple `x = logmap(M,p,q)` types can exist for some manifolds. The logarithm computes, based at point ``p``, the tangent vector ``x`` on the tangent plane ``T_M(p)`` from ``p``. In other words, image a string following the curve of a manifold from ``p`` to ``q``, pick up that string from ``q`` while holding ``p`` firm, until the string is flat against the tangent space emminating from ``p``. The logarithm is the opposite of the exponential map.

### Q3) What is the Exponential map

The exponential map does the opposite of the logarithm. Image a tangent vector ``x`` emminating from point ``p``. The length and direction of ``x`` can be wrapped onto the curvature of the manifold to form a line on the manifold surface.
The exponential map does the opposite of the logarithm. Image a tangent vector ``x`` emanating from point ``p``. The length and direction of ``x`` can be wrapped onto the curvature of the manifold to form a line on the manifold surface.
### Q4) What does `vee`/`hat` do

`vee` is an operation that converts a tangent vector representation into a coordinate representation. For example Lie algebra elements are tangent vector elements, so ``vee([0 -w; w 0]) = w``. And visa versa for ``hat(w) = [0 -w; w 0]``, which goes from coordinates to tangent vectors.
`vee` is an operation that converts a tangent vector representation into a coordinate representation. For example Lie algebra elements are tangent vector elements, so `vee([0 -w; w 0]) = w`. And visa versa for `hat(w) = [0 -w; w 0]`, which goes from coordinates to tangent vectors.
### Q5) What Riemannian vs. Group Manifolds

Groups are defined mathematical structures which often fit well inside the manifold way of working. For example in robotics, Lie Groups are popular under `SpecialEuclidean(N) <: AbstractGroupManifold`. [Groups](https://en.wikipedia.org/wiki/Group_(mathematics)) also have a well defined action. Most prominently for our usage, groups are sets of points for which there exists an identity point. [Riemannian manifolds](https://en.wikipedia.org/wiki/Riemannian_manifold) are more general that groups, specifically Riemannian manifolds do not have an identity point.
Groups are mathematical structures which often fit well inside the manifold way of working. For example in robotics, Lie Groups are popular under `SpecialEuclidean(N) <: AbstractGroupManifold`. [Groups](https://en.wikipedia.org/wiki/Group_(mathematics)) also have a well defined action. Most prominently for our usage, groups are sets of points for which there exists an identity point. [Riemannian manifolds](https://en.wikipedia.org/wiki/Riemannian_manifold) are more general than Lie groups, specifically Riemannian manifolds do not have an identity point.

An easy example is that the `Euclidean(N)` manifold does not have an identity element, since what we know as ``[0,0]`` is actually a coordinate base point for the local tangent space, and which just happens to look the same as the underlying `Euclidean(N)` manifold. The `TranslationGroup(N)` exists in the `Euclidean(N)` space, but has a defined identity element as well as a defined operations on points.
An easy example is that the `Euclidean(N)` manifold does not have an identity element, since what we know as ``[0,0]`` is actually a coordinate base point for the local tangent space, and which just happens to look the same as the underlying `Euclidean(N)` manifold. The `TranslationGroup(N)` exists as an additional structure over the `Euclidean(N)` space which has a defined identity element as well as a defined operations on points.

### Q6) Retraction vs. Exp map

Retractions are numerically efficient approximations to convert a tangent vector onto the manifold. The exponential map is the theoretically precise retraction, but may well be computationally expensive beyond the need for most applications.
Retractions are numerically efficient approximations to convert a tangent vector into a point on the manifold. The exponential map is the theoretically precise retraction, but may well be computationally expensive beyond the need for most applications.

### Q7) Projection vs. Log map

Expand Down

0 comments on commit 8af4d9d

Please sign in to comment.