No announcement yet.

Derivatives of Euler angles

  • Filter
  • Time
  • Show
Clear All
new posts

  • Derivatives of Euler angles

    I'm using the kinetics toolkit in Python ( to process marker data. It provides convenient conversion of marker data to reference frames, from which it will calculate matrixes for homogeneous relative angles between frames. It will then translate the homogeneous relative angles to Euler angles to give the standard way of describing joint angles.

    I'm interested in getting angular velocity for the joints as well. I understand from the papers referenced below that matrixes for the derivatives of the homogeneous relative angles can be calculated using some fairly straightforward matrix algebra.

    Two things I want to know:

    1. Can the same function which extracted Euler angles from the homogeneous matrix be used to extract Euler angles from its derivative?
    2. Is there a Python function or some sample code which calculates the derivatives of the homogeneous matrixes so I don't reinvent the wheel



    Giovanni Legnani, Federico Casolo, Paolo Righettini, Bruno Zappa, A homogeneous matrix approach to 3D kinematics and dynamics — I. Theory, Mechanism and Machine Theory. Mechanism and Machine Theory 31(5):573-587, 1996

    Giovanni Legnani, Federico Casalo, Paolo Righettini, Bruno Zappa, A homogeneous matrix approach to 3D kinematics and dynamics—II. Applications to chains of rigid bodies and serial manipulators, Mechanism and Machine Theory 31(5):589-605, 1996.

  • #2
    I've looked around a bit. I'll summarize below what I found. Ultimately, I'm still left with my original two questions.

    I found Oliver Retting's post from 2007 titled "Estimation of angular velocity/acceleration from 3x3 matrices" that had a number of replies. The original post suggested four methods that all, apparently, have validity:

    1. Directly taking the derivates of Cardan angles
    2. Taking the derivative of the rotation matrix
    3. Getting the change in angle from the dot product of the columns of the rotation matrixes
    4. Calculating linear and angular velocity directly from the markers that define the frame

    Young-Hoo Kwon posted a reply linking his (still existing) page covering Retting's method 1 in detail deriving precise equations for a system of Cardan angles. It is not clear if this can be used for Euler angles or not.

    Paolo De Levaposted a reply adressing each of Retting's methods but seemed to favor method 2 as being more straightforward and likely more accurate. I may be misinterpreting, however.​

    Ton Van Den Bogert posted a reply addressing the expected accuracy and computational complexity of each of the proposed methods and says that s/he tends to use Retting's first method although calculating directly from the markers seems optimal to them.

    N. Alberto Borghesesuggested a 5th approach using quaternions (this may be what I was originally looking for). For translation from rotation matrixes to quaternions and back he references Faugeras' book Three Dimensional Computer Vision. No references are given for the quaternion approach, although I imagine they shouldn't be hard to find.

    H. J. Sommer also prefers Retting's methods 2 and 3 (which seem equivalent to them) to Retting's method 1. However, he also seems to suggest that Retting's method 4 would be most accurate and links to his 1992 paper titled "Determination of First and Second Order Instant Screw Parameters from Landmark Trajectories" for details on doing this using regression on the measured marker positions.

    Dino Vrongistinos​ posted a reply referencing Wittenburg's 1977 textbook Dynamics of Systems of Rigid Bodies to say there are three approaches: tensors (apparently Retting's method 2)​, directly from the markers (Retting's 4), and using quaternions (Retting's 1?). He give analytic solutions for each method which, I assume are taken from Wittenburg.

    The last reply that I found was from Chris Barr who also suggested using the quaternion method and linked to a tool called Dizzy which I can no longer find.

    Finally, in the reserve material for a course on Mathematics for Biomechanics at the Unviersity of Delaware, I found a word file title "Differentiation of Biomechanical Data" which also addresses Retting's post. The author (I'm not sure who it is) references Winter's textbook Biomechanics and Motor Control of Human Movement (whose 5th edition came out last year). Winter has a detailed development of the best approach in chapter 7 on 3 dimensional kinematics.

    I'm uploading the word file because it seems like it could easily otherwise disappear. If anyone knows the author, that would be nice to know.

    Still happy for any help or insight especially on existing Python packages to do the calculation and on the relative applicability of the different methods to Euler vs Cardan angles.

    Attached Files
    Last edited by opherdonchin; September 15, 2023, 10:26 AM. Reason: I forgot to put the links to the actual replies which I believe are worth reading.