Visit Zacobria Webshop

Planes and position variables 2

This article is similar to Planes and position variables 1 and does the same move arround a box, but with a different method.

The article describes a way to setup different planes and how to use them for move from one plane to another and using pose_trans function to move between the planes.

This article uses variables and lists (also sometimes reffered to as “arrays”) to create waypoints and how variable waypoints can be manipulated with an offset defined in the variables.

The Universal-Robots is a 6 axis robot which means it has 6 turning joints. Therefore a position can be described with a set of data in a list – either as joint angles – or as a pose with cartisian cordinates. Such list can be –

[j1, j2, j3, j4, j5, j6] when representing the robot position with joint angles.

p[X, Y, Z, Rx, Ry, Rz] when representing the robot position with cartisian cordinates also called a “Pose”.

Notice the “p” in front of the second list indicationg that it is a Pose representation.

This examples will use the Pose representation.

The Universal-Robots is by default set to use the Base as plane reference, but it is also possible to setup user defined planes.

This is done in the Installation – Features menu. Notice the two planes Plane_1 and Plane_2 setup here is exactly the same as in the previous example “Working with planes and variables 2” – so if they already has been set they can be used again and therefore programming can start already by going to the program example below.

In this example 2 different planes will be created with a program example for how to move between them.

A plane is setup by setting 3 points where the first point is the plane normal (the origin of the user plane). The second point is the Y axis direction of the new plane and therefore the second point is set in the desired Y direction from the plane normal. The third point is the X axis direction of the new plane and therefore the third point is set in the desired X direction from the plane normal.

The X and Y direction for this plane is using the tool head as reference – and in the Installation – TCP configuration the orientation of the X and Y from the tool head can be seen.

pose_trans vs pose_add:

When using pose_trans or pose_add in programs the difference in thiese two commands is the reference where “pose_trans” command is using the tool space coordinate system as reference. Whereas “pose_add” command uses the base as coordinate system as reference.

The X – Y orientation of the tool space can be seen on the image inside the Installation “TCP configuration” tab as shown below.

universal-robots-program-working-with-planes-tool-x-y-1

Notice the Y direction is opposite direction of the tool head I/O connector – and notice the X direction as seen on the above illustration.

The tool I/O connector is used to observe the orientation of the tool head when setting the feature points of the plane.

Notice on below photos that the I/O connector is pointing towards the robot – because the Y axis is opposite as the I/O connector – and is this case it is desired that the Y axis is pointing away from the robot.

(The X – Y orientation of the base space can be expressed as the positive Y direction is the direction where the robot cable is coming out of the base. Base orientation for X, Y, Z)

universal-robots-plane-2-point-0b
universal-robots-plane-2-point-0a

Move the robot to the desired position of the origin of the first user plane (Plane 1). Here in this example a black box is used as object to move around. The lower left corner near the robot is used as the origin for the user plane. Pay attention to the orientation of the tool head rotation – in this case the blue light on the Robotiq gripper is exactly opposite the I/O connector and therefore the blue light in this case indicate the Y axis – and the Y axis for this feature plane 1 – point 1 is carefully aligned with the direction of the side edge of the black box (the object).

universal-robots-plane-1-point-1

When the robot has been moved into position set this as the Plane 1 – Point 1. Make sure the “Show axes” – “Joggable” and “Variable” is ticked because this will enable the see the axis color in the Move screen and enable the possible to jog with the plane as reference in the Move screen and it will enable the the possibility to use the plane as a variable in the program.

universal-robots-feature-plane-1-point-1

Move the robot in the desired Y direction of this user plane – in this case that is upwards exactly along the side edge of the black box. It is not important how long the robot is moved along the Y axis, but as long as possible gives the best result because then the angle to the X axis becomes more accurate.

In this case the robot is moved to the corner of the black box.

universal-robots-plane-1-point-2

When the robot has been moved into position set this as the Plane 1 – Point 2. Make sure the “Show axes” – “Joggable” and “Variable” is ticked because this will enable the see the axis color in the Move screen and enable the possible to jog with the plane as reference in the Move screen and it will enable the the possibility to use the plane as a variable in the program.

universal-robots-feature-plane-1-point-2

Move the robot in the desired X direction of this user plane – in this case that is sidewards exactly along the side edge of the black box. It is not important how long the robot is moved along the X axis, but as long as possible gives the best result because then the angle to the Y axis becomes more accurate.

In this case the robot is moved to the corner of the black box.

universal-robots-plane-1-point-3

When the robot has been moved into position set this as the Plane 1 – Point 3. Make sure the “Show axes” – “Joggable” and “Variable” is ticked because this will enable the see the axis color in the Move screen and enable the possible to jog with the plane as reference in the Move screen and it will enable the the possibility to use the plane as a variable in the program.

universal-robots-feature-plane-1-point-3

As this article will show how it is possible to move between planes  – it is necessary to create one more user plane so a difference in the robot movement can be observed.

So the black box is moved in an angle in order to illustrate another plane orientation.

Move the robot to the desired position of the origin of the second user plane (Plane 2). The new lower left corner near the robot is used as the origin for the user plane. Pay attention to the orientation of the tool head rotation – in this case the blue light on the Robotiq gripper is exactly opposite the I/O connector and therefore the blue light in this case indicate the Y axis – and the Y axis for this feature plane 2 – point 4 is carefully aligned with the direction of the side edge of the black box (the object).

universal-robots-plane-2-point-1a

Because the box is now in an angle the tool head is also rotated a little to match up the angle of the black box -see a second photo of this below. The blue light which is the Y axis is aligned with the side edge of the black box.

universal-robots-plane-2-point-1b

When the robot has been moved into position set this as the Plane 2 – Point 4. Make sure the “Show axes” – “Joggable” and “Variable” is ticked because this will enable the see the axis color in the Move screen and enable the possible to jog with the plane as reference in the Move screen and it will enable the the possibility to use the plane as a variable in the program.

universal-robots-feature-plane-2-point-4

Move the robot in the desired Y direction of this user plane 2 – in this case that is upwards exactly along the side edge of the black box. It is not important how long the robot is moved along the Y axis, but as long as possible gives the best result because then the angle to the X axis becomes more accurate.

In this case the robot is moved to the corner of the black box.

universal-robots-plane-2-point-2a

Again notice e the box is now in an angle the tool head is also rotated a little to match up the angle of the black box – see a second photo of this below. The blue light which is the Y axis is aligned with the side edge of the black box.

universal-robots-plane-2-point-2b

When the robot has been moved into position set this as the Plane 2 – Point 5. Make sure the “Show axes” – “Joggable” and “Variable” is ticked because this will enable the see the axis color in the Move screen and enable the possible to jog with the plane as reference in the Move screen and it will enable the the possibility to use the plane as a variable in the program.

universal-robots-feature-plane-2-point-5

Move the robot in the desired X direction of this user plane 2 – in this case that is sidewards exactly along the side edge of the black box. It is not important how long the robot is moved along the X axis, but as long as possible gives the best result because then the angle to the Y axis becomes more accurate.

In this case the robot is moved to the corner of the black box.

universal-robots-plane-2-point-3a

Again notice e the box is now in an angle the tool head is also rotated a little to match up the angle of the black box – see a second photo of this below. The blue light which is the Y axis is aligned with the side edge of the black box.

universal-robots-plane-2-point-3b

When the robot has been moved into position set this as the Plane 2 – Point 6. Make sure the “Show axes” – “Joggable” and “Variable” is ticked because this will enable the see the axis color in the Move screen and enable the possible to jog with the plane as reference in the Move screen and it will enable the the possibility to use the plane as a variable in the program.

universal-robots-feature-plane-2-point-6

Also make sure that for both Plane 1 and Plane 2 the “Show axes” – “Joggable” and “Variable” is ticked because this will enable the see the axis color in the Move screen and enable the possible to jog with the plane as reference in the Move screen and it will enable the the possibility to use the plane as a variable in the program.

universal-robots-feature-plane-1-variable
universal-robots-feature-plane-2-variable

When the “Variable” is ticked then it is possible to select the Plane variable in drop down menus when programming the robot.

Notice that there is now two variables with the names Plane_1_var and Plane_2_var which can be used in the program as reference.

universal-robots-feature-planes-variables-2

Now the planes are ready to be used in the program.

Variable Table:
Var_1 = counter
Var_2 = Reference to first corner of box. (Same as Waypoint 1 i.e. 0mm along X axis and 0mm along Y axis).
Var_3 = Reference to second corner of box. (330mm along X axis and 0mm along Y axis).
Var_4 = Reference to third corner of box. (330mm along X axis and 180mm along Y axis).
Var_5 = Reference to forth corner of box. (0mm along X axis and 180mm along Y axis).
Var_6 = Cordinates for Waypoint 1.
Var_7 = First corner of box with Plane_1 or Plane_2 as reference.
Var_8 = First corner of box with Plane_1 or Plane_2 as reference).
Var_9 = First corner of box with Plane_1 or Plane_2 as reference).
Var_10 = First corner of box with Plane_1 or Plane_2 as reference).

Notice: Var_7, Var_8, Var_9, Var_10 will change during the program run depending on Var_1 counter (Cange evry second program run).

Program description:
Below is an example of a Universal-Robots polyscope program that move between two different planes and thereby follow to edges of the black box in two different orientations.

First a counter variable is created in order make two different program runs each with a different plane as reference.

Then the box is measured to be 330mm x 180mm and therefore variables are created for offset to each of the 4 corners.

There are two “If” conditions based on the Var_1 counter variable so the program will move between the two If conditions evray second time during the program run.

The difference between the two “If” staements are that first time it is the Plane_1 that is used as reference and therefore the robot will follow Plane_1 as origin. The second time it is Plane_2 that is used as refference and therefore the robot will follow Plane_2 as origin.

There are 4 variable waypoints (Var_7, Var_8, Var_9 and Var_10) so the robot will move between these 4 waypoints based on the variable contents calculated in the “If” statements with the pose_trans function.

Also notice that both MoveL are set to use the Base_1_var as reference.

universal-robots-program-working-with-planes-2

Below is a video that show the program run. Notice the change in plane orientation.

(If video does not play – try this link)

It is also possible to use variables inside the reference lists – as this example show. The movements is the same as above, but different method of using lists. This can be useful for example when getting the data from a vision camera.

universal-robots-program-working-with-planes-3

Disclaimer: While the Zacobria Pte. Ltd. believes that information and guidance provided is correct, parties must rely upon their skill and judgement when making use of them. Zacobria Pte. Ltd. assumes no liability for loss or damage caused by error or omission, whether such an error or omission is the result of negligence or any other cause. Where reference is made to legislation it is not to be considered as legal advice. Any and all such liability is disclaimed.

If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.

Author:
By Zacobria Lars Skovsgaard
Accredited in 2015 Universal Robots support Centre and Forum.


Tweet

Follow @zacobria