Teach plane feature with respect to an other plane feature

we want to teach plane feature 2 with respect to anoter plane feature 1.
So plane 2 should be an offset to plane 1
Whenever plane feature 1 changes, plane feature 2 changes respectively.

Is that possible?


Yes that’s possible.

I’d create a Variable and assign it some values second_plane p[0,0,0,0,0,0]

then in your program second_plane = plane_1 this makes them the same now apply your offset
second_plane[#] = second_plane[#] +/- Offset value

now simply use the variable second_plane in your move command

thanks m.hammerton for your reply!
How do I get the offset? When I teach the plane feature in the installations tap, I can’t refer it to an existing plane, do I?
I only can teach it relative to the robot base. Then go to editd, change the reference,write the values to a piece of paper and get the offset pose variable by typing it by hand…
Is there a more straight forward way?

In addidtion, is it possible to change the value of the plane in the installations tab? I Can store it in an installations variable, but the value of the plane in die korridate systems menue remain the same.


All planes are referenced from the Robot base!

You only need to teach plane_1 in the installation tab (this is the reference for your second plane)

Create a Variable in the installation Variable tab (i.e offset_plane) and set its value to p[0,0,0,0,0,0] (the numbers do not matter at this point!)

now in the program make a new assignment node
select your variable from the dropdown menu (offset_plane) = Plane_1 (also from the drop down menu)

now in the program make a new script node and write offset_plane[#] = offset_plane[#] +/- offset amount
# is the No of the coordinate you want to change (0 = X, 1 = Y, 2 = Z, 3 = RX, 4 = RY, 5 = RZ)
0 to 2 in meters, 3 to 5 in Radians

do this for all of the coordinates you want to offset

when the program is run you can see the values for offset_plane in the variables window.

now the the Move node apply the Variable (offset_plane) to the move and your position will be offset.

Once a plane is created in the Installation tab it creates a plane_1 as a Variable and a plane_1_const as a Constant)
the Variable can be modified in the program but is not saved. when a program is re run it get set back to the constant values at the beginning.

planes can be edited in the installation tab
but it is the only place a plane can be created.

To add on the correct answer of @m.hammerton ,

In case you would ever need to perform multiple offsets on the same pose you can use the add_pose function that is provided by URscript.

An example usage would be:

second_plane = add_pose(first_plane, p[0.5, 0, -1, 0, 0, 0])

Which means that the variable second_plane is now 50cm towards the X+ axis and 1m towards the Z- axis compared to the previous position of the variable first_plane.

1 Like