[ODE] Rotation matrix and Euler Angles - Easy
hampus at sxp.se
Wed Jul 12 01:18:47 MST 2006
I can't find the Quaterion to euler conversion (dQtoEuler?) function
in ODE that you speak of. What is it called?
Just to be sure. It is possible and safe to do something like this:
dRFromEulerAngles(R, x, y, z);
dQtoEuler(Q); // or whatever that conversion function is called
and get aproximately the same values after the last conversion as the
initial euler angles.
5 jul 2006 kl. 15.37 skrev Jon Watte (ODE):
> I believe ODE uses XYZ Euler.
> RollPitchYaw has two meanings: either ZYX Euler order, or Tait-Bryan
> order (where the latter rotates within the new coordinate frame for
> component). I believe the code posted attempts to do ZYX Euler.
> There exists ODE code to convert between Euler and Quaternion and
> so I suggest just using those (which means going through Quaternion,
> rather than matrix, for this case).
> / h+
> Holger Urbanek wrote:
>> Well I did a quick check, and without looking at the math I found two
>> 1) The sign is wrong. It alway gets the negated result.
>> 2) If you are only trning around one axis, ODE-conversion to and back
>> agin with yours gets it right (well, except the sign; see 1). But if
>> you turn around multiple axis, results differ significantly.
>> And another question from me the the ODE-Experts here:
>> RPY (roll pitch yaw) and Euler are somehow different. And there exist
>> many (12 to be exact) Euler representations. What is ODE using when
>> stating 'euler'?
>> On 7/5/06, *Alex Green* <alexg at acfr.usyd.edu.au
>> <mailto:alexg at acfr.usyd.edu.au>> wrote:
>> G'day, I used the following code, hope it helps!
>> //! Find Roll Pitch and Yaw
>> // rotation Matrix then convert to Euler Angles
>> dReal *R = (dReal *) dBodyGetRotation(body->bodyID);
>> roll = atan2(R, R); //phi
>> pitch = asin(-R); //theta
>> yaw = atan2(R, R); //greek Y
>> ODE mailing list
>> ODE at q12.org
> ODE mailing list
> ODE at q12.org
More information about the ODE