Re: [eigen] Creating a EulerAngle object

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


also, you can have a look at this thread:
http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2008/07/msg00020.html
the conclusion was mitigated.

However, note that "roll", "yaw", and "pitch" only makes sense for a
particular convention,  and so your requirement #3 cannot be
satisfied. A trick would be to define enums Roll=0, Pitch=1, Yaw=2 so
that you can write obj[Roll].


cheers,
gael

On Thu, Feb 23, 2012 at 8:56 AM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> we abandoned it because we thought that was quite useless. The
> AngleAxis and eulerAngle function already allow to transform from and
> to Euler angles. Nevertheless, if you manage to implement an
> EulerAngle class that works for arbitrary conventions then I'd say why
> not.
>
> gael
>
> On Wed, Feb 22, 2012 at 1:40 PM,  <hamelin.philippe@xxxxxxx> wrote:
>>> -----Message d'origine-----
>>> De : Listengine [mailto:listengine@xxxxxxxxxxxxxxxxx] De la
>>> part de Gael Guennebaud
>>> Envoyé : 21 février 2012 17:33
>>> À : eigen@xxxxxxxxxxxxxxxxxxx
>>> Objet : Re: [eigen] Creating a EulerAngle object
>>>
>>> On Mon, Feb 20, 2012 at 10:26 PM, Christoph Hertzberg
>>> <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>> >> 4. (Nice to have) Be able to use the EulerAngle in any
>>> rotation arithmetic
>>> >> (e.g. result = quaterion1 * eulerAngle * affine3d);
>>> >
>>> >
>>> > I guess this more or less can be solved by solving 2, i.e.
>>> just convert to a
>>> > 3x3 matrix (or whatever) temporarily.
>>> >
>>> >> Looking the at the page "Extending Eigen"
>>> >>
>>> (http://eigen.tuxfamily.org/dox-devel/TopicCustomizingEigen.ht
>> ml<http://eigen.tuxfamily.org/dox-> devel/TopicCustomizingEigen.html>
>>> >>  ), i'm not really sure that I want to inherit directly
>>> from Matrix and then
>>> >> re-implement everything. I guess the good way is to inherit from
>>> >> RotationBase much the same way as the Quaternion object.
>>> Am I wrong?
>>> >
>>> >
>>> > I agree that inheriting from RotationBase is better. I
>>> think beneath the
>>> > scalar type you should encode the axis-order using three
>>> template parameters
>>> > (maybe defaulting to "the most common" convention).
>>>
>>> Inheriting RotationBase is indeed the best approach for that. You can
>>> take inspiration from the AngleAxis class.
>>>
>>> Alos don't miss the eulerAngle(int,int,int) method in Eigen which
>>> allows to convert a 3x3 rotation matrix to any Euler angle convention.
>>> You might also have a look at the EulerAngle class we had during the
>>> alpha versions of Eigen 2.0 :
>>> https://bitbucket.org/eigen/eigen/src/42e749aa2451/disabled/Eu
>>> lerAngles.h
>>> though it is rather out of date and limited to a single convention.
>>>
>>
>> I didn't know there already had a EulerAngles object. It really looks like the same thing that I coded yesterday :-). I also used the eulerAngles(int,int,int) method instead of using literal equations like in the alpha version. Why it didn't pass the alpha stage?
>>
>> If I complete the alpha version with extra parameters for specifying the convention, will it be accepted as a patch in the mainline?
>>
>> Philippe Hamelin
>>
>>



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