|Re: [eigen] Creating a EulerAngle object|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Creating a EulerAngle object
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 23 Feb 2012 10:09:39 +0100
- Authentication-results: mr.google.com; spf=pass (google.com: domain of gael.guennebaud@xxxxxxxxx designates 10.50.208.69 as permitted sender) smtp.mail=gael.guennebaud@xxxxxxxxx; dkim=pass header.i=gael.guennebaud@xxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=22HVsW7EgfK8inUED/7nVQ4qp0tBkbXmgtOvejXZp3E=; b=inMvXeW94gcRpRiPMb+/P7uOur4dnUAiKuwSyWtyWK57qTegUUg563nKRCH3G+pHwj 2kAduOfHnri/HgfH7VJPzAXGFQ4zppkoOhGUgV68p/PkthwlPvCoyd2mfaHpnhrzr9b3 8wr0zQ50H7q3Tr4Z1sfEQozRWr/z+mCNS4Y14=
also, you can have a look at this thread:
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].
On Thu, Feb 23, 2012 at 8:56 AM, Gael Guennebaud
> 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
> 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"
>> 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 :
>>> 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