mm_viz_pick_and_place

This program triggers Mech-Viz to start and guides the robot to complete a simple pick-and-place task. It is applicable to scenarios where one vision result guides the picking for one or multiple times.

Load the Program

  1. Open TMflow and click Project to open the window.

  2. Click the icon_import icon in the upper left corner, and select mm_viz_pick_and_place in the pop-up window, and then click OK.

    ../../../../../_images/mm_viz_pick_and_place1.png

Configurations

Point Configuration

You can set the points in Point Manager.

vizPose is the point calculated according to Mech-Viz’s planned path.

Dropoff is the point taught by the user, where the robot places the object.

Parameter Configuration

MM init component

The network setting in the program is defined by MM init. You can configure the IP address, i.e., the IP address of the IPC, in this component.

Please refer to Configure the IP Address of the IPC to modify the IP address of MM init.

Run Viz component

You will need to manually configure the parameter that triggers Mech-Viz to start. Please click the icon4 icon in the upper left corner of the Run Viz component to configure.

For detailed instructions on parameter configuration, please refer to Start Mech-Viz Project (Run Viz).

Program Description

Movement Program

Place (place_sequence)

The release_object node cannot be executed directly. You should modify the parameters of it to control the gripper to open.

../../../../../_images/place_sequence1.png

Main Program

First, the MM init component is added after the Start node to establish communication. You can modify the IP address in the MM init component. Please make sure that the robot and IPC are in the same subnet.

../../../../../_images/mm_viz_pick_and_place2.png

Then, the Run Viz component is added to start Mech-Viz. You can configure parameters to trigger Mech-Viz to start, switch the branch, and set the Current Index.

Next, the Receive Viz component is added to obtain the planned path from Mech-Viz. The results returned from Mech-Viz will be stored in the global variable g_mm_socket_recv_array as strings.

../../../../../_images/mm_viz_pick_and_place3.png

The results received from Mech-Viz will be used to assign values to vizPose. The program will determine whether the result received from Mech-Viz is a “Vision Move” Step. If it is a “Vision Move” Step, the robot will move to the waypoint in the line motion mode; if it is not, the robot will move to the waypoint in the Point to Point motion type, and then starts to pick the object.

Similarly, the grasp_object node cannot be executed directly. You should modify the parameters of it to control the gripper to close.

Then the program determines whether all waypoints provided by Mech-Viz have been reached. If the robot has moved to all waypoints, it will be guided by place_sequence and start to place the object. In this example, you will need to set the Dropoff point in place_sequence and Mech-Viz does not need to export points for placing.

../../../../../_images/mm_viz_pick_and_place4.png