Algorithm Search⌘K

Conceptresearch

Uncertainty on Lie groups

Also called concentrated Gaussian on SE(3).

A random pose as a mean in SE(3) times the exponential of a Gaussian twist, so covariances live in the Lie algebra.

Uncertainty on a Lie group is the practice of describing a random rotation or pose by a mean element of the group and a small random perturbation in its tangent space. For a pose, the model is T=TˉExp⁡(ξ)T = \bar T \operatorname{Exp}(\xi) with ξ∼N(0,Σ)\xi \sim \mathcal N(0, \Sigma), where Tˉ\bar T is in the special Euclidean group SE(3), ξ\xi is a 6-vector twist and Exp⁡\operatorname{Exp} is the SE(3) exponential. Every sample is a valid pose, the covariance Σ\Sigma is a 6 by 6 matrix with one row for each degree of freedom, and there is no singularity as there is with Euler angles. When Σ\Sigma is small, the distribution is called a concentrated Gaussian, and the usual rules for means and covariances carry over with the adjoint in place of a rotation of axes.

In plain words

A pose has a position and a direction, and the set of all poses is curved. You cannot just add a small random number to each entry of a rotation, because the result is no longer a rotation. Instead, you take a best guess of the pose and then apply a small random motion to it. The small motion is a list of six numbers, three for turning and three for sliding, and these six numbers have the usual bell-shaped spread. So the spread lives in a flat space of small motions, and every sample is still a real pose. You must say whether the small motion is applied in the robot's own frame or in the fixed frame, because the two give different numbers. With this model, you can chain, invert, average and combine uncertain poses with simple matrix rules.

The idea

This page writes a twist as ξ=(ω,v)\xi = (\omega, v), angular part first, and Exp⁡(ξ)=e[ξ]\operatorname{Exp}(\xi) = e^{[\xi]} as in Lynch and Park. It uses the right perturbation TˉExp⁡(ξ)\bar T \operatorname{Exp}(\xi) unless it says otherwise. Barfoot and Furgale, and Barfoot's book, use the left perturbation Exp⁡(ξ)Tˉ\operatorname{Exp}(\xi)\bar T and order the twist as (ρ,ϕ)(\rho, \phi), translation first, so their adjoint has its blocks in the other order.

A Gaussian in the tangent space. A random pose with mean Tˉ\bar T and covariance Σ\Sigma is

T=TˉExp⁡(ξ),ξ∼N(0,Σ).T = \bar T \operatorname{Exp}(\xi), \qquad \xi \sim \mathcal N(0, \Sigma).

The vector ξ\xi is in the body frame of Tˉ\bar T. The mean Tˉ\bar T is the pose with E[Log⁡(Tˉ−1T)]=0\mathbb E[\operatorname{Log}(\bar T^{-1} T)] = 0, and Σ=E[ξξT]\Sigma = \mathbb E[\xi \xi^T]. For small Σ\Sigma the density on the group is close to exp⁡ ⁣(−12Log⁡(Tˉ−1T)TΣ−1Log⁡(Tˉ−1T))\exp\!\big(-\tfrac12 \operatorname{Log}(\bar T^{-1}T)^T \Sigma^{-1} \operatorname{Log}(\bar T^{-1}T)\big) up to a constant. The same construction with Exp⁡\operatorname{Exp} of SO(3) and a 3 by 3 covariance gives uncertain rotations.

Left and right. Because TˉExp⁡(ξ)Tˉ−1=Exp⁡(AdTˉ ξ)\bar T \operatorname{Exp}(\xi) \bar T^{-1} = \operatorname{Exp}(\mathrm{Ad}_{\bar T}\, \xi), the same random pose has the two forms

Exp⁡(ξL) Tˉ=TˉExp⁡(ξR),ξL=AdTˉ ξR,ΣL=AdTˉ ΣR AdTˉT.\operatorname{Exp}(\xi_L)\, \bar T = \bar T \operatorname{Exp}(\xi_R), \qquad \xi_L = \mathrm{Ad}_{\bar T}\, \xi_R, \qquad \Sigma_L = \mathrm{Ad}_{\bar T}\, \Sigma_R\, \mathrm{Ad}_{\bar T}^T .

The left form puts the noise in the fixed frame, and the right form puts it in the body frame. A covariance without a statement of its side has no meaning.

Inverse. T−1=Exp⁡(−ξ) Tˉ−1=Tˉ−1Exp⁡(−AdTˉ ξ)T^{-1} = \operatorname{Exp}(-\xi)\, \bar T^{-1} = \bar T^{-1} \operatorname{Exp}(-\mathrm{Ad}_{\bar T}\, \xi). So the inverse has the mean Tˉ−1\bar T^{-1} and, in the right perturbation, the covariance AdTˉ Σ AdTˉT\mathrm{Ad}_{\bar T}\, \Sigma\, \mathrm{Ad}_{\bar T}^T. This is exact, because the new perturbation is a linear function of ξ\xi.

Compounding. For independent T1=Tˉ1Exp⁡(ξ1)T_1 = \bar T_1 \operatorname{Exp}(\xi_1) and T2=Tˉ2Exp⁡(ξ2)T_2 = \bar T_2 \operatorname{Exp}(\xi_2),

T1T2=Tˉ1Tˉ2Exp⁡(AdTˉ2−1 ξ1)Exp⁡(ξ2).T_1 T_2 = \bar T_1 \bar T_2 \operatorname{Exp}(\mathrm{Ad}_{\bar T_2^{-1}}\, \xi_1) \operatorname{Exp}(\xi_2).

To first order in the Baker-Campbell-Hausdorff formula, Exp⁡(a)Exp⁡(b)≈Exp⁡(a+b)\operatorname{Exp}(a)\operatorname{Exp}(b) \approx \operatorname{Exp}(a + b), so the mean is Tˉ1Tˉ2\bar T_1 \bar T_2 and

Σ≈AdTˉ2−1 Σ1 AdTˉ2−1T+Σ2(right),Σ≈Σ1+AdTˉ1 Σ2 AdTˉ1T(left).\Sigma \approx \mathrm{Ad}_{\bar T_2^{-1}}\, \Sigma_1\, \mathrm{Ad}_{\bar T_2^{-1}}^T + \Sigma_2 \quad\text{(right)}, \qquad \Sigma \approx \Sigma_1 + \mathrm{Ad}_{\bar T_1}\, \Sigma_2\, \mathrm{Ad}_{\bar T_1}^T \quad\text{(left)}.

If ξ1\xi_1 and ξ2\xi_2 are correlated, add the cross terms AΣ12+Σ12TATA \Sigma_{12} + \Sigma_{12}^T A^T with A=AdTˉ2−1A = \mathrm{Ad}_{\bar T_2^{-1}} in the right form. This is a linearization, like the pose compounding operators of Smith, Self and Cheeseman, but the mean stays exactly on the group, and the frames of the noise are explicit. Barfoot and Furgale also give a fourth-order expression, which they compare with a second-order one, sigma points and Monte Carlo; it matters when the input covariances are large.

Mean of samples. For poses T1,…,TNT_1, \dots, T_N, iterate

Tˉ←TˉExp⁡(1N∑i=1NLog⁡(Tˉ−1Ti))\bar T \leftarrow \bar T \operatorname{Exp}\Big(\frac1N \sum_{i=1}^N \operatorname{Log}(\bar T^{-1} T_i)\Big)

until the step is small, and take Σ=1N∑iξiξiT\Sigma = \frac1N \sum_i \xi_i \xi_i^T with ξi=Log⁡(Tˉ−1Ti)\xi_i = \operatorname{Log}(\bar T^{-1} T_i). This is a Gauss-Newton step for the sum of the squared lengths of the ξi\xi_i, and it converges when the samples are concentrated, with rotation angles well below π\pi from the mean.

Fusion and functions. To fuse KK estimates (Tˉk,Σk)(\bar T_k, \Sigma_k) of one pose, minimize ∑kekTΣk−1ek\sum_k e_k^T \Sigma_k^{-1} e_k with ek=Log⁡(Tˉk−1T)e_k = \operatorname{Log}(\bar T_k^{-1} T) over TT, by Gauss-Newton with updates T←TExp⁡(δ)T \leftarrow T \operatorname{Exp}(\delta). To push the uncertainty through a function y=f(T)y = f(T), take J=∂f(TˉExp⁡(ξ))/∂ξJ = \partial f(\bar T \operatorname{Exp}(\xi)) / \partial \xi at ξ=0\xi = 0 and Σy≈JΣJT\Sigma_y \approx J \Sigma J^T. Filters and smoothers on groups use these two steps again and again.

Limits. The model is good when the rotational standard deviations are small compared with π\pi. For larger spreads, Log⁡\operatorname{Log} wraps at an angle of π\pi, the mean found by iteration can depend on the start, and the first-order compounding underestimates or overestimates the spread.

Examples

The banana is a Gaussian (planar, exact). In SE(2) write ξ=(ω,vx,vy)\xi = (\omega, v_x, v_y). A robot at the origin gets a heading error φ∼N(0,σ2)\varphi \sim \mathcal N(0, \sigma^2) and then drives 1 m along its own xx axis. The end pose is (cos⁡φ,sin⁡φ,φ)(\cos\varphi, \sin\varphi, \varphi), a rotation by φ\varphi about the start point applied to Tˉ=(1,0,0)\bar T = (1, 0, 0), so

T=Exp⁡((φ,0,0)) Tˉexactly,ΣL=diag⁡(σ2,0,0).T = \operatorname{Exp}\big((\varphi, 0, 0)\big)\, \bar T \quad\text{exactly}, \qquad \Sigma_L = \operatorname{diag}(\sigma^2, 0, 0).

The planar adjoint of a pose with translation pp and no rotation is (100py10−px01)\begin{pmatrix} 1 & 0 & 0 \\ p_y & 1 & 0 \\ -p_x & 0 & 1 \end{pmatrix}. With Tˉ−1=(−1,0,0)\bar T^{-1} = (-1, 0, 0), the right perturbation is ξR=AdTˉ−1ξL=(φ,0,φ)\xi_R = \mathrm{Ad}_{\bar T^{-1}} \xi_L = (\varphi, 0, \varphi): a turn and a slide to the left, both proportional to φ\varphi. In both forms the distribution is a Gaussian in the twist, with no approximation. In the coordinates (x,y,θ)(x, y, \theta) it is not: the samples lie on an arc. For σ=0.5\sigma = 0.5, E[x]=e−σ2/2=0.8825\mathbb E[x] = e^{-\sigma^2/2} = 0.8825, var⁡x=(1+e−2σ2)/2−e−σ2=0.0245\operatorname{var} x = (1 + e^{-2\sigma^2})/2 - e^{-\sigma^2} = 0.0245 and var⁡y=(1−e−2σ2)/2=0.1967\operatorname{var} y = (1 - e^{-2\sigma^2})/2 = 0.1967. A Gaussian in (x,y,θ)(x, y, \theta) from a linearization has the mean (1,0,0)(1, 0, 0), var⁡x=0\operatorname{var} x = 0 and var⁡y=0.25\operatorname{var} y = 0.25, and its samples leave the arc. Long, Wolfe, Mashner and Chirikjian show that the banana-shaped pose cloud of a noisy two-wheeled robot is close to a Gaussian in exponential coordinates.

Compounding turns the axes. Let T1T_1 have a right covariance with the single entry 0.010.01 at vxv_x: an error of standard deviation 0.1 m along the xx axis of frame 1. Let T2=Tˉ2T_2 = \bar T_2 be exact, a rotation Rz(π/2)R_z(\pi/2) with no translation. Then AdTˉ2−1\mathrm{Ad}_{\bar T_2^{-1}} has the diagonal blocks Rz(−π/2)R_z(-\pi/2), which maps (1,0,0)(1, 0, 0) to (0,−1,0)(0, -1, 0). The composite has the single entry 0.010.01 at vyv_y: in the body frame of T1T2T_1 T_2, which is frame 1 turned by a quarter turn, the old xx axis is the −y-y axis. Here the formula is exact, because T2T_2 has no noise. In the left form, the covariance of the composite is Σ1,L\Sigma_{1,L} without change, because the noise stays in the fixed frame.

Inverse moves heading error into position. Let Tˉ\bar T be a translation by (2,0,0)(2, 0, 0) with no rotation, and let the right covariance have only a heading variance σ2=0.01\sigma^2 = 0.01 (about zz). For a heading error δ\delta, ξ=(0,0,δ,0,0,0)\xi = (0, 0, \delta, 0, 0, 0) and AdTˉ ξ=(0,0,δ,0,−2δ,0)\mathrm{Ad}_{\bar T}\, \xi = (0, 0, \delta, 0, -2\delta, 0), because [p]ω=(2,0,0)×(0,0,δ)=(0,−2δ,0)[p]\omega = (2, 0, 0) \times (0, 0, \delta) = (0, -2\delta, 0). So T−1T^{-1} has the right perturbation (0,0,−δ,0,2δ,0)(0, 0, -\delta, 0, 2\delta, 0), with var⁡ωz=0.01\operatorname{var}\omega_z = 0.01, var⁡vy=0.04\operatorname{var} v_y = 0.04 and cov⁡(ωz,vy)=−0.02\operatorname{cov}(\omega_z, v_y) = -0.02. In words: seen from the robot, the world origin is 2 m behind it, and a heading error of δ\delta moves the origin sideways by 2δ2\delta.

Where it is used

  • Filters that keep the state on a group: the error-state Kalman filter and the invariant extended Kalman filter hold a covariance of the tangent perturbation, and the unscented Kalman filter on a group maps its sigma points through Exp⁡\operatorname{Exp}.
  • Pose graph optimization writes each edge error as Log⁡(Zij−1Xi−1Xj)\operatorname{Log}(Z_{ij}^{-1} X_i^{-1} X_j) with an information matrix in the tangent space, and updates each pose by X←XExp⁡(δ)X \leftarrow X \operatorname{Exp}(\delta).
  • Bundle adjustment perturbs camera poses in the same way, so the normal equations have 6 unknowns per camera.
  • EKF SLAM and the pose compounding operators chain uncertain robot poses; the group form keeps each mean a valid pose.
  • Uncertain rotations alone use the same model on SO(3), with the SO(3) logarithm in place of the SE(3) one; Wang and Chirikjian use covariances on the Lie algebra to propagate errors through the joints of a manipulator.

References

  1. Timothy D. Barfoot and Paul T. Furgale, Associating uncertainty with three-dimensional poses for use in estimation problems, IEEE Transactions on Robotics 30(3), 679 to 693, 2014, the whole paper (perturbations of 4x4 transforms by the exponential map, compounding of uncertain poses to second and fourth order, and fusion of pose measurements)
  2. Timothy D. Barfoot, State Estimation for Robotics, Cambridge University Press, 2017, Chapter 7, Section 7.3 (uncertainty on SO(3) and SE(3), with 7.3.3 compounding poses and 7.3.4 fusing poses)
  3. Joan Solà, Jeremie Deray and Dinesh Atchuthan, A micro Lie theory for state estimation in robotics, 2018, the sections on right and left perturbations, the adjoint, uncertainty in the tangent space and covariance propagation
  4. Andrew W. Long, Kevin C. Wolfe, Michael J. Mashner and Gregory S. Chirikjian, The banana distribution is Gaussian: a localization study with exponential coordinates, Robotics: Science and Systems VIII, 2012, the whole paper (the pose distribution of a noisy planar robot as a Gaussian in exponential coordinates)
  5. Error propagation on the Euclidean group with applications to manipulator kinematics, the whole paper (covariances defined on the Lie algebra and their propagation through chains of uncertain motions)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/YR61S6/text.yaml