MoveTarget and MountPosition

If you have not read the information explaining the custom path feature, then please refer to this page before reading onwards: Customize the Robot's Path

This page gives a short overview of the variables MoveTarget and MountPosition , and then a more in depth look at how the variables can be used in Pally:


In Short: MoveTarget and MountPosition

MoveTarget and MountPosition

are two global pose variables that contain the target position of the robot and the lifting column position in the following scenarios:

  1. Pick the next box from the conveyor

  2. Placement of the next box on the pallet

  3. Moving back to the waiting position

It is possible to skip the default Pally path planning, and control the robot and the lifting column directly by using these variables.

Example

The variables should only be used to move the robot and the lifting column to the correct position in the functions for the custom path.

  • select the MoveTarget variable directly for a corresponding Move waypoint in Polyscope (variable position) or

  • use URScript commands:

    • movel(MoveTarget, a=rf_max_acceleration, v=rf_speed, r=0)

    • move_liftkit(MountPosition[2] * 1000) # convert to mm for LiftKit first

In Detail: MoveTarget and MountPosition

MoveTarget

A pose variable that contains the robot’s target pose in the following scenarios:

  1. Pick the next box from the conveyor

  2. Placement of the next box on the pallet

  3. Moving back to the waiting position

The value of the MoveTarget variable changes as the robot completes certain tasks in its palletizing routine.

In Pally, these tasks are represented by callbacks. The beforeGrab-, afterGrab- and afterRelease-callbacks are of importance when using MoveTarget to extract the robot’s target position. This, as the robot’s target position changes based on the current task.

If Pally is in a state where the next box is to be picked (scenario 1), which is in the beforeGrab-callback, then the MoveTarget contains the robot’s pose to pick the next box from the conveyor.

If Pally is in a state where the next box is to be placed (scenario 2), which is in the afterGrab-callback, then the MoveTarget contains the robot’s pose to place the next box on the pallet.

If Pally is in a state where it wants to move the robot back towards the waiting position (scenario 3), which is in the afterRelease-callback, the MoveTarget variable contains the robot’s pose in the waiting position.

Do not edit the MoveTarget variable!

Possible values

  1. Robot pose for picking next box from conveyor: p[x1, y1, z1, rx1, ry1, rz1]

  2. Robot pose for placing next box on pallet: p[x2, y2, z2, rx2, ry2, rz2]

  3. Robot pose for waiting position according to current zone: p[x3, y3, z3, rx3, ry3, rz3]

MountPosition

A pose variable that contains the new mounting position compared to the mounting position where Pally was calibrated. Currently only the Z-value is in use, and contains the expected lifting column position in the following scenarios:

  1. Pick the next box from the conveyor

  2. Placement of the next box on the pallet

  3. Moving back to the waiting position

The value of the MountPosition variable changes as the robot completes certain tasks in its palletizing routine. The units are meters.

If Pally is in a state where the next box is to be picked (scenario 1), which is in the beforeGrab-callback, then the MountPosition contains the expected lifting column position from where the robot should pick the next box from the conveyor.

If Pally is in a state where the next box is to be placed (scenario 2), which is in the afterGrab-callback, then the MountPosition contains the expected lifting column position from where the robot should place the next box on the pallet.

If Pally is in a state where it wants to move the robot back towards the waiting position (scenario 3), which is in the afterRelease-callback, the MountPosition contains the expected lifting column position from where the robot should move to the waiting position.

Do not edit the MountPosition variable!

Possible values

  1. Lifting column position for picking next box from conveyor: p[0, 0, l1, 0, 0, 0]

  2. Lifting column position for placing next box on pallet: p[0, 0, l2, 0, 0, 0]

  3. Lifting column position for waiting position according to current zone: p[0, 0, l3, 0, 0, 0]

 

MoveTarget and MountPosition in the Pally program

The following code fragment shows how the MoveTarget and MountPosition is being used in Pally: 

global MoveTarget = p[...] global MountPosition = p[...] global MovePerformed = False # USERCALLBACK usercallback_afterGrab() if (not MovePerformed): # commands that move the robot and lifting column [...] end # USERCALLBACK usercallback_beforeRelease()

If MovePerformed is set to True in the afterGrab-callback, then Pally will not call on the function to move the robot to the target position

MoveTarget and MountPosition in Custom Path

The MoveTarget and MountPosition variables are useful whenever the custom path feature is in use. As described in Customize the Robot's Path , the custom path feature requires you to define two functions that will move the robot to the target position and back from the target position. These functions, which may be called MoveToTarget() and MoveBack() respectively, should use the MoveTarget variable as the target position for the robot.

An example of how to implement the custom path feature

In the example above, the MoveToTarget() function in the afterGrab-callback should use the MoveTarget variable to get the robot’s position to place the box on the pallet. Whereas the MoveBack() function in the afterRelease-callback should use the MoveTarget variable to get the waiting position for the robot - and then move the robot towards this position.