Why euler angles are bad




















The reason is that we used to offer a mechanical gripper for handling axisymmetric workpieces see video , which was actuated by the motor of joint 6. A six-axis robot equipped with such a gripper can only control two rotational degrees of freedom, or more specifically the direction of the axis of joint 6, that is to say the direction of the axis of symmetry of the workpiece.

Our applet below will help you understand Euler angles. You can select one of the twelve possible Euler angle conventions by clicking on the x , y , and z boxes of the first, second and third rotation.

The default Euler angle sequence is the one used by Mecademic. To switch between rotations about the axes of the fixed or mobile frames, you need to double-click on any of these nine boxes. The axes of the fixed frame are drawn in gray while the axes of the mobile frame are in black. Axes x and x' are drawn in red, y and y' in green, and z and z' in blue. Gliding along any of the three blue horizontal arrows with your mouse changes the corresponding Euler angle.

Alternatively, you can directly set the Euler angle value in degrees in the corresponding textbox below the arrow. Finally, you can drag your mouse over the reference frame to change the viewpoint. With the above applet, you will see the orientation of the mobile frame with respect to the fixed frame, for a given set of Euler angles, in the far right subfigure. Unfortunately, however, in practice, the situation is usually the opposite. You frequently have two reference frames, and you want to find the Euler angles that describe the orientation of one frame with respect to the other.

For orientations in which at least two axes are parallel, you could attempt to guess the Euler angles by trial and error. For example, look back at the image at the beginning of this tutorial and try to find the Euler angles used by Mecademic that define the orientation of the tool reference frame associated with the gripper, with respect to the flange reference frame. Not so easy to get, is it?

To be more efficient therefore, you must learn about rotation matrices after all. We will refer to the above matrices as basic rotation matrices. To obtain the product of basic rotation matrices that corresponds to a sequence of rotations, start by writing the basic rotation matrix corresponding to the first rotation.

For every subsequent rotation, post-multiply right multiply the current result with the next rotation matrix, if the rotation is about an axis of the mobile reference frame, or pre-multiply left multiply the current result with the next rotation matrix, if the rotation is about an axis of the fixed reference frame. Use our applet to see the resulting product of basic rotation matrices.

Thus, the rotation matrix that corresponds to the Euler angles used by Mecademic is:. Therefore, for a given orientation, you will need to do two things: First, you need to find the rotation matrix that corresponds to your orientation.

Second, you need to extract the Euler angles using a couple of simple equations. Let us first show you two ways to find your rotation matrix. Easy to see in 2D…choose a direction to move around the circle. For example if you are using a configuration ZXZ :. I believe we may all be arguing slightly different things; to me, losing a degree of freedom means no more than that there are areas in the space of Euler angles where locally a variation of three parameters can produce, at first order, only two dimensions of variation in rotation space.

This means that the determinants go to zero, transformations blow up, robots start slapping themselves in the face, etc. Euler Angles vs. I may be wrong but I see that like this : When you speak about of a rotation around Axis, it is a rotation around an world Axis. Position your bones only using translation. Don't use rotation. If you do, you will have to freeze transform to convert all rotations and whatnot to translations again. The reason you want to do this is because zero is where the range starts from.

If you are already close to , you don't have much room left for rotating within the quaternion range. From these links, I am concluding that the current Euler rotations are not compatible with quaternions unless "Retain quaternion interpolation" is set during export. So maybe if Maya is able to read the. FBX files out and save them in a quaternion friendly manner, then it is posible to do convert the Euler angles to quaternions during load time.

So my question is "What is Maya doing to make the rotations quaternion friendly in "Retain quaternion interpolation"? If it is just exporting the quaternions it uses internally, how is it converting them to quaternions? Message 9 of It looks like DirectX's slerp function does not take the shortest path between quaternions, so just extracting quaternions from Euler angles is not enough. You have to adjust the quaternions so that they will take the shortest path between them.

After I did that. Message 10 of Can I ask how you corrected your code? Because all the Slerp functions I've seen usually correct for the shortest path. The animation would probably look terrible if they didn't.

I'm almost certain that the DirectX Slerp function would do it. Message 11 of To be as flexible as possible, I guess the DirectX animation system does not always take the shortest path.

This is done the same way as using the dot product to check the angle between 3d vectors. If the dot product is negative, we flip the sign on all the components of one of the quaternions before interpolating. The following example demonstrates the rotation of a GameObject using eulerAngles based on the Input of the user. The example shows that we never rely on reading the Quanternion.

All rotational changes happen in the currentEulerAngles variable, which are then applied to the Quaternion avoiding the problem mentioned above. The following example demonstrates how the values you read out of. Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.



0コメント

  • 1000 / 1000