Trajectory Motion Pick & Place Path Planning

Screenshot+%28868%29.jpg
Screenshot+%28854%29.jpg
Screenshot+%28857%29.jpg
Screenshot+%28864%29.jpg
MODULE Module1
	TASK PERS tooldata appg0926tool:=[TRUE,[[65.0003,-116.355,391.221],[0.921916,0.344394,0.166162,0.0620722]],[1,[0,0,100],[1,0,0,0],0,0,0]];
    TASK PERS wobjdata appg0926wo2:=[FALSE,TRUE,"",[[6204.5,-502.114,449.151],[0.999987,-0.00469514,0.00110155,0.0015649]],[[0,0,0],[1,0,0,0]]];
    TASK PERS wobjdata appg0926wo2_2:=[FALSE,TRUE,"",[[6204.5,300,449.151],[0.999987137,-0.004696641,0.001100936,0.001567254]],[[0,0,0],[1,0,0,0]]];
	CONST speeddata fast := v100;
    CONST speeddata slow := v50;
    CONST zonedata accurate := fine;
    CONST zonedata approximate := z30;
    CONST zonedata flyaway := z100;
    
    CONST robtarget start:=[[187.855193466,374.074652043,1183.429587225],[0.3165455,0.229112718,0.882024517,-0.26332311],[0,-1,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    
	CONST robtarget pickSafe:=[[250,250,150],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
	CONST robtarget pick_1:=[[250,250,60],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
	CONST robtarget placeSafe_1:=[[250,230,150],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
	CONST robtarget place_1:=[[250,230,18],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    
    CONST robtarget pick_2:=[[250,250,48],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    CONST robtarget placeSafe_2:=[[250,270,150],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    CONST robtarget place_2:=[[250,270,18],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    
    CONST robtarget pick_3:=[[250,250,35],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    CONST robtarget placeSafe_3:=[[250,310,150],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    CONST robtarget place_3:=[[250,310,18],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    
    CONST robtarget pick_4:=[[250,250,21],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    CONST robtarget placeSafe_4:=[[250,350,150],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    CONST robtarget place_4:=[[250,350,18],[0,0,1,0],[0,0,0,0],[4322.718934,9E+09,9E+09,9E+09,9E+09,9E+09]];
    
    
    PROC main()
        pickPlace_1;
        pickPlace_2;
        pickPlace_3;
        pickPlace_4;
    ENDPROC
    
    PROC pickPlace_1()
        SetDO DO_TOOL_GRIPPER_CLOSE,0;
        Set DO_TOOL_GRIPPER_OPEN;
        WaitTime\InPos,2;
	    MoveJ start,fast,flyaway,appg0926tool\WObj:=appg0926wo2;
	    MoveJ pickSafe,fast,approximate,appg0926tool\WObj:=appg0926wo2;
	    MoveL pick_1,slow,accurate,appg0926tool\WObj:=appg0926wo2;
	    WaitTime\InPos,2;
	    Set DO_COMPRESSED_AIR;
	    WaitTime\InPos,2;
	    MoveL pickSafe,slow,accurate,appg0926tool\WObj:=appg0926wo2;
	    MoveJ placeSafe_1,slow,accurate,appg0926tool\WObj:=appg0926wo2_2;
	    MoveL place_1,slow,accurate,appg0926tool\WObj:=appg0926wo2_2;
	    WaitTime\InPos,2;
	    Reset DO_COMPRESSED_AIR;
	    WaitTime\InPos,2;
	    MoveL placeSafe_1,fast,accurate,appg0926tool\WObj:=appg0926wo2_2;
        Reset DO_TOOL_GRIPPER_OPEN;
    ENDPROC
    PROC pickPlace_2()
        Set DO_TOOL_GRIPPER_OPEN;
        WaitTime\InPos,2;
	    MoveJ pickSafe,fast,approximate,appg0926tool\WObj:=appg0926wo2;
	    MoveL pick_2,slow,accurate,appg0926tool\WObj:=appg0926wo2;
	    WaitTime\InPos,2;
	    Set DO_COMPRESSED_AIR;
	    WaitTime\InPos,2;
	    MoveL pickSafe,slow,accurate,appg0926tool\WObj:=appg0926wo2;
	    MoveJ placeSafe_2,slow,accurate,appg0926tool\WObj:=appg0926wo2_2;
	    MoveL place_2,slow,accurate,appg0926tool\WObj:=appg0926wo2_2;
	    WaitTime\InPos,2;
	    Reset DO_COMPRESSED_AIR;
	    WaitTime\InPos,2;
	    MoveL placeSafe_2,fast,accurate,appg0926tool\WObj:=appg0926wo2_2;
        Reset DO_TOOL_GRIPPER_OPEN;
    ENDPROC
    PROC pickPlace_3()
        Set DO_TOOL_GRIPPER_OPEN;
        WaitTime\InPos,2;
	    MoveJ pickSafe,fast,approximate,appg0926tool\WObj:=appg0926wo2;
	    MoveL pick_3,slow,accurate,appg0926tool\WObj:=appg0926wo2;
	    WaitTime\InPos,2;
	    Set DO_COMPRESSED_AIR;
	    WaitTime\InPos,2;
	    MoveL pickSafe,slow,accurate,appg0926tool\WObj:=appg0926wo2;
	    MoveJ placeSafe_3,slow,accurate,appg0926tool\WObj:=appg0926wo2_2;
	    MoveL place_3,slow,accurate,appg0926tool\WObj:=appg0926wo2_2;
	    WaitTime\InPos,2;
	    Reset DO_COMPRESSED_AIR;
	    WaitTime\InPos,2;
	    MoveL placeSafe_3,fast,accurate,appg0926tool\WObj:=appg0926wo2_2;
        Reset DO_TOOL_GRIPPER_OPEN;
    ENDPROC
    PROC pickPlace_4()
        Set DO_TOOL_GRIPPER_OPEN;
        WaitTime\InPos,2;
	    MoveJ pickSafe,fast,approximate,appg0926tool\WObj:=appg0926wo2;
	    MoveL pick_4,slow,accurate,appg0926tool\WObj:=appg0926wo2;
	    WaitTime\InPos,2;
	    Set DO_COMPRESSED_AIR;
	    WaitTime\InPos,2;
	    MoveL pickSafe,slow,accurate,appg0926tool\WObj:=appg0926wo2;
	    MoveJ placeSafe_4,slow,accurate,appg0926tool\WObj:=appg0926wo2_2;
	    MoveL place_4,slow,accurate,appg0926tool\WObj:=appg0926wo2_2;
	    WaitTime\InPos,2;
	    Reset DO_COMPRESSED_AIR;
	    WaitTime\InPos,2;
	    MoveL placeSafe_4,fast,accurate,appg0926tool\WObj:=appg0926wo2_2;
        MoveJ start,fast,flyaway,appg0926tool\WObj:=appg0926wo2;
        Reset DO_TOOL_GRIPPER_OPEN;
        
    ENDPROC

ENDMODULE