question

Mike avatar image
0 Likes"
Mike asked Kavika F answered

Robot doesn't follow item placement position

I use robot for a simple packing process. However, robot just throws the items onto the pallet instead of robot end effector follow the item position. Is there any way to make robot gripper to follow the item position instead of dropping the item at the middle of the pallet? Thanks.

Robot end effector position.fsm

FlexSim 23.1.1
robot placement position
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered

Hey @Mike, the Robot is able to deliver items to their specific locations on Fixed Resources because they have a "Pick/place offset" mechanism built in. A Pallet is a Flow Item which doesn't have this functionality - that's why it has a "packing method" to place items within it.

To get the functionality you want, you'll have to use a Process Flow that calculates the position the box will be in due to the packing method.

1688411381450.png

I changed the Combiner out to be a Queue and changed some connections so I could customize the flow of items.

1688412163736.png

When a pallet arrives at Queue2, it spawns a token in the Process Flow. It checks to see if there's a box ready to be grabbed. Once there is, the robot grabs the box. Once loaded, it will calculate where to put the box based on the Queue's position and the Pallet's location within that. It will use your custom packing method to determine where to place the boxes (see custom code below).

After we do that, we have the Robot travel to that location then manually move the box from the Robot into the Pallet. The Pallet's packing method will take care of actually placing the box in the right location on the pallet.


Once the pallet is full, we move it onto the Outbound conveyor. A new pallet fills Queue2 in and we start again.

Hope this helps!

robot-end-effector-position-kf.fsm

/**Custom Code*/
Object current = param(1);
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);

//Object item = token.Box;
Object pallet = token.Pallet;
Object queue = pallet.up;
int curContents = pallet.subnodes.length;
Vec3 palletLoc = queue.location + pallet.location;
Array destination = [];

switch(curContents)
{
  case 0: 
  {
  // Places origin point of item in upper left corner of container
  destination = [palletLoc.x + pallet.size.x/2, palletLoc.y - pallet.size.y/2-0.5, palletLoc.z + pallet.size.z];
  break;
  }
  case 1: 
  {
  // Places center of bottom face of item at center of top face of containter
  destination = [palletLoc.x + pallet.size.x/2, palletLoc.y - pallet.size.y/2, palletLoc.z + pallet.size.z];
  break;
  }
  case 2:
  {
  // Places upper right corner of item at specified coordinates
  destination = [palletLoc.x + pallet.size.x/2, palletLoc.y - pallet.size.y/2+0.5 , palletLoc.z + pallet.size.z];
  break;
  }

}

token.destination = destination;



5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.