Re: ROtation order.

New Message Reply Date view Thread view Subject view Author view

Scott McMillan (scott++at++er.ht.com)
Tue, 16 Apr 1996 12:25:30 -0400 (EDT)


> Does anyone out there have a set of routines to convert between
> each of the (six?) possible orders of rotation and the Performer convention?

Actually 12 or 24 combinations depending on who you talk to.

> I have a host program that wants me to perform rotations in the
> order heading-pitch-roll, but Performer uses (I think) roll-pitch-heading.

This should not be an issue. The short answer is don't use Performer
pfCoords, and do something like the following where the desired matrix is
computed directly:

   pfMatrix tx_mat1, tx_mat2;
   float angle[3]; // set elsewhere -- three euler angles in degrees

   tx_mat2.preRot(angle[0], 0.0, 0.0, 1.0, tx_mat1); // psi about Z
   tx_mat1.preRot(angle[1], 0.0, 1.0, 0.0, tx_mat2); // theta about Y
   tx_mat2.preRot(angle[2], 1.0, 0.0, 0.0, tx_mat1); // phi about X

   dcs_node->setMat(tx_mat2);

If you really want to get the Performer hpr's from this do the following:

   pfCoord coord;
   tx_mat2.getOrthoCoord(&coord);

This is not the most efficient way to convert from an arbitrary set of Euler
angles to Performer's hpr's but it works. An algorithm for direct conversion
from each of the twelve combinations to HPR would have to be worked out on a
case by case basis. Robotics books by Craig and Fu, Gonzales, and Lee give
the mathematically grounding to develop these algorithms...it is a simplified
inverse kinematics algorithm.

> Since I'm really sick to death of hacking these on a case-by-case basis,
> it would be really nice to have a simple set of conversions.
> (It would be even nicer if pfMatrix knew how to do this...)
>
> Thanks in advance...
>
> Steve
>
>
>
> Steve Baker 817-323-1361 (Vox-Lab)
> Hughes Training Inc. 817-695-8776 (Vox-Office/vMail)
> 2200 Arlington Downs Road 817-695-4028 (Fax)
> Arlington, Texas. TX 76005-6171 steve++at++mred.bgm.link.com (eMail)
>
>

-- 
Scott McMillan / scott++at++ht.com / (301)984-3706 x250 / FAX (301)984-2104
                      High Techsplanations Inc. 
       6001 Montrose Road, Suite 902 / Rockville, MD 20852-4874 

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:42 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.