artivis / manif

A small C++11 header-only library for Lie theory.
https://artivis.github.io/manif
MIT License
1.48k stars 242 forks source link

Interest in Unit Dual Quaternions? #164

Open artivis opened 4 years ago

artivis commented 4 years ago

After seeing this post on ROS Dicourse and the comments asking for a c++ implementation, I wondered if 'Unit Dual Quaternions' (DH_u I believe) would be an interesting/useful addition to manif given that it is somewhat equivalent to SE3.

joansola commented 4 years ago

I agree. Just for the fun of it, and just because we could be the firsts to have it!

I however dont know how it works

But lets check it out

joansola commented 4 years ago

See appendix in https://cs.gmu.edu/~jmlien/teaching/cs451/uploads/Main/dual-quaternion.pdf for arithmetic.

Exp and Log are not in the paper. Neither the tangent space.

artivis commented 4 years ago

Alright then I'll get started with the class layout and we can fill up the implementation as we uncover it.

What should I call the new class, DHu??

joansola commented 4 years ago

Would this constitute a replacement for SE3? It seems that's the case! Or sould we rather keep both?

On Mon, Aug 17, 2020, 14:08 Jeremie Deray notifications@github.com wrote:

Alright then I'll get started with the class layout and we can fill up the implementation as we uncover it.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/artivis/manif/issues/164#issuecomment-674842938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS2LPLOY74F5QJYCTVVBGLSBEMTRANCNFSM4P73O3RQ .

artivis commented 4 years ago

No we should definitely keep both. DHu would be an alternative to SE3 for whomever wants to use it for whatever reason...

prashanthr05 commented 4 years ago

Related python library from the ROS discourse https://github.com/Achllle/dual_quaternions

This could be really interesting. I am looking forward to this feature.

joansola commented 3 years ago

I believe this is a relevant relative https://dqrobotics.github.io/

joansola commented 3 years ago

I got in contact with Bruno Adorno @bvadorno @dqrobotics who is a specialist on dual quaternions.

artivis commented 3 years ago

Good to hear! Is it something you want to pick up? I don't know when I'll have time to resume this.

bvadorno commented 3 years ago

Hi @joansola and @artivis!

It'd be my pleasure to help you guys in this endeavor. I've followed the discussion trail and there are some things that may be helpful to you.

DQ Robotics is implemented in C++, Matlab, and Python (actually we use bindings to access the C++ implementation, so on the high level the user sees Python code, but under the hood, everything runs in C++, which makes the Python code suitable for realtime applications).

Several operations that I see you guys need are already there: exponential and logarithmic maps, different Jacobians. I still have to see with @joansola if there is a Jacobian that matches the Jacobian you guys use. Probably yes, but since the library implements the general operations of dual quaternion algebra and dual quaternion calculus, only a subset of it is related to Lie Algebra, namely the subset of unit dual quaternions. Therefore, we still need to see which Jacobian is the one you guys usually work with.

We have recently published a paper showcasing the main points of the library that may be useful:

Adorno, Bruno Vilhena, and Murilo Marques Marinho. 2020. “DQ Robotics: A Library for Robot Modeling and Control.” IEEE Robotics & Automation Magazine, 0–0. https://doi.org/10.1109/MRA.2020.2997920. There is a version available on ArXiv.

The overall notation is described in something that I've been writing for a while and hopefully will become a book soon: Adorno, Bruno Vilhena. 2017. “Robot Kinematic Modeling and Control Based on Dual Quaternion Algebra -- Part I: Fundamentals.” You can download it here. The idea is to have three parts, and the first one is related to the fundamentals of dual quaternion algebra. It includes several elements that you guys often use in Lie Theory (the concept of groups, Lie Algebra, tangent space, etc.), but I tried to keep the jargon to a minimum so the material could be self-contained.

There are several things implemented in the library that are scattered around within the papers I co-authored, but they are usually cited in the library documentation. Whenever you get the chance to take a look at it, if there's anything I can do to help, please let me know.

Cheers, Bruno

joansola commented 3 years ago

Hi Bruno welcome to the fun!!

artivis commented 3 years ago

Hi @bvadorno, Thanks a lot for the references! We will be looking into them :+1: