[eigen] Creating a EulerAngle object

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

I usually try to avoid using euler angle in my code for many reasons that you all know. However, I have so much place in my GUIs and configuration files that user can input angles using the well-known roll-pitch-yaw representation. Currently, I must use a Vector3d to store these angles, and then as soon as I can I convert them in a more programmatically convenient representation (e.g. quaternion). However, in the glue code between the configuration object and the actual algorithm, I always have to explicitely use angleVector[0], angleVector[1] and angleVector[2] to respectively access to roll, pitch and yaw. I would like to create a new EulerAngle (or more precisely RollPitchYaw) object to make this less error prone. My requirements are:
1. Create a EulerAngle object from scalars Roll, Pitch and Yaw, or any other rotation object (Matrix3d, Quaternion, AngleAxis, ...);
2. Convert the EulerAngle to any other rotation object;
3. Access to internal angles with named method such as: roll(), pitch() and yaw(), or maybe rx(), ry(), rz();
4. (Nice to have) Be able to use the EulerAngle in any rotation arithmetic (e.g. result = quaterion1 * eulerAngle * affine3d);
Looking the at the page "Extending Eigen" (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?
Thank you,
Philippe Hamelin
, ing., M. Ing
Chercheur / Researcher

T: 450-652-8499 x2198
F: 450-652-1316

Expertise robotique et civil
Institut de recherche d'Hydro-Québec (IREQ)
1740, boul. Lionel-Boulet
Varennes (QC) J3X 1S1, Canada


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