The special Euclidean group
LieGroups.SpecialEuclideanGroup
β TypeSpecialEuclideanGroup{T}
The special Euclidean group $\mathrm{SE}(n) = \mathrm{SO}(n) β \mathcal T(n)$ is the Lie group consisting of the LeftSemidirectProductGroupOperation
of the SpecialOrthogonalGroup
and the TranslationGroup
together with the GroupOperationAction
{
LeftGroupOperationAction
}
.
To be precise, the group operation is defined on $\mathrm{SO}(n) β \mathcal T(n)$ as follows:
\[(r_1, t_1) β (r_2, t_2) = (r_1βr_2, t_1 + r_1β t_2),\]
where $r_1,r_2 β \mathrm{SO}(n)$ and $t_1,t_2 β \mathcal T(n)$
Analogously you can write this on elements of $\mathrm{SO}(n) β \mathcal T(n)$ as
\[(t_1, r_1) β (t_2, r_2) = (t_1 + r_1β s_2, r_1βr_2)\]
Both these cases can be represented in a single matrix in affine form
\[g = \begin{pmatrix} r & t\\ \mathbf{0}_n^{\mathrm{T}} & 1\end{pmatrix}, \qquad r β \mathrm{SO}(n), t β \mathcal T(n),\]
where $\mathbf{0}_n β β^n$ denotes the vector containing zeros.
We refer also in general to elements on $\mathrm{SE}(n)$ as $g$ and their rotation and translation components as $r$ and $t$, respectively.
Constructor
SpecialEuclideanGroup(n::Int; variant=:left, kwargs...)
SpecialOrthogonalGroup(n; kwargs...) β TranslationGroup(n; kwargs...)
TranslationGroup(n; kwargs...) β SpecialOrthogonalGroup(n; kwargs...)
Generate special Euclidean group $\mathrm{SE}(n) = \mathrm{SO}(n) β \mathcal T(n)$, where the first constructor is equivalent to the second.
All keyword arguments in kwargs...
are passed on to Rotations
as well.
The default representation for $\mathrm{SE}(n)$ is the affine form. Alternatively you can use the ArrayPartition
from RecursiveArrayTools.jl
to work on $(r,t)$. or for $\mathcal T(n) β \mathrm{SO}(n)$ using the ArrayPartition
s $(t,r)$; which corresponds to setting variant=:right
in the first constructor.
Representation of points and tangent vectors
LieGroups.SpecialEuclideanMatrixPoint
β TypeSpecialEuclideanMatrixPoint <: AbstractLieGroupPoint
represent a point on some LieGroup
by an affine matrix.
\[\begin{pmatrix} M & v\\ \mathbf{0}_n^{\mathrm{T}} & 1\end{pmatrix} β β^{(n+1)Γ(n+1)}, \qquad M β β^{nΓn}, v β \mathcal T(n),\]
where $\mathbf{0}_n β β^n$ denotes the vector containing zeros.
LieGroups.SpecialEuclideanMatrixTangentVector
β TypeSpecialEuclideanMatrixTangentVector <: AbstractLieAlgebraTangentVector
represent a tangent vector on some LieGroup
by a matrix of the form
\[\begin{pmatrix} M & v\\ \mathbf{0}_n^{\mathrm{T}} & 0\end{pmatrix} β β^{(n+1)Γ(n+1)}, \qquad M β β^{nΓn}, v β \mathcal T(n),\]
where $\mathbf{0}_n β β^n$ denotes the vector containing zeros.
While this tangent vector itself is not an affine matrix itself, it can be used for the Lie algebra of the affine group
LieGroups.SpecialEuclideanProductPoint
β TypeSpecialEuclideanProductPoint <: AbstractLieGroupPoint
Represent a point on a Lie group (explicitly) as a point that consists of components
LieGroups.SpecialEuclideanProductTangentVector
β TypeSpecialEuclideanProductTangentVector <: AbstractLieAlgebraTangentVector
Represent a point on a Lie algebra (explicitly) as a tangent vector that consists of components.
Specific functions
Base.exp
β Methodexp(G::SpecialEuclidean, X)
exp!(G::SpecialEuclidean, g, X)
Compute the Lie group exponential function on the SpecialEuclideanGroup
G
$=\mathrm{SE}(2)$ using a TypeParameter
{Tuple{2}}
for dispatch.
The Lie algebra vector $X = (Y, v) β \mathfrak se(2)$ consists of a rotation component $Y β \mathfrak so(2)$ and a translation component $v β \mathfrak t(2)$, so we can use vee
on $\mathrm{SO}(2)$ to obtain the angle of rotation $Ξ±$ (or alternatively using $\sqrt{2}Ξ± = \lVert Y \rVert_{}$)
For $Ξ± β 0$ define
\[U_Ξ± = \frac{\sinΞ±}{Ξ±}I_2 + \frac{1-\cosΞ±}{Ξ±^2}Y,\]
and $U_0 = I_2$, where $I_2$ is the identity matrix.
Then the result $g=(R,t)$ is given by
\[R = \exp_{\mathrm{SO}(2)}Y β \mathrm{SO}(2), \quad \text{ and } \quad t = U_Ξ±v β \mathcal T(2).\]
This result can be computed in-place of g
.
Base.exp
β Methodexp(G::SpecialEuclidean, X)
exp!(G::SpecialEuclidean, g, X)
Compute the Lie group exponential function on the SpecialEuclideanGroup
G
$=\mathrm{SE}(3)$ using a TypeParameter
{Tuple{3}}
for dispatch.
Since $X = (Y, v) β \mathfrak se(3)$ consists of a rotation component $Y β \mathfrak se(3)$ and a translation component $v β \mathfrak t(3)$, we can use vee
on $\mathrm{SO}(3)$ computing the coefficients norm to obtain the angle of rotation $Ξ±$ (or alternatively using $\sqrt{2}Ξ± = \lVert Y \rVert_{}$).
For $Ξ± β 0$ define
\[U_Ξ± = I_3 + \frac{1-\cosΞ±}{Ξ±^2}Y + \frac{Ξ±-\sinΞ±}{Ξ±^3}Y^2,\]
and $U_0 = I_3$, where $I_2$ is the identity matrix.
Then the result $g=(R,t)$ is given by
\[R = \exp_{\mathrm{SO}(3)}Y β \mathrm{SO}(3), \quad \text{ and } \quad t = U_Ξ±v β \mathcal T(3).\]
This result can be computed in-place of g
.
Base.getindex
β Methodg[G::SpecialEuclideanGroup,s]
getindex(g, G::SpecialEuclideanGroup, s)
X[π€,s]
getindex(g, π€, s)
Access sub-parts of a SpecialEuclideanGroup
G
or its Lie algebra π€
. where s
can be an index :Rotation
, :Translation
to access the single parts. Use :
to access all submanifold components as a unified tuple.
Base.getindex
β Methodg[G::SpecialEuclideanGroup,s]
getindex(g, G::SpecialEuclideanGroup, s)
X[π€,s]
getindex(g, π€, s)
Access sub-parts of a SpecialEuclideanGroup
G
or its Lie algebra π€
. where s
can be an index :Rotation
, :Translation
to access the single parts. Use :
to access all submanifold components as a unified tuple.
Base.getindex
β Methodg[G::SpecialEuclideanGroup,s]
getindex(g, G::SpecialEuclideanGroup, s)
X[π€,s]
getindex(g, π€, s)
Access sub-parts of a SpecialEuclideanGroup
G
or its Lie algebra π€
. where s
can be an index :Rotation
, :Translation
to access the single parts. Use :
to access all submanifold components as a unified tuple.
Base.inv
β Methodinv(G::SpecialEuclideanGroup, g)
inv(G::SpecialEuclideanGroup, h, g)
Compute the inverse element of a $g β \mathrm{SE}(n)$ from the SpecialEuclideanGroup
(n)
.
In affine form, $g = \begin{pmatrix} r & t\\ \mathbf{0}_n^{\mathrm{T}} & 1\end{pmatrix}$, where $\mathbf{0}_n β β^n$ denotes the vector containing zeros.
The inverse reads
\[g^{-1} = \begin{pmatrix} r^{\mathrm{T}} & -r^{\mathrm{T}}t\\ \mathbf{0}_n^{\mathrm{T}} & 1\end{pmatrix}.\]
This computation can be done in-place of h
.
Base.log
β Methodlog(G::SpecialEuclidean, g)
log!(G::SpecialEuclidean, X, g)
Compute the Lie group logarithm function on the SpecialEuclideanGroup
G
$=\mathrm{SE}(2)$, and G
uses a TypeParameter
{Tuple{2}}
for dispatch.
Since $g=(R,t) β \mathrm{SE}(2)$ consists of a rotation component $R β \mathrm{SO}(2)$ and a translation component $t β \mathcal T(2)$, we first compute $Y = \log_{\mathrm{SO}(2)}R$. Then we can use vee
on $\mathrm{SO}(2)$ to obtain the angle of rotation $Ξ±$ (or alternatively using $\sqrt{2}Ξ± = \lVert Y \rVert_{}$)
For $Ξ± β 0$ define
\[V_Ξ± = \frac{Ξ±}{2} \begin{pmatrix} \frac{\sinΞ±}{1-\cosΞ±} & 1\\ -1 & \frac{\sinΞ±}{1-\cosΞ±}\end{pmatrix}\]
and $V_0 = I_2$, where $I_2$ is the identity matrix. Note that this is the inverse of $U_Ξ±$ as given in the group exponential
Then the result $X = (Y, v) β \mathfrak se(2)$ is given by $Y β \mathfrak so(2)$ as computed above and
\[v = V_Ξ±r β \mathcal T(2),\]
where $v$ is computed in-place without setting up $V_Ξ±$
This result can be computed in-place of g
.
Base.log
β Methodlog(G::SpecialEuclidean, g)
log!(G::SpecialEuclidean, X, g)
Compute the Lie group logarithm function on the SpecialEuclideanGroup
G
$=\mathrm{SE}(3)$, where e
is the Identity
on $\mathrm{SE}(3)$ G
uses a TypeParameter
{Tuple{3}}
for dispatch.
Since $g=(R,t) β \mathrm{SE}(3)$ consists of a rotation component $R β \mathrm{SO}(3)$ and a translation component $t β \mathcal T(2)$, we first compute $Y = \log_{\mathrm{SO}(3)}R$. Then we can use vee
on $\mathrm{SO}(3)$ to obtain the angle of rotation $Ξ±$ (or alternatively using $\sqrt{2}Ξ± = \lVert Y \rVert_{}$)
For $Ξ± β 0$ define
\[V_Ξ± = I_3 - \frac{1}{2}Y + Ξ² Y^2, \quad\text{ where } Ξ² = \frac{1}{Ξ±^2} - \frac{1 + \cos(Ξ±)}{2Ξ±\sin(Ξ±)}\]
and $V_0 = I_3$, where $I_3$ is the identity matrix. Note that this is the inverse of $U_Ξ±$ as given in the group exponential
Then the result $X = (Y, v) β \mathfrak se(3)$ is given by $Y β \mathfrak so(3)$ as computed above and $v = V_Ξ± t β \mathfrak t(3)$.
This result can be computed in-place of X
.
LieGroups.default_left_action
β Methoddefault_left_action(G::SpecialOrthogonalGroup, ::TranslationGroup)
Return the default left action for the special Euclidean group $\mathrm{SO}(n) β \mathcal T(n)$, that is the GroupOperationAction
(
LeftGroupOperationAction
(G.op))
.
LieGroups.default_right_action
β Methoddefault_right_action(::TranslationGroup, G::SpecialOrthogonalGroup)
Return the default right action for the special Euclidean group, that is the GroupOperationAction
(
LeftGroupOperationAction
(G.op))
.
LieGroups.init_constants!
β Methodinit_constants!(G::SpecialEuclidean, g)
init_Constants!(π°π’::LieAlgebra{β, SpecialEuclideanGroupOperation, SpecialEuclidean}, X)
Initialize the constant elements of g
or X
.
The matrix representation of $gβ\mathrm{SE}(n)$ has a last row, that contains zeros, besides the diagonal element, which is $g_{n+1,n+1} = 1$.
The matrix representation of $Xβ\mathfrak se(n)$ has a last row that contains zeros.
this function sets these entries accordingly.
Per default for other representations, this function does not change entries for them.
LieGroups.init_constants!
β Methodinit_constants!(G::SpecialEuclidean, g)
init_Constants!(π°π’::LieAlgebra{β, SpecialEuclideanGroupOperation, SpecialEuclidean}, X)
Initialize the constant elements of g
or X
.
The matrix representation of $gβ\mathrm{SE}(n)$ has a last row, that contains zeros, besides the diagonal element, which is $g_{n+1,n+1} = 1$.
The matrix representation of $Xβ\mathfrak se(n)$ has a last row that contains zeros.
this function sets these entries accordingly.
Per default for other representations, this function does not change entries for them.
LieGroups.inv!
β Methodinv(G::SpecialEuclideanGroup, g)
inv(G::SpecialEuclideanGroup, h, g)
Compute the inverse element of a $g β \mathrm{SE}(n)$ from the SpecialEuclideanGroup
(n)
.
In affine form, $g = \begin{pmatrix} r & t\\ \mathbf{0}_n^{\mathrm{T}} & 1\end{pmatrix}$, where $\mathbf{0}_n β β^n$ denotes the vector containing zeros.
The inverse reads
\[g^{-1} = \begin{pmatrix} r^{\mathrm{T}} & -r^{\mathrm{T}}t\\ \mathbf{0}_n^{\mathrm{T}} & 1\end{pmatrix}.\]
This computation can be done in-place of h
.
ManifoldsBase.exp!
β Methodexp(G::SpecialEuclidean, X)
exp!(G::SpecialEuclidean, g, X)
Compute the Lie group exponential function on the SpecialEuclideanGroup
G
$=\mathrm{SE}(3)$ using a TypeParameter
{Tuple{3}}
for dispatch.
Since $X = (Y, v) β \mathfrak se(3)$ consists of a rotation component $Y β \mathfrak se(3)$ and a translation component $v β \mathfrak t(3)$, we can use vee
on $\mathrm{SO}(3)$ computing the coefficients norm to obtain the angle of rotation $Ξ±$ (or alternatively using $\sqrt{2}Ξ± = \lVert Y \rVert_{}$).
For $Ξ± β 0$ define
\[U_Ξ± = I_3 + \frac{1-\cosΞ±}{Ξ±^2}Y + \frac{Ξ±-\sinΞ±}{Ξ±^3}Y^2,\]
and $U_0 = I_3$, where $I_2$ is the identity matrix.
Then the result $g=(R,t)$ is given by
\[R = \exp_{\mathrm{SO}(3)}Y β \mathrm{SO}(3), \quad \text{ and } \quad t = U_Ξ±v β \mathcal T(3).\]
This result can be computed in-place of g
.
ManifoldsBase.exp!
β Methodexp(G::SpecialEuclidean, X)
exp!(G::SpecialEuclidean, g, X)
Compute the Lie group exponential function on the SpecialEuclideanGroup
G
$=\mathrm{SE}(2)$ using a TypeParameter
{Tuple{2}}
for dispatch.
The Lie algebra vector $X = (Y, v) β \mathfrak se(2)$ consists of a rotation component $Y β \mathfrak so(2)$ and a translation component $v β \mathfrak t(2)$, so we can use vee
on $\mathrm{SO}(2)$ to obtain the angle of rotation $Ξ±$ (or alternatively using $\sqrt{2}Ξ± = \lVert Y \rVert_{}$)
For $Ξ± β 0$ define
\[U_Ξ± = \frac{\sinΞ±}{Ξ±}I_2 + \frac{1-\cosΞ±}{Ξ±^2}Y,\]
and $U_0 = I_2$, where $I_2$ is the identity matrix.
Then the result $g=(R,t)$ is given by
\[R = \exp_{\mathrm{SO}(2)}Y β \mathrm{SO}(2), \quad \text{ and } \quad t = U_Ξ±v β \mathcal T(2).\]
This result can be computed in-place of g
.
ManifoldsBase.log!
β Methodlog(G::SpecialEuclidean, g)
log!(G::SpecialEuclidean, X, g)
Compute the Lie group logarithm function on the SpecialEuclideanGroup
G
$=\mathrm{SE}(2)$, and G
uses a TypeParameter
{Tuple{2}}
for dispatch.
Since $g=(R,t) β \mathrm{SE}(2)$ consists of a rotation component $R β \mathrm{SO}(2)$ and a translation component $t β \mathcal T(2)$, we first compute $Y = \log_{\mathrm{SO}(2)}R$. Then we can use vee
on $\mathrm{SO}(2)$ to obtain the angle of rotation $Ξ±$ (or alternatively using $\sqrt{2}Ξ± = \lVert Y \rVert_{}$)
For $Ξ± β 0$ define
\[V_Ξ± = \frac{Ξ±}{2} \begin{pmatrix} \frac{\sinΞ±}{1-\cosΞ±} & 1\\ -1 & \frac{\sinΞ±}{1-\cosΞ±}\end{pmatrix}\]
and $V_0 = I_2$, where $I_2$ is the identity matrix. Note that this is the inverse of $U_Ξ±$ as given in the group exponential
Then the result $X = (Y, v) β \mathfrak se(2)$ is given by $Y β \mathfrak so(2)$ as computed above and
\[v = V_Ξ±r β \mathcal T(2),\]
where $v$ is computed in-place without setting up $V_Ξ±$
This result can be computed in-place of g
.
ManifoldsBase.log!
β Methodlog(G::SpecialEuclidean, g)
log!(G::SpecialEuclidean, X, g)
Compute the Lie group logarithm function on the SpecialEuclideanGroup
G
$=\mathrm{SE}(3)$, where e
is the Identity
on $\mathrm{SE}(3)$ G
uses a TypeParameter
{Tuple{3}}
for dispatch.
Since $g=(R,t) β \mathrm{SE}(3)$ consists of a rotation component $R β \mathrm{SO}(3)$ and a translation component $t β \mathcal T(2)$, we first compute $Y = \log_{\mathrm{SO}(3)}R$. Then we can use vee
on $\mathrm{SO}(3)$ to obtain the angle of rotation $Ξ±$ (or alternatively using $\sqrt{2}Ξ± = \lVert Y \rVert_{}$)
For $Ξ± β 0$ define
\[V_Ξ± = I_3 - \frac{1}{2}Y + Ξ² Y^2, \quad\text{ where } Ξ² = \frac{1}{Ξ±^2} - \frac{1 + \cos(Ξ±)}{2Ξ±\sin(Ξ±)}\]
and $V_0 = I_3$, where $I_3$ is the identity matrix. Note that this is the inverse of $U_Ξ±$ as given in the group exponential
Then the result $X = (Y, v) β \mathfrak se(3)$ is given by $Y β \mathfrak so(3)$ as computed above and $v = V_Ξ± t β \mathfrak t(3)$.
This result can be computed in-place of X
.