


 IN ORDER TO SIMULATE THE PROGRAM:
   A) FIRST, LOAD A ROBOT
       robot = load_robot('abb','irb140');
   B) NEXT, LOAD SOME EQUIPMENT.
       robot.equipment = load_robot('equipment','tables/table_small');
       OR
       robot.equipment = load_robot('equipment','bumper_cutting');
   C) NOW, LOAD AN END TOOL
       robot.tool= load_robot('equipment','end_tools/parallel_gripper_0');
   D) FINALLY, LOAD A PIECE TO GRAB BY THE ROBOT
       robot.piece=load_robot('equipment','cylinders/cylinder_tiny');
   E) IF NECESSARY, CHANGE THE POSITION AND ORIENTATION OF THE ROBOT'S
   BASE
       robot.piece.T0= [1 0 0 -0.35;
                        0 1 0 -0.55;
                        0 0 1 0.2;
                        0 0 0 1]; 
 during the simulation, call simulation_open_tool; to open the tool and 
 simulation_close_tool; to close it.
 To grip the piece, call simulation_grip_piece; and
 simulation_release_piece to release it.
 The call to each function must be correct, thus, typically the correct
 sequence is:
 simulation_open_tool;
 approach the piece to grab.
 simulation_close_tool;
 simulation_grip_piece; --> the piece will be drawn with the robot
 move to a different place
 simulation_open_tool;
 simulation_release_piece


0001 % IN ORDER TO SIMULATE THE PROGRAM: 0002 % A) FIRST, LOAD A ROBOT 0003 % robot = load_robot('abb','irb140'); 0004 % B) NEXT, LOAD SOME EQUIPMENT. 0005 % robot.equipment = load_robot('equipment','tables/table_small'); 0006 % OR 0007 % robot.equipment = load_robot('equipment','bumper_cutting'); 0008 % C) NOW, LOAD AN END TOOL 0009 % robot.tool= load_robot('equipment','end_tools/parallel_gripper_0'); 0010 % D) FINALLY, LOAD A PIECE TO GRAB BY THE ROBOT 0011 % robot.piece=load_robot('equipment','cylinders/cylinder_tiny'); 0012 % 0013 % E) IF NECESSARY, CHANGE THE POSITION AND ORIENTATION OF THE ROBOT'S 0014 % BASE 0015 % robot.piece.T0= [1 0 0 -0.35; 0016 % 0 1 0 -0.55; 0017 % 0 0 1 0.2; 0018 % 0 0 0 1]; 0019 % 0020 % during the simulation, call simulation_open_tool; to open the tool and 0021 % simulation_close_tool; to close it. 0022 % To grip the piece, call simulation_grip_piece; and 0023 % simulation_release_piece to release it. 0024 % The call to each function must be correct, thus, typically the correct 0025 % sequence is: 0026 % simulation_open_tool; 0027 % approach the piece to grab. 0028 % simulation_close_tool; 0029 % simulation_grip_piece; --> the piece will be drawn with the robot 0030 % move to a different place 0031 % simulation_open_tool; 0032 % simulation_release_piece 0033 0034 function test_1 0035 0036 global RT_tp1 RT_tp2 TD_tool0 0037 0038 RT_tp1=[[0.4000, 0.3000, 0.7000],[1.0000, -0.0000, -0.0000, -0.0000], [0, -1, -1, 0], [9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]; 0039 RT_tp2=[[0.1000, -0.4000, 0.7000],[0.0000, -0.0000, 0.0000, 1.0000], [-1, -1, -2, 0], [9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]; 0040 0041 %definition of the end effector. 0042 TD_tool0=[1,[[0,0,0],[1,0,0,0]],[0,[0,0,0],[1,0,0,0],0,0,0]]; 0043 0044 %finally, call the main function 0045 main 0046 end 0047 0048 function main 0049 global RT_tp1 RT_tp2 TD_tool0 0050 0051 MoveJ(RT_tp1, 'vmax' , 'fine' , TD_tool0, 'wobj0'); 0052 MoveJ(RT_tp2, 'vmax' , 'fine' , TD_tool0, 'wobj0'); 0053 MoveL(RT_tp1, 'vmax' , 'fine' , TD_tool0, 'wobj0'); 0054 MoveL(RT_tp2, 'vmax' , 'fine' , TD_tool0, 'wobj0'); 0055 0056 end