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

[ Thread Index | Date Index | More Archives ]

On Wed, Sep 16, 2009 at 10:55 AM, Rohit Garg <rpg.314@xxxxxxxxx> wrote:
2009/9/16 Adolfo Rodríguez <dofo79@xxxxxxxxx>:
> 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.

a) This heavily depends on fast quaternion multiplication, I think it
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.
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 :).


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
It's the usual  compromise between extending the API and convenience when writing code. I can live with either alternative.




> Cheers and thanks again!
> Adolfo.
>> --
>> Rohit Garg
>> Senior Undergraduate
>> Department of Physics
>> Indian Institute of Technology
>> Bombay
> --
> Adolfo Rodríguez Tsouroukdissian, Ph. D.
> Robotics engineer
> Tel. +34.93.414.53.47
> Fax.+
> 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

Senior Undergraduate
Department of Physics
Indian Institute of Technology

Mail converted by MHonArc 2.6.19+