I am working with a Universal Robots UR robot running Polyscope 5.12 and using the Palletizing template.
I created a simple palletizing program with a grid pattern of 2 × 3 (6 items).
Inside the palletizing node, I defined the pick and place sequence under “At Each Item”, which should repeat for every pallet position.
However, when I run the program without any external loop, the robot only executes the sequence for the first item and then the program stops.
What I observe:
Pallet_1_cnt starts at 1
After placing the first item, Pallet_1_cnt becomes 2
The program then ends instead of continuing with item 2
If I add:
Loop 6 times
Pallet_1
then the robot correctly places all 6 parts.
From my understanding, the “At Each Item” node inside the Palletizing template should already act as the iteration over the pallet positions, so I expected the palletizing node to execute all items in one run.
My questions:
Is this the expected behavior in Polyscope 5.12, meaning that the Palletizing node only executes one item per call?
Should the palletizing node normally require an external loop to complete the pallet?
Why do some example videos show palletizing filling the whole pallet without an explicit loop?
For reference, my program structure is roughly:
Robot Program
Gripper Activate
Gripper Open
MoveJ Waypoint_1
Loop 6 times
Pallet_1
And inside Pallet_1:
Patterns
Grid_Pattern_1
CornerItem_1
CornerItem_2
CornerItem_3
CornerItem_4
Layers
At Each Item
MoveJ Waypoint_3
MoveL Waypoint_2
Gripper Close
...
Any clarification on the intended behavior of the Palletizing node in Polyscope 5.12 would be appreciated.
That is indeed how the UR robot is intended to be used. By default, it will loop the whole sequence forever, so you must have disabled this function yourself.
The function can be found by highlighting the “Robot Program” line and going to the Command tab. At the bottom you will find the function for looping the sequence forever.
The palletizing template is meant to be set up at just the first item location and only for either palletizing or depalletizing your items. You will need a sequence outside either before or after (usually both) for what to do with the items before/after.
A quick look at your sequence would indicate you have misunderstood the above.
I did try enabling “Program Loops Forever”, and in that case the palletizing sequence runs correctly through all 6 positions. However, the program then immediately starts again from the beginning and continues placing parts beyond the intended pallet capacity.
What I actually need is for the robot to fill the pallet once (6 items in my case) and then stop. Therefore, it seems necessary to add a condition at the end of the loop, for example checking when the pallet counter reaches the total number of items and then stopping the program.
So effectively the structure would be something like:
Loop
Pallet_1
If Pallet_1_cnt >= Pallet_1_tct
Halt
From what I understand now, the palletizing template executes one item per program cycle and the iteration must be handled by the program loop.
I realize now that using a loop for palletizing is actually common on other robot platforms as well. My confusion came from assuming that the UR palletizing template might internally handle the full pallet sequence automatically, since it appears quite advanced compared to what I initially expected.
You mentioned that the issue might be related to the pick sequence before the palletizing node, but that part is already implemented in my program. I already have the pick sequence placed before the palletizing operation.
So that part is working as intended. The only issue I am currently facing was with the loop behavior
The palletizing template has a function for adding a sequence after the last item has been placed/picked. I personally use this to set a variable to True telling a later sequence that it is finished.