-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lie Bracket operation #267
Comments
We did not implement the Lie bracket in manif. But I agree this could be a valuable tool, and it should be easy. @artivis ? Regarding the formulas, if I am not wrong the Lie bracket can be computed as
where LieGroupTangent a, b;
LieGroupTangent ab_bracket = ( a.hat() * b.hat() - b.hat() * a.hat() ).vee(); I am not fully sure of what I wrote here. If you can confirm this, then this would be possibly added to manif. |
The infos above are confirmed here and here "The standard Lie bracket for Lie algebras of matrix Lie groups is given by [A, B] = AB − BA." which can be found here: http://www.math.uchicago.edu/~may/VIGRE/VIGRE2010/REUPapers/Turzillo.pdf |
Yes @joansola that seems right to me. I didn't realise that before, and i can use For reference, Sophus implements this as a static function in each lie group class, taking A and B as arguments and returning the simplified form of [A, B] for that group. I don't see the general commutator implementation above, perhaps because they don't need it. manif uses CRTP rather than virtual polymorphism, so i'm not sure off the top of my head what the best implementation would be. Something equivalent to the general commutator in lie_group_base.h (or tangent_base.h) and simplified implmentations in each derived class. |
For all immplementation issues, @artivis is the man :-) but yes, it seems that in the Tangent base class we could add this implementation, it would become immediately available to all Tangent classes. |
One additional note is that it would be convenient to have a lie bracket function on the lie algebra elements themselves, which would avoid recomputation / unnecessary mapping to/from the tangent vector in my case. Perhaps this could be an overload, or a different function. For example:
Implementation of course will differ, but this is the idea. |
Hello there, This feature is indeed missing and would be a nice addition. However I'm not sure what the syntax would be at the moment. Let me play with it a little and I'll come back with a proposal. |
One key issue is: we do not have a class for the static TangentBase vee( TangentBase::LieAlg _v_hat)
{
TangentBase v;
// build v from _v_hat
return v;
} or even from the constructor, with someting like TangentBase::TangentBase(TangentBase::LieAlg _v_hat)
{
// build v from _v_hat
coeffs() = v;
} |
An additional note is that the lie bracket also equals I thought I would point this out since the small adjoint operation is already defined in code, but it may not help at all. |
Is there an update regarding this request? I'm refactoring code here, and I would like to get rid of our definitions of the Lie-bracket operations outside of manif. If it is still unclear how this should look like, at least the I it helps, I could open a PR for the |
Perhaps the lie bracket could be implemented something like:
In equation form, this is Potentially this could be specialised for each type to avoid computation (e.g. Rn commutators always being zero as @nielsvd said). |
Hi there, sorry for not coming back to this earlier. |
Hi @willat343, @nielsvd, |
I can't seem to find the Lie Bracket (sometimes called commutator) operation in any of the code, documentation or issues and wondered if this exists yet in manif, perhaps under a different name?
This is quite a hard blocker for my application (Manif with ceres, where i need the lie bracket operator in my computation).
If$A$ is a Lie algebra, then the lie bracket is is a mapping of form $[\cdot, \cdot]: A \times A \rightarrow A$ . I noticed Sophus has a function
Tangent lieBracket(Tangent const& a, Tangent const& b)
which performs this operation with tangents instead.As far as I know the lie bracket operation is unique to each lie algebra, so its not really something that is easy to implement in my code (I template for different lie groups) but would belong in manif. Most of the Lie brackets for common groups are not difficult to compute. Off the top of my head:
Is this something you would consider implementing, or perhaps already exists that I haven't found?
The text was updated successfully, but these errors were encountered: