Inequivalence between SE(3) and <R3, SO(3)> #299
Replies: 8 comments
-
Hi Lucas. The tangent spaces of SE3 and <R3,SO3> are not the same. If you average on these spaces, the result will not match. In <R3,SO3>, the translation part does not interact with the rotation, so the position average should be just the arithmetic mean of all the input positions. In SE3, the mapping to the tangent space affects the position with the orientation, in two ways. One is by rotatinng it with the rotaiton matrix R(theta). the other one is by affecting it with the matrix V(theta). See the micro-Lie paper, exp and log maps of SE3 for reference. Given these differences, you should not expect these two averagings to give the same result. |
Beta Was this translation helpful? Give feedback.
-
Also, you should NEVER use Euler angles to do anything related to orientations other than user interface. The random values you input for the quaternion are Gaussian in the Euler space, but this does not mean you get a well behaved distribution of quaternions around the identity. In your case it "works" because you limit sigma to 0,2 rad, which is "small". You can use some randomization directly in quaternion space. Eigen has Quaternion::Random(), and I think manif also has the Random() method for all groups, which has been well tested. |
Beta Was this translation helpful? Give feedback.
-
Another comment, is that rather than averaging in the tangent space at the identity, as you do, you should average at the tangent space of the averaged element. This means that you-d better construct an iterative algorithm that computes an average, and using this average, recomputes a second average around this one, and iterates a few times. |
Beta Was this translation helpful? Give feedback.
-
In any case, the differences between SE3 and <R3,SO3> will still appear I think. |
Beta Was this translation helpful? Give feedback.
-
You can achieve this with something like the following:
At the end of the iterations, the term inside the exponential should have converged to zero, meaning that all elements are equally spread around the average -- which is what you want. You can use this fact to define a stopping criterion for the iterations. |
Beta Was this translation helpful? Give feedback.
-
Hi Joan, Thank you very much for the very detailed (and fast!) answer. Very helpful. I am still a bit confused about why the results should differ for both cases. I would expect the Log and Exp maps to compensate for these differences between the SE(3) and R3SO(3) groups since they describe the same thing (although they indeed differ significantly in their definitions)... But my understanding of Lie theory is still a bit limited, so I do not want to take more of your time. I greatly appreciate if you can comment on this still, but otherwise feel free to close this issue :) |
Beta Was this translation helpful? Give feedback.
-
You can look at Example 7 in the paper, it touches on the differences between SE3 and R3xSO3 and <R3,SO3> As per the little algorithm, you can see it better using (+) and (-), so you can implement them easily in manif:
See that this is resembling the averages you would do to regular vectors, using plain + and -:
but in the case of vectors, the iterations are doing nothing because the first average is just right. the others do nothing. In case of Lie groups, the iterations progressively converge to the best unbiased average. |
Beta Was this translation helpful? Give feedback.
-
This matter of averaging Lie Groups is a rabbit hole I did not had time to explore. However, I poked a little a it back in the days and the algorithm @joansola is describing is implemented in manif/algorithms/average.h. Mind that it's only 'proper' for compact groups, which have a bi-invariant Riemannian metric . |
Beta Was this translation helpful? Give feedback.
-
I have been playing around with the library and was testing how to average poses. In the code below, I do so using both the$SE(3)$ group and the composition $\langle\mathbb{R}^3, SO(3)\rangle$ .
While the average angle is computed well with both groups, the average position is less precise when using the$SE(3)$ group.
See the code below that reproduces the results:
with the output:
Where is this discrepancy coming from? Happy to provide additional details if relevant.
Beta Was this translation helpful? Give feedback.
All reactions