Announcement

Collapse
No announcement yet.

Matlab for Euler angles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matlab for Euler angles

    Hi all
    I am a fairly new Matlab user and wondering if anyone can help. I have lots of global coordinate data and I want to convert these to local coordinates and then calculate Euler angles. I've had a look on Matlab Central but can't find anything that really helps. Any advice appreciated.
    Thanks
    Sandra

  • #2
    Re: Matlab for Euler angles

    Sandra,

    Take a look at our Kinemat software at http://isbweb.org/software/movanal/kinemat.

    Another useful resource might be the Appendix of Christoph Reinschmidt's dissertation which is online here.

    Ton van den Bogert

    Comment


    • #3
      Re: Matlab for Euler angles

      Hey Sandra,

      Here is an old .m-file I created to calculate local rotation matrices given global shell coordinates. Once you have [R] it's just some algebra to obtain the Euler angles. You may find this section on Wikipedia helpful.

      Donald Hume

      Comment


      • #4
        Re: Matlab for Euler angles

        Hi Sandra,

        For coordinate transformations and to switch between various rotation representations I use the robotics toolbox by Peter Corke:


        It all kind of functions to switch between Rotations Matrices, Homogeneous transforms, Quaternions and Euler angles.

        Best, Thomas

        Comment


        • #5
          Re: Matlab for Euler angles

          Matlab's Aerospace Toolbox contains routines to extract / convert between various rotational representations: rotation matrices, euler/cardan angles, quaternions (euler parameters), etc.

          Tim Wrigley
          University of Melbourne

          Comment


          • #6
            Re: Matlab for Euler angles

            You might find it helpful to look at the figure [4-6] for Euler angles in Herbert Goldstein’s “Classical Mechanics”. It’s an easy-to-remember diagram.

            You should find the book in the library.

            Ted

            Comment


            • #7
              Re: Matlab for Euler angles

              I have the below issue which is related to this thread, I would appreciate if anyone could help me:
              We are using VICON system for Kinematic analysis in our lab. I use my own model for motion capturing and I don't use any of VICON templates for humman motion capturing and evaluating the joint angles. What I do is that I use the marker position (x,y,z) obtained from the Vicon and I use the code that I have written to obtain the angles. My question is: If I use the Vicon joint angles instead of my code, are the angles (Euler, helical....) returned by the Vicon, when I check joint kinematics option to save in a Csv file, bio-mechanically meaningful to evaluate flexion/exten, external/internal rotation and etc of human joints? or they are just meaningful when I use the standard templates of the Vicon?

              Comment


              • #8
                Re: Matlab for Euler angles

                Sandra

                I am aware of a company that offers bespoke matlab code writing solutions if you are unable to resolve your difficulties. The cost is very reasonable and may be worth considering if you remain stuck. Contact Dr. Robinson on hrobinson@h-scientific.co.uk for details
                Best of luck

                Comment


                • #9
                  Re: Matlab for Euler angles

                  MATLAB has built-in functionality for Euler Angles that would probably be the best to utilize. These would be less error-prone as they have been put through testing for accuracy.

                  Comment


                  • #10
                    Re: Matlab for Euler angles

                    Hello, I am an phD Student from Granada. I have the video of a calibration volume and a volleyball smash from two cameras casio exilim FH100 at 120 fps. I want to obtain the 3D coordinates using kinovea and kinemat. For using kinemat I am using GNU Octave, a freeware that uses script very similar to Matlab. i don´t know nothing about programaming language so I don´t know how to obtain the 3D...

                    Here I have the script for obtaining the L paramethers of the DLT of each camera. Where I have to put the coordenates 3D of the calibration volume? In pixels or in centimeters? And where I have to put the coordenates 2D of the calibration volume in the image plane reference frame? In pixels or in centimeters?


                    if nargin==2; Cut=[]; end;


                    if size(F,1) ~= size(L,1)
                    disp('# of calibration points entered and seen in camera do not agree'), break
                    end


                    m=size(F,1); Lt=L'; C=Lt(;


                    for i=1:m
                    B(2*i-1,1) = F(i,1);
                    B(2*i-1,2) = F(i,2);
                    B(2*i-1,3) = F(i,3);
                    B(2*i-1,4) = 1;
                    B(2*i-1,9) =-F(i,1)*L(i,1);
                    B(2*i-1,10) =-F(i,2)*L(i,1);
                    B(2*i-1,11) =-F(i,3)*L(i,1);
                    B(2*i,5) = F(i,1);
                    B(2*i,6) = F(i,2);
                    B(2*i,7) = F(i,3);
                    B(2*i,8) = 1;
                    B(2*i,9) =-F(i,1)*L(i,2);
                    B(2*i,10) =-F(i,2)*L(i,2);
                    B(2*i,11) =-F(i,3)*L(i,2);
                    end


                    % Cut the lines out of B and C including the control points to be discarded
                    Cutlines=[Cut.*2-1, Cut.*2];
                    B([Cutlines],=[];
                    C([Cutlines],=[];


                    % Solution for the coefficients
                    A=B\C;
                    D=B*A;
                    R=C-D;
                    res=norm(R); avgres=res/size(R,1)^0.5;


                    Thank you very much

                    Comment

                    Working...
                    X