OMRON Forums

# Slerp interpolation of quaternions

## Recommended Posts

The input to the reverse kinematic model is an X Y Z coordinate and a quaternion.

Is there anyway to force the trajectory generator to use Slerp interpolation on the quaternion in-order to avoid the non-linarites inherent in quaternions.

• Replies 4
• Created

#### Popular Days

From what I am able to deduce, "Slerp" (spherical linear interpolation) is equivalent in form to our circular interpolation algorithms.

But you want to use this Slerp not on the X, Y, and Z axes, but on the quaternion that I believe you are using for orientation commands.

Most people use the traditional A, B, and C axis names for their orientation commands. However, if you use the XX, YY, and ZZ axes, and put this secondary axis into "circular interpolation" mode (circle3 or circle4), you may be able to get the effect you desire. This can be done with the X, Y, and Z axis set in either linear or circle mode.

##### Share on other sites

if you are referring to point-to-point interpolation of "quaternion" axes, then it might not be possible for PMAC to do it since the trajectory planning does not have this SLERP feature.

Here are some suggestions for inverse kinematics:

1. before getting into the calculation, normalize quaternion axes to ensure unity constraint.

2. different axis definitions can be chosen for quaternion, such as:

a. [n1*sin(theda/2), n2*sin(theda/2), n3*sin(theda/2), cos(theda/2)]=[A, B, C, D], or

b. [n1, n2, n3, theda] = [A, B, C, D]

where [n1, n2, n3] is a unit vector.

this really depends on how you want to command.

In practical, definition b will be better since theda=D is just an angle, and interpolation of this angle will not affect the unity of quaternion. if the interpolation segment is small enough, then the interpolation from, say [n1, n2, n3] to [n1', n2', n3'], will still be close to maintain unity of the rotation vector.

No matter which definition chosen, the unity constraint of quaternion will be violated somehow.

However, in practical, this violation can be overlooked with small segmentation.

##### Share on other sites

Thank you gentlemen, yes you have correctly deduced the problem.

Circular interpolation wont work I'm afraid curt, as quartenions aren't linear.

I agree with Jay, the only sensible approach is to feed i,j,k and rotate about the normal to the trajectory generator and then do an i,j,k and rotate to quaternion conversion in the inverse kinematic model (and a quaternion to ijk r conversion in the forward kinematic model).

Cheers for confirming there's no other way. Would you consider adding a slerp interpolator to the trajectory generator at some time in the future, after all 6DOF Robots rely on quaternions to work.

##### Share on other sites

there is no plan to add SLERP in the future.

At the time the decision was not adding SLERP because to come up with another special type of axes will consume too much development resource, including changing firmware, and in practical, our trajectory planning algorithm is good enough for the approximation of quaternion components.

I used type (a) axis definition on a Denso Robot, and it works out fine.

If the robot is not moving crazy fast, then it is not a problem in practical application.

In fact, with the speed spec of Denso robot, there is no problem using quaternion in kinematics to achieve attitude performance at all

the following is a link of the Denso robot demo

##### Share on other sites

This topic is now closed to further replies.

### Announcements

×
• Forums

• Events
• #### Browse

×
• Create New...