Pick and Place
After having obtained the cartons’ poses using a Mech-Vision case project, you can then build a workflow for the Mech-Viz project to guide the robot to pick and place cartons repeatedly.
The following figure shows the process of building a project.
Configure the Robot and Scene
To avoid collision with surrounding objects during robot picking and placing, you need to add the tool model, and scene model to the project for collision detection. The process is shown in the figure below.
Import and Configure the Tool Model
|
The end tool should be imported and configured so that its model can be displayed in the 3D simulation space and used for collision detection.
Import the Tool Model
-
Click + in
.Project resources refer to various fundamental resources used in the project, including the robot, tools, workpieces, and scene objects.
-
In the prompted window, select the collision model file in .obj format, and then click Open.
-
After the model is imported, you can see the imported model in the model library.
Configure the Tool
-
Click + in
. -
In the prompted window, enter the tool name, select the imported tool model as the collision model and visualization model, and then click OK.
-
After the tool is configured, you can view the configured tool in the 3D simulation space, as shown below.
Adjust the Tool
As shown above, the pose of the tool in reference to the robot is obviously wrong. So, you need to adjust the pose of the tool.
-
Double-click the tool model in the model library.
-
In the prompted window, adjust the TCP (Tool Center Point).
The TCP is usually on the tip of the tool. In this tutorial, the TCP in the center points of the suction cups.
-
The tool’s poses before and after the adjustment are shown below.
Import and Configure the Scene Model
Scene objects are imported and configured to make the scene in the software closer to the real scenario, which facilitates the planning of the robot motion path.
Import the Scene Model
-
Click + in
. -
In the prompted window, select the scene object model file, and then click Open.
-
After the model is imported, you can see the imported model in the model library.
Configure the Scene Model
-
Click + in
. -
In the prompted window, enter the object name, select “Custom model” as the “Scene model”, select the imported scene object model as the collision model and visualization model, and then click OK.
-
After configuration, the scene object is displayed in the 3D simulation space.
To view the scene model better, you can hide the floor.
After configuring the models, click Sync Robot on the toolbar to keep the simulated robot’s pose consistent with that of the real robot.
Build a Workflow
After configuring the models, you can now start to build a workflow. Drag a step from the step library to the graphical programming workspace, set the parameters of the Steps, and connect Steps to achieve preset program functions.
|
Move to “Initial Pose”
The initial pose is the initial point of the robot motion, and it also should be a safe position. At this pose, the robot should be away from the objects to pick and the surrounding devices, and should not block the camera’s FOV.
After the robot arrives at the self-defined initial pose, select Fixed-Point Move in the Step Library, and drag it to the graphical programming workspace, rename it as “initial pose”. Then click Sync Robot on the toolbar to record the current pose of the robot for this Step.
Trigger Image Capturing and Vision Processing
Step |
Vision Look |
Description |
Start the Mech-Vision project to obtain the vision recognition result. |
Operation |
Find the “Vision Look” Step in the Step Library, and drag it to the graphical programming workspace. |
Parameter Settings |
Select Single_Case_Cartons from the Vision Name drop-down list. |
Image |
After the “Vision Look” Step, add the Check Look Step to check whether there is any vision result.
Step |
Check Look |
Description |
Check whether there is any vision result. |
Operation |
Find the “Check Look” Step in the Step Library, and drag it to the graphical programming workspace. |
Parameter Settings |
Keep the default parameter settings. |
Move the Robot to the Approach Waypoint of Picking
When picking cartons, if the robot directly moves from the initial pose to the picking waypoint, collision with the cartons may occur. After obtaining the vision recognition result, you can then use the Relative Move step to move the robot to the approach waypoint.
Step |
Relative Move |
Description |
Move according to the vision recognition result. |
Operation |
Find the “Relative Move” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Approach waypoint 1”. |
Parameter Settings |
Set Relative Move Dependency to Next waypoint; set Waypoint type to Tool, and set the Z coordinate to a proper value, such as -300mm. |
Image |
|
Pick the Carton
After the robot has arrived at the approach waypoint, you can control the robot to pick cartons. The picking process can be divided into two steps.
-
Step 1: Use the Vision Move Step to control the robot to arrive at the picking waypoint.
-
Step 2: Use the Set DO Step to control the robot to pick the carton using the suction cups.
See the following for details.
Step |
Vision Move |
Description |
Move according to the vision recognition result. |
Operation |
Find the “Vision Move” Step in the Step Library, and drag it to the graphical programming workspace. |
Parameter Settings |
Select Single_Case_Cartons from the Vision Service Name drop-down list. |
Image |
Step |
Set DO |
Description |
Control the suction cups to pick the carton. |
Operation |
Find the “Set DO” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Trigger Suction Cup”. |
Parameter Settings |
Set the Digital Out Value and DO Port parameters to 1. These parameter values are reference only. Please determine them according to actual on-site requirements. |
Image |
To ensure that the robot can pick the carton securely, add the Wait Step.
Step |
Wait |
Description |
To avoid the failures to pick cartons. |
Operation |
Find the “Wait” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Wait for firm gripping”. |
Parameter Settings |
Set the Wait Time parameter to 1000ms. |
Image |
Move the Robot to the Departure Waypoint of Picking
After the robot picks the carton, you need to use the Relative Move Step to move the robot to the departure waypoint to avoid the collision between the carton and the scene objects.
Step |
Relative Move |
Description |
Move according to the vision recognition result. |
Operation |
Find the “Relative Move” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Departure waypoint”. |
Parameter Settings |
Set Relative Move Dependency to Next waypoint; set Waypoint type to Tool, and set the Z coordinate to a value larger than the height of the cartons. For example, if the carton height is 500 mm, set the Z coordinate to -600 mm. |
Image |
|
Move the Robot to a Transition Waypoint
To avoid collision, you can add transition waypoints using the Fixed-Point Move Step after the departure waypoint to optimize the picking and placing path.
Step |
Fixed-Point Move |
Description |
Optimize the robot picking and placing path |
Operation |
Find the “Fixed-Point Move” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Transition waypoint”. |
Parameter Settings |
Set Waypoint type to JPs and set the JPs values. |
Image |
|
Move the Robot to the Approach Waypoint of Placing
Before the robot places the carton, you need to use the Relative Move Step to move the robot to the approach waypoint for placing to avoid collision between the carton and the scene object.
Step |
Relative Move |
Description |
Move according to the vision recognition result. |
Operation |
Find the “Relative Move” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Approach waypoint 2”. |
Parameter Settings |
Set Relative Move Dependency to Next waypoint; set Waypoint type to Tool, and set the Z coordinate to a proper value, such as -200 mm. |
Image |
|
Place the Carton
After the robot arrives at the approach waypoint for placing, you can control the robot to place cartons. The picking process can be divided into two steps.
-
Step 1: Use the Fixed-Point Move Step to control the robot to arrive at the placing waypoint.
-
Step 2: Use the Set DO Step to control the robot to release the suction cups to place the carton.
See the following for details.
Step |
Fixed-Point Move |
Description |
Control the robot to arrive at the placing waypoint. |
Operation |
Find the “Fixed-Point Move” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Placing waypoint”. |
Parameter Settings |
Set a proper TCP as the placing waypoint. |
Image |
Step |
Set DO |
Description |
Release the suction cups to place the carton. |
Operation |
Find the “Set DO” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Release suction cup”. |
Parameter Settings |
Set the Digital Out Value parameter to 0 and the DO Port parameter to 1. These parameter values are reference only. Please determine them according to actual on-site requirements. |
Image |
Since it takes time for the suction cup to release, you need to add the Wait Step to avoid the failure of placing the carton by the robot.
Step |
Wait |
Description |
Avoid the failure of placing the carton by the robot. |
Operation |
Find the “Wait” Step in the Step Library, drag it to the graphical programming workspace, and rename it as “Wait for release”. |
Parameter Settings |
Set the Wait Time parameter to 1000ms. |
Image |
Simulate and Run the Project
-
After all the Steps are connected properly, click the Simulate button on the toolbar to simulate the Mech-Viz project.
-
If the project runs as expected in simulation, click the Run button on the Mech-Viz toolbar to run the project with the real robot.
It is recommended that the robot should move at a low speed and that you pay attention to the robot motion trajectory. In the case of an emergency, press the emergency stop button on the teach pendant. |