Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel1

...

In Short: TaskCompleted

TaskCompleted

A boolean value that

Pally updates based on the vacuum levels detected in the gripper. The variable is used to verify that the gripper has gripped the box(es) in the current task. If TaskCompleted = False after the beforeRelease-callback, Pally will assume that no boxes were carried from the pickup to the target position on the pallet, leading Pally to try this same position in the next run.The user can override the value for TaskCompleted in the beforeRelease-callback. It is however recommend to let Pally handle the logic for this. See the ‘In Detail: TaskCompleted’ section on how to configure the gripper such that Pally gets reliable input to set TaskCompleted.

controls whether the main Pally program should proceed to the next box position on the pallet, or repeat the same box position again. This is useful in the following scenarios:

  • advanced logic is required to evaluate if the gripper has lost the box before reaching the pallet, or

  • move some of the boxes to a separate place other than the pallet, e.g. after a quality check routine (usually in combination with custom path that moves the exceptional boxes away)

The variable should be controlled by the user code in the beforeRelease-callback if required:

Possible values

  • True -

Sufficient vacuum level has been detected in the gripper, i.e the box(es) have been gripped; or the gripper does not have a vacuum sensor
  • Box has reached the target position on the pallet, the program can proceed to next box.

  • False -

Insufficient vacuum level has been detected in the gripper, i.e the box(es) have not been gripped.

Example

There are two cases for TaskCompleted:

  1. If a Schmalz FXCB Foam gripper is used, and the Vacuum lost signal is tool_input[1] - then Pally will verify that the vacuum is present by checking if the vacuum is not lost. Pally will use this information to set the value for TaskCompleted.

  2. If another gripper, that has no vacuum sensor is used, then leave the Vacuum lost signal at -Always-LOW. Pally will then always set TaskCompleted to True.

NoteRegarding example 2, this may cause Pally to believe that a box has been placed on the pallet, even though the box was lost on the way due to insufficient vacuum.
  • Box has not reached the target position, the program should repeat the same position.

The default value is True unless lost vacuum is reported by the “vacuum lost” signal.

Example

  • Use the Assignment program node directly in Polyscope, or

  • Write URScript code directly:
    if (...): # barcode reading failed
    movel(...) # move the damaged box to the thrashcan
    TaskCompleted = False # box has not reached the pallet
    end

In Detail: TaskCompleted

The boolean variable TaskCompleted is used to verify that the robot has placed box(es) on the pallet, such that empty runs are not counted as successful runs. Even though it and the program can proceed to the next position or not.

It is possible to manually set the value for this variable, which should then be done in the beforeRelease-callback, it is recommended to let Pally handle the logic to set the value of TaskCompleted.

Pally will set TaskCompleted (to either True or False) based on if it detects sufficient vacuum level in the gripper before it releases the box. This, as the vacuum level in the gripper will signal to Pally that the gripper is lifting a box (i.e a successful run). If the vacuum level in the gripper is low, then it signals that there is no box present on the gripper (i.e an empty run).

...

The logic in the Pally code gives more insight as to how the TaskCompleted variable is used and altered:

Code Block
languagepy
#global ChecksTaskCompleted the= vacuumHasVacuum()
level
before# releasingUSER boxCALLBACK
has_vacuum = HasVacuumusercallback_beforeRelease()
global
TaskCompleted# =control has_vacuumthe gripper, #turn USERCALLBACK
usercallback_beforeRelease()

off vacuum
ReleaseBox()

if (TaskCompleted):
  LOG_INFO("# box released: ", rf_cntPos)has reached the pallet, can proceed to next box
  SetCurrentTaskCompleted()
else:
  if# (notbox has_vacuum): not reached the  LOG_WARNING("vacuum not detected, retrying box: ", rf_cntPos)
  end
  CancelCurrentTask()
endpallet, repeat last position
  CancelCurrentTask()
end

# USER CALLBACK
usercallback_afterRelease()

The logic in the Pally code shows how the TaskCompleted is set based on the vacuum level (but it can also be overwritten in the beforeRelease-callback), and then used to verify if boxes were moved or not

...