d i nt a s t e
Pallet Position Calculation
UID: Core Module 1.1
🎯 Key idea:
index + formula
= many possible positions
index + formula
= many possible positions
1. Linear index i
The robot runs inside a loop:
FOR i = 0 TO N-1
where N is the total number of objects to place.
The variable i represents the object number. The main question is:
how do we convert i into a position (x, y, z)?
2. 2D pallet – rows and columns
We assume a pallet with:
- c = number of columns
- r = number of rows
- dx = spacing between objects on X axis
- dy = spacing between objects on Y axis
We need two mathematical operations to get column and row from index i:
🔍 MOD (i / α) returns the remainder of the division
🔍 INT (i / α) returns the quotient of the division
Example for α = 3:
i: 0 1 2 3 4 5 6 7 8
this is the index
i MOD 3: 0 1 2 0 1 2 0 1 2
this operation will reset the expression from 3 to 3 values of i
INT(i/3): 0 0 0 1 1 1 2 2 2
this operation will increment the expression from 3 to 3 consecutive values of i
3. 3D pallet – rows, columns and layers
For 3D palletizing we add:
- h = object height (spacing between objects on Z axis)
- n = objects per layer
layer number = INT( i / n )
The Z position is then calculated as:
z = h × layer
This means:every n boxes, the robot moves up one layer.
Conclusion
Everything shown in the sketch reduces to:
- a linear index i
- simple operations: MOD (i / α) and INT (i / α)
/ END OF FILE