• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5

# Sign change of orientation values

Hi there,

is it possible to calculate the value of the orientation on the path between two targets?

I have a start and goal target with known u, v, w (UR) values. Now i want to orient some targets on the linear movement to match the orientation that the tool of the robot would have on these positions.

I tried to add the proportionate rotation to the start orientation based on the already driven distance. The result is a linear change of u, v and w. (This works fine for some cases)

Then I realised that some constellations result a change of sign. After testing lots of configurations I still don't know if and when this occurs.

To help explaining my question I attached some screenshots.
One shows the scene with the start and goal targets.
One shows how the targets should be oriented (this is how the tool would drive along the path)
One shows the plot of the u, v and w values of the targets with the sign change and how my calculation would set the values.

Is there any way to predict if and when there is a sign change?

Hopefully I have managed to explain my question well.
Hi Matthias,

Where did you take the u,v,w ideal? Did you just look at the rotation of each point you created in RoboDK?
If so, the change in sign could potentially simply be explained because more than one set of Euler angles can give the same final orientation.

The same way as if you take the Euler angle format rot[Z,Y',X''], rot[90, 0, 90] is exactly the same as rot[-90, 180, -90].
Same goes for rot[-120, 160, -70] = rot[60, 20, 110].

If my guess is good, you don't need to anticipate the change, the values you calculated are as good as the ones RoboDK calculated.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel

(02-06-2021, 04:27 AM)Jeremy Wrote: Where did you take the u,v,w ideal? Did you just look at the rotation of each point you created in RoboDK?

Hi Jeremy,

yes, my ideal values are the values that the robot shows on these positions on the path.
My calculated values match the ideal ones if there is no sign change. In the scene of my screenshot, the path would cause a sign change.

I attached another screenshot, this shows how the calculated values would look like. (I have translated them to make it easier to see)

To explain my calculation:
I take the u,v,w values of the start and goal target, calculate the difference, check for each target the percent of the path and add the proportianate difference to the start orientation.

For any path on which the orientations do not change sign, this calculation works without problems.
Hi,

I assume you are using the API to calculate the rotation.
If so, I recommend you not to use the u,v,w format. I found it confusing.
I personally either user [X,Y,Z] or [Z,Y',X''], but mostly the latter.

I believe your linear interpolation will work better on those Euler angle formats.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel

(02-06-2021, 04:55 PM)Jeremy Wrote: I believe your linear interpolation will work better on those Euler angle formats.

Hi,

you are right, I'm using the API. Thanks for the hint with the Z, Y', X'' notation, this makes it much easier to understand. As you can see, the calculated values now match the original ones much more.

But in screenshot 1, 2 and 3 you can see, there is still a sign change on the Z rotation. (The difference in screenshot 3 for the RY is not as a problem as the RZ)

I wouldn't mind to include some special case treatment, but to do so I need a way to predict this case. Is there any rule for this behavior?

1:       2:      3:

EDIT: Like you already said, some sets of values describe the same orientation (now this is the case). So thank you a lot for all your help. :) (You can ignore the last screenshot, it's just a wrong setting in my script)

Attached Files Thumbnail(s)

 Users browsing this thread: 1 Guest(s)