mm_vision_pick_and_place
The program triggers the Mech-Vision project to run to obtain the vision result for picking and placing the object.
Configuration Description
Point Configurations
The program involves a total of six points, including three taught points and three automatically calculated points.

-
Taught points: Points that need to be taught beforehand.
-
AbovePickArea: Similar to the Home position; the robot can reach the Detect point and Dropoff point from it conveniently.
-
Detect: The point where the camera captures images.
-
Dropoff: The point where the robot places the object.
-
-
Automatically calculated points: Computed based on the vision result returned by Mech-Vision, no prior teaching is required.
-
Pick: The point assigned based on the vision result returned by Mech-Vision.
-
PrePick: The point obtained by offsetting the Pick point along the Z-axis, used for a linear approach before grasping.
-
PostPick: The point obtained by offsetting the Pick point along the robot base’s Z-axis, used for a linear departure after grasping.
-
Configuration Parameters
MM init Component
All network devices in the program are generated by using MM init. This component allows you to modify the IP address and port number of the IPC.
Run Vision Component
You needs to manually specify the parameter values of the Run Vision component. For detailed instructions, see Modify Component Parameters.
Program Description
Pick (pick_sequence)
The path the robot takes during the picking process: A point that is far away from the object → A point that is close to the object → Pick point → A point that is away from the object → A point that is far away from the object.
The grasp_object node cannot be executed directly. You can modify the parameter values here to control the tool to grasp.
At the same time, you can define the distance between the point that is close to the object and the pick point in the config node.

Place (place_sequence)
The release_object node cannot be executed directly. You can modify the parameter values here to control the tool to release.

Main Program (mm_v201_vision_pick_and_place)
-
First, set up the communication between the robot and the vision system by using mm_v201_init1. You can modify the IP address and port number of the IPC in mm_v201_init1.
-
After the communication is set up, you can move the robot to the image-capturing position by using detection_sequence.
-
Run the Mech-Vision project and set the parameter recipe by using mm_v201_runvis1.
-
Obtain the vision result exported by Mech-Vision by using mm_v201_recvvis1. mm_v201_recvvis1 has four exception output ports. You can modify port settings based on your actual needs. For example, if no point cloud is available and you want to rerun the Mech-Vision project, you can connect EMPTY_ROI and mm_v201_runvis1.
The vision result received from Mech-Vision is stored in the global variable g_mm_socket_recv_array as strings.
-
The program will process data in g_mm_socket_recv_array to determine whether all vision points are received. If not fully received, the program will jump to mm_v201_recvvis1 for execution. After it finishes, the vision point pose data will be saved to the global variable g_mm_total_point.
-
Finally, the robot moves according to the vision point pose data obtained from Mech-Vision to complete the grasping and placement.