Re: [eigen] Rigid Transformations in eigen: discussion thread |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Rigid Transformations in eigen: discussion thread*From*: Adolfo Rodríguez <dofo79@xxxxxxxxx>*Date*: Wed, 16 Sep 2009 11:44:12 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=WVKvHfMmrN7l3w/gnq+7QGtp/RZFvDl1eo8EIRsRsqY=; b=rBTW9ahIPnY2L/ZJMSuYkW6+ke4R8SZEU2d41aGjBM0X2RtHKKv56Wkp238N7r1F5I nlehzickhsfoh6kvl76EBqr3y0wN6SfeAM5WTJJUesLhYwgAsW9X5hoR4ASKNvwUE8jV IVAPpz86ocH2NRc85orLYDYhYkmqIdi/s0SCk=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Gxiztp3hNZ7Sz5qmpyO7Dnt5elI+iAp0ItwNTt1tky6HK3MpfusX73LjxzjMK8NLtX 9DewteiBMuXZ8D0jHQSvXqNGWXXoLFnbC0ux3M1/ETH4N7zphtePa3j9zdPbBy9L4Eoq ogs8rrlqJtRrTfR3D2ooCBWcjAc/8pAKgXOuI=

On Wed, Sep 16, 2009 at 10:55 AM, Rohit Garg <rpg.314@xxxxxxxxx> wrote:

OK, so it would definitely be nice to know how much behind. I haven't peeked into the internals of the Quaternion class, but would this difference be due to the current implementation, or rather inherent to the involved operations and their efficient vectorization?

Sure. The main point is that a specialization for rigid transformations could be very useful. The Transform class already takes isometries into account up to a certain extent (as a hint when computing the inverse), but it would be nice to have a way of creating isometries, and guaranteeing that they stay that way. With the current Transform class, you could for example compose multiple isometries and because of roundoff errors end up with something that is not an isometry, and restoring orthonormality of the linear part is not trivial. For 3D isometries, renormalizing a quaternion is all you need (or similar for dual quaternions). This is why your contribution seems worth exploring :).

2009/9/16 Adolfo Rodríguez <dofo79@xxxxxxxxx>:

>a) This heavily depends on fast quaternion multiplication, I think it

>

> On Wed, Sep 16, 2009 at 7:50 AM, Rohit Garg <rpg.314@xxxxxxxxx> wrote:

>>

>> I have written the rigid transform class and it's unit test. The code

>> compiles, and executes correctly. The API is as close to eigen's

>> transform class as possible. I hope this is good enough to make into

>> eigen. The documentation is sketchy, but it was secondary till now..

>> The unit tests are not eigen'ish, but it is trivial to add

>> VERIFY_IS_APPROX, and I didn't want to add that to my code base.

>>

>> NOTE: If you remove the V1.normalize() and V2.normalize() calls,

>> eigen's results change. I spent a lot of brain cycles fighting this.

>> :(

>>

>> It may be a good idea to keep the axis vector in the angleaxis class,

>> and the direction vector in the parametrizedline class normalized.

>>

>> Comments/questions/cribs/criticism/commendation (!) welcome.

>

> Thanks for pushing this forward!. Definitely worth giving it a try and

> benching it with the existing Transform class (perfo-wise). Regarding the

> class name, I think it's important to clearly state that only 3D rigid

> transformations are being modeled, especially considering that the existing

> Transform class works for nD (and hence avoid confusion). Apart from that,

> and out of the top of my head, an inverse() function would be convenient,

> and maybe (?) a function for getting an equivalent Transform instance.

will likely come out somewhat behind in benches.

OK, so it would definitely be nice to know how much behind. I haven't peeked into the internals of the Quaternion class, but would this difference be due to the current implementation, or rather inherent to the involved operations and their efficient vectorization?

b) How does eigen do say, 4D rotations? I thought it did only 2D and

3D rotations.

In the Transform class, a higher-dimensional rotation would be the linear part set to a square nD orthonormal matrix

I don't know if rigid transformations make sense for 2D.

They do :) , rigid transformations make sense in nD

At any rate, 2D transformations are trivial.

c) Inverse would be good, I agree. You just need to do take take the

conjugate of both the quaternion parts.

d) For equivalent Transform object, rotation matrix and translation

vector are provided. Will look into generating equivalent transform

objects.

It's the usual compromise between extending the API and convenience when writing code. I can live with either alternative.

Best,

Adolfo.

Best,

Adolfo.

Thanks,

--

> Cheers and thanks again!

>

> Adolfo.

>

>>

>> --

>> Rohit Garg

>>

>> http://rpg-314.blogspot.com/

>>

>> Senior Undergraduate

>> Department of Physics

>> Indian Institute of Technology

>> Bombay

>

>

>

> --

> Adolfo Rodríguez Tsouroukdissian, Ph. D.

>

> Robotics engineer

> PAL ROBOTICS S.L

> http://www.pal-robotics.com

> Tel. +34.93.414.53.47

> Fax.+34.93.209.11.09

> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden

> contener información privilegiada y/o confidencial que está dirigida

> exclusivamente a su destinatario. Si usted recibe este mensaje y no es el

> destinatario indicado, o el empleado encargado de su entrega a dicha

> persona, por favor, notifíquelo inmediatamente y remita el mensaje original

> a la dirección de correo electrónico indicada. Cualquier copia, uso o

> distribución no autorizados de esta comunicación queda estrictamente

> prohibida.

>

> CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may

> contain confidential information which is privileged and intended only for

> the individual or entity to whom they are addressed. If you are not the

> intended recipient, you are hereby notified that any disclosure, copying,

> distribution or use of this e-mail and/or accompanying document(s) is

> strictly prohibited. If you have received this e-mail in error, please

> immediately notify the sender at the above e-mail address.

>

Rohit Garg

http://rpg-314.blogspot.com/

Senior Undergraduate

Department of Physics

Indian Institute of Technology

Bombay

**Follow-Ups**:**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Rohit Garg

**References**:**[eigen] Rigid Transformations in eigen: discussion thread***From:*Rohit Garg

**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Adolfo Rodríguez

**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Rohit Garg

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Rigid Transformations in eigen: discussion thread** - Next by Date:
**Re: [eigen] Rigid Transformations in eigen: discussion thread** - Previous by thread:
**Re: [eigen] Rigid Transformations in eigen: discussion thread** - Next by thread:
**Re: [eigen] Rigid Transformations in eigen: discussion thread**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |