Hello all,
I'm working with a KUKA robot remotely (I'm in Catalonia and my customer is in Brazil) so I can't try it by myself and I would not like to test and test it again until it works and I would like to be sure that the logics I'm using are correct.
I'm trying to go from point pStart to the point pEnd.
For reasons that now doesn't need to be explained I need to make the path stopping in between n times.
pStart - - - - - - - - - - - - pEnd
pStart and pEnd have different orientations.
XYZ are easy, those have been already solved. (finding the director vector between two points, and then using LIN REL to go from pStart to pEnd).
As I'm using LIN REL I want to get the incremental amount of ABC for each step and in order to do that I've thought of:
1. I'm passing from EULER to Quaternions to get something easy to operate with.
2. Once I got both quaternions, qStart (quaternion for pStart) and qEnd (quaternion for pEnd) I substract one from the other one:
qResult.x = qEnd.x - qStart.x
qResult.y = qEnd.y - qStart.y
qResult.z = qEnd.z - qStart.z
qResult.w = qEnd.w - qStart.w
3. After doing that substraction I divide the qResult quaternion for the number of stops I will need:
qResult.x = qResult.x / rNumberOfStops
qResult.y = qResult.y / rNumberOfStops
qResult.z = qResult.z / rNumberOfStops
qResult.w = qResult.w / rNumberOfStops
4. reached that point I'll have to normalize the qResult quaternion.
5. And convert it back to Euler angles.
Now I have the incremental ABC for each point.
Do you think this is correct?