UR E-Series (Polyscope 5.3 or Above)

You are currently viewing the documentation for the latest version (2.1.2). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

This section introduces the process of setting up the Standard Interface communication with a Universal Robots (UR) e-series robot.

Plugin Installation and Setup

This section introduces the installation and setup of Mech-Mind 3D Vision Interface (URCap plugin) for UR e-series.

Prerequisites

Verify that you meet the minimum required versions for Mech-Mind vision-series software and Polyscope.

To view the version of Polyscope, press the hamburger menu in the upper-right corner of the UR teach pendant and select About.

settings e

Install the URCap plugin

To install the URCap plugin, follow these steps:

  1. Find the URCap plugin file with the extension “.urcap” in Communication Component\Robot_Interface\Robot_Plugin\UR_URCAP\Polyscope in the installation directory of Mech-Vision & Mech-Viz, and copy the file to the USB flash drive.

  2. Insert the USB drive into the UR teach pendant.

  3. Press the hamburger menu in the upper-right corner, and select Settings.

    settings e
  4. In the Settings window, select System  URCaps.

    system urcaps e
  5. Press + to navigate to the USB drive to locate the URCap plugin.

  6. In the Select URCap to install window, select the URCap plugin and press Open. The URCap plugin will be automatically installed.

  7. Press Restart for the change to take effect.

Till now, the URCap plugin is successfully installed on the UR teach pendant.

After installing the URCap plugin, you also need to set the IP address of the robot (select Setting > System > Network). Note that the robot’s IP address and the IPC’s IP address must be on the same subnet.

Use Mech-Mind 3D Vision Interface

Before use, make sure that your Mech-Vision and Mech-Viz (if used) projects are ready to run, and the Mech-Mind IPC is connected to the robot’s network.

To use Mech-Mind 3D Vision Interface, you need to complete the following setup.

  1. Open Mech-Vision, and you may enter different interfaces. Create a new solution according to the instructions below.

    • If you have entered the Welcome interface, click New blank solution.

    create solution 1
    • If you have entered the main interface, click File  New Solution on the menu bar.

    create solution 2
  2. Click Robot Communication Configuration on the toolbar of Mech-Vision.

  3. In the Robot Communication Configuration window, complete the following configurations.

    1. Click the Select robot drop-down menu, and select Listed robot. Click Select robot model, and select the robot model that you use. Then, click Next.

    2. In the Communication mode section, select Standard Interface for Interface service type, TCP Server for Protocol, and ASCII for the protocol format.

    3. In the Advanced Settings section, set Max num of poses to send per time to 15.

    4. Set the port number to 50000 (fix valued). Ensure that the port number is not occupied by another program.

    5. (Optional) Select Auto enable interface service when opening the solution.

    6. Click Apply.

tcp ascii urcap
  1. On the main interface of Mech-Vision, make sure that the Robot Communication Configuration switch on the toolbar is flipped and has turned blue.

    interface service

After the TCP server interface has been started in Mech-Vision, you can connect to it on the UR teach pendant.

  1. On the UR teach pendant, press Installation on the top bar, and then select URCaps  Network Settings. The Network Settings window of the URCap plugin is displayed.

    network settings e
  2. Set Mech-Mind IPC IP Address and Port No. to the IP address and port number of the Mech-Mind IPC respectively (the set port number should be consistent with the port number set in the robot communication configuration in Mech-Vision). Then, press Apply.

  3. Press Connection Test.

    • When the connection to the TCP server interface is established successfully, the return status should look like this:

      connection pass
    • When the connection to the TCP server interface fails to be established, the return status should be like this:

      connection failed

    The connection test is just for testing. Once connected, it will disconnect automatically. Therefore, you will see client online and offline logs on the Console tab of Mech-Vision Log panel.

Hand-Eye Calibration Using the Plugin

After you set up Standard Interface communication, you can connect the robot to perform automatic calibration. The overall workflow of automatic calibration is shown in the figure below.

calibration process

Special note

During the calibration procedure, when you reach the Connect the robot step and the Waiting for robot to connect... button appears in Mech-Vision, perform the steps below on the robot side. After you perform the steps, proceed with the remaining steps in Mech-Vision.

Create a Calibration Program

  1. On the top bar of the UR teach pendant, press New and select Program to create a new program.

  2. Press Program on the top bar, and then select URCaps  Mech-Mind Calibrate. An example program node Calibrate is automatically created under the Robot Program on the left panel.

    add calibrate node e

    The created example program node is just a template. You need to further configure the calibration program and teach the calibration start point.

Teach Calibration Start Point

  1. Double-click the Calibrate node. In the Command tab on the right panel, Set Type of point received from Mech-Vision based on actual needs.

    add calibrate node e
  2. Select the MoveJ node, set the move type (MoveJ, MoveL, or MoveP), and configure Set TCP to Ignore Active TCP on the right Move panel to ensure that the waypoint will be recorded as a flange pose.

    set movej e
  3. Manually control the robot to move to the start point for the calibration.

    You can use the position of the robot in the Check the Point Cloud Quality of the Calibration Board step as the calibration start point.

  4. Go back to the UR teach pendant and select the start_pose node. Press Set Waypoint on the right Waypoint panel. You will be switched to the Move tab.

    teach startpoint e
  5. On the Move tab, confirm that the robot’s current flange pose is proper and press OK.

    confirm waypoint e

Run Calibration Program

  1. Select the Robot Program on the left panel, and clear the Program Loops Forever checkbox on the right Program panel to ensure that the program is run just once.

    run calibrate e
  2. On the bottom bar, lower the robot speed to a proper value, such as 10%, for safety concerns.

  3. Press run e on the bottom bar to run the program.

  4. When, in the Calibration window in Mech-Vision, the current status changes to connected and the button Waiting for the robot to connect... changes to Disconnect robot, click Next at the bottom.

    start calilbration1
  5. Perform Step 4 of Start calibration (which is Set motion path) and the subsequent operations based the following links.

    • If the camera mounting mode is eye to hand, see this document and proceed with the relevant operations.

    • If the camera mounting mode is eye in hand, see this document and proceed with the relevant operations.

To save the calibration program for future use, select Save  Save Program As… on the top bar to save it.

save program e

After you complete the hand-eye calibration, you can create pick and place programs to instruct UR robots to execute vision-guided pick and place tasks.

Create Pick and Place programs

The URCap plugin provides an example Pick and Place program node for you to create pick and place programs with minimal programming efforts.

This Pick and Place program node provides three options:

  • The following examples assume that the actually used gripper and its TCP have been set for the robot properly.

  • Before using the program, please modify the program according to the actual scenario.

Create a Pick and Place with Mech-Vision (picking points) Program

To create a Pick and Place program with Mech-Vision (picking points), follow these steps:

  1. Enable the With Vision (picking points) option.

    1. On the top bar of the UR teach pendant, press New and select Program to create a new program.

    2. Press Program on the top bar, and then select URCaps  Mech-Mind Pick and Place. An example program node Pick and Place is automatically created under the Robot Program on the left panel.

      add pick place node e
    3. On the Command tab of the right panel, press the With Vision (picking points) button. A program template is automatically created under the Pick and Place node in the program tree.

      select with vision option e
  2. Select the Mech-Mind Connect node, and verify that the Host IP setting is the IP address of the Mech-Mind IPC on the right Mech-Mind Connect panel.

    verify host ip vision e
  3. Set the image-capturing pose.

    1. Manually move the robot to a proper location where Mech-Vision triggers the camera to capture an image.

      • For Eye-In-Hand scenario, the robot should be placed above the workpiece.

      • For Eye-To-Hand scenario, the robot should not block the camera view.

    2. Go back to the UR teach pendant and select the MoveJ node in the program tree. On the right Move panel, set the move type (MoveJ, MoveL, or MoveP), and configure Set TCP to Use Active TCP.

      set movej capture e
    3. Select the Capture_image node in the program tree, and press Set Waypoint on the right Waypoint panel. You will be switched to the Move tab.

      set waypoint capture e
    4. On the Move tab, confirm that the robot’s current TCP is proper and press OK.

    confirm waypoint e
  4. Trigger the Mech-Vision project to run.

    1. Select the Trigger Mech-Vision node in the program tree, set the parameters Type of robot pose to send, Mech-Vision Project ID, and Num of expected poses on the right Trigger Mech-VisionMech-Vision panel.

      trigger vision e
      Parameter Description

      Type of robot pose to send

      Specify the type of robot pose to be sent to the Mech-Vision project. In this example, select Current position.

      • Current position: Send the robot’s current joint positions and flange pose to the Mech-Vision project. This setting should be used when the camera is mounted in eye in hand mode.

      • Predefined JPs: Send the custom joint positions to the Mech-Vision project. These joint positions will be sent to the “Path Planning” Step in the Mech-Vision project as the start point, where the robot will move from this start point to the first waypoint of the planned path. This setting should be used when the camera is mounted in eye to hand mode, the project includes a "Path Planning" Step, and pre-capture is required.

      Mech-Vision project ID

      The index of the Mech-Vision project to trigger. You can find the project ID in the Project List panel of Mech-Vision.

      Num of expected poses

      The number of poses expected to be output by Mech-Vision.

      • If set to 0, Mech-Vision will return all recognized poses.

      • If set to an integer between 1 and 20, Mech-Vision will return the specified number of poses when the total number of recognized poses exceeds the expected value. If the total number of recognized poses is less than the expected value, Mech-Vision will return all recognized poses.

    2. (Optional) Press Set the Recipe ID and a Set Recipe ID node are added under the Trigger Mech-Vision node in the program tree.

      Select the Set Recipe ID node, and set the values for the Project Parameter Recipe ID on the right Set Recipe ID panel. The value of the Mech-Vision Project ID parameter must be consistent with the value set in the previous node.

      set receipe id e
  5. Set how to receive Mech-Vision result.

    In the program tree, select the Receive Mech-Vision Result node, set the Result type and Return pose type, and then set the name of the variables for saving returned data.

    Since the function of this example is to obtain picking points from Mech-Vision, the Result type can only be set to Basic or Custom, and cannot be set to Planned path.
    receive vision result e
    • When the Result type is set to Basic, the Return pose type can only be set to Pose, it indicates that the received pose type is the TCP. Explanations for other parameters are shown in the table below.

      Parameter Description

      Pose

      The pose here refers to the robot’s TCP. The poses output by Mech-Vision (i.e., the data from the poses port of the “Output” Step) will be automatically converted by the vision system into the corresponding robot’s TCP. The robot with the active TCP can move directly to the pose obtained here. By default, the poses are saved in the array variable pose[], with the array starting index as 1.

      Label

      The label corresponds to each pose. Its value is an integer. By default, labels are saved in the array variable label[], with the array starting index as 1.

      Total Received

      The number of poses received from Mech-Vision. By default, saved in the variable total_recv.

      Status code

      The status code returned by Mech-Vision. Codes starting with 11xx indicate normal status, while codes starting with 10xx indicate errors. For detailed information, refer to the Status Codes and Troubleshooting. By default, the status code is saved in the variable status_code.

      Last Data

      Indicates whether all recognized poses have been received from Mech-Vision. The value is either 0 or 1, where 0 means not all poses are received, and 1 means all poses are received. By default, this information is saved in the variable last_data.

    • When the Result type is set to Custom, the Return pose type can only be set to Pose, it indicates that the received pose type is the TCP. Explanations for other parameters are shown in the table below. Additionally, you must set Port Type of the Output Step to Custom and select the poses port in the Predefined Keys section in Mech-Vision.

      Parameter Description

      Pose

      The pose here refers to the robot’s TCP. The poses output by Mech-Vision (i.e., the data from the poses port of the “Output” Step) will be automatically converted by the vision system into the corresponding robot’s TCP. The robot with the active TCP can move directly to the pose obtained here. By default, the poses are saved in the array variable pose[], with the array starting index as 1.

      Label

      The label corresponds to each pose. Its value is an integer. By default, labels are saved in the array variable label[], with the array starting index as 1.

      Custom data

      The custom data associated with the pose. By default, custom data is saved in the array variable custom_data[], with the array starting index as 1.

      Total Received

      The number of poses received from Mech-Vision. By default, saved in the variable total_recv.

      Status code

      The status code returned by Mech-Vision. Codes starting with 11xx indicate normal status, while codes starting with 10xx indicate errors. For detailed information, refer to the Status Codes and Troubleshooting. By default, the status code is saved in the variable status_code.

      Last Data

      Indicates whether all recognized poses have been received from Mech-Vision. The value is either 0 or 1, where 0 means not all poses are received, and 1 means all poses are received. By default, this information is saved in the variable last_data.

  6. Set the first picking point.

    Select the pick_index:=…​*node, and set the *Expression value to 1 on the right panel.

    set pick index e
    The pick_index is used to assign a value to the pick variable. A value of 1 means the pose of the first received picking point will be assigned to the pick variable, a value of 2 means the pose of the second received picking point will be assigned to the pick variable, and so on. This setting is used to extend the example program with a loop to enable multiple picks from a single image.
  7. Set the pick task.

    A pick task consists of three motions: Pick_above (a linear move to the approach point for picking), Pick (a move to the picking point to pick the object), and Pick_depart (a linear move to depart after picking).

    1. Set the parameters Dist and Coordinates for the Pick_above and Pick_depart respectively on the right Mech-Mind Pick panel.

      set distance coordinates e
    2. Select the MoveJ node under the pick node, and keep the default settings on the right Move panel.

    3. Select the pick_above node, and keep the default settings on the right Waypoint panel.

    4. Select the MoveL node, and keep the default settings on the right Move panel.

    5. Select the pick node, and keep the default settings on the right Waypoint panel.

    6. Add gripper control logic for picking after the pick node according to your actual conditions.

    7. Select the MoveJ node, and keep the default settings on the right Move panel.

    8. Select the pick_depart node, and keep the default settings on the right Waypoint panel.

  8. Set the place task.

    1. Select the MoveJ node under the place node, and keep the default settings on the right Move panel.

    2. Manually move the robot to the proper location to place the picked object.

    3. Go back to the teach pendant, select the place node under the MoveJ node, and press Set Waypoint on the right Waypoint panel. You will be switched to the Move tab.

      set waypoint place e
    4. On the Move tab, confirm that the robot’s current flange pose is proper and press OK.

      confirm waypoint e
    5. Once the place pose is set, add gripper control logic for placing after the place node in the program tree according to your actual conditions.

Till now, a simple pick-and-place program with Mech-Vision (picking points) has been completed. You can run it by pressing run e on the bottom bar.

Create a Pick and Place with Mech-Vision (picking path) Program

To create a Pick and Place program with Mech-Vision (picking path), follow these steps:

  1. Enable the With Vision (picking path) option.

    1. On the top bar of the UR teach pendant, press New and select Program to create a new program.

    2. Press Program on the top bar, and then select URCaps  Mech-Mind Pick and Place. An example program node Pick and Place is automatically created under the Robot Program on the left panel.

      add pick place node e
    3. On the Command tab of the right panel, press the With Vision (picking path) button. A program template is automatically created under the Pick and Place node in the program tree.

      select with vision path option e
  2. Set the value of Host IP to the IP address of the Mech-Mind IPC by referring to step 2 in Pick and Place with Mech-Vision (picking points).

  3. Set the image-capturing pose by referring to step 3 in Pick and Place with Mech-Vision (picking points).

  4. See how to trigger the Mech-Vision project to run by referring to step 4 in Pick and Place with Mech-Vision (picking points).

  5. Set how to receive Mech-Vision result.

    Select the Receive Mech-Vision Result node, set the Result type and Return pose type, and then set the name of the variables for saving returned data.

    Since the function of this example is to obtain the planned path from Mech-Vision, the Result type here can only be set to Planned path.
    receive vision path result e
    • When the Result type is set to Planned path, and the Return pose type is set to Pose, it indicates that the received pose type is the TCP. Explanations for other parameters are shown in the table below.

      Parameter Description

      Pose

      The pose here refers to the robot’s TCP. By default, the poses are saved in the array variable pose[], with the array starting index as 1.

      Label

      The label corresponds to each pose. Its value is an integer. By default, labels are saved in the array variable label[], with the array starting index as 1.

      TCP

      The tool ID corresponds to the sent pose. ts value is an integer. By default, tool IDs are saved in the array variable label[], with the array starting index as 1.

      Total Received

      The number of poses received from Mech-Vision. By default, saved in the variable total_recv.

      Status code

      The status code returned by Mech-Vision. Codes starting with 11xx indicate normal status, while codes starting with 10xx indicate errors. For detailed information, refer to the Status Codes and Troubleshooting. By default, the status code is saved in the variable status_code.

      Picking point index

      Indicates the position of the Vision Move waypoint corresponding to the “Vision Move” Step of the path planning tool in the entire path. If the path does not contain a “Vision Move” waypoint, the value of this parameter is 0. By default, the vision point index is saved in the variable vision_point.

      For example, if the planned path consists of the following waypoints: "Fixed-Point Move 1", "Fixed-Point Move_2", "Vision Move", "Fixed-Point Move_3", the position of the Vision Move waypoint is 3.

      Last Data

      Indicates whether all planned path poses have been received from Mech-Vision. The value is either 0 or 1, where 0 means not all poses are received, and 1 means all poses are received. By default, this information is saved in the variable last_data.

    • When the Result type is set to Planned path, and the Return pose type is set to Jps, it indicates that the received pose type is the joint position. The explanations for label, toolID, and other parameters are as shown in the table above. By default, the joint position data is saved in the jps[] array variable. Please do not use the jps[] array variable directly; users must extract the array variable before using the joint positions within it. For this example, users can extract the joint positions by following the steps below.

      • Select the Receive Mech-Vision Result node and select Jps for the Return pose type.

      • Select the target:=pose[j] node, then select URCaps  MM Extract JPs, and the Extract Jps node will appear.

        get vis jps 1
      • Select the Extract Jps node, check Variable Input, select j as the Extracted index number, and finally enter target in the Save to variable name field.

        get vis jps 2
      • Select the target:=pose[j] node, and then tap Delete in the toolbar below to remove the node.

        get vis jps 3
  6. Configure the motion loop, which drives the robot to follow the path planned by the “Path Planning” Step, that is, approach the object, pick the object, and depart from the pick point (not including placing the object). For how to set MoveL and MoveJ nodes, refer to step 7 in Pick and Place with Mech-Vision (picking points).

    • In actual applications, the motion loop may contain several pick_above MoveJ nodes, a pick MoveL node, and several pick_depart MoveJ nodes.

    • If you change the default variable names of poses, labels, etc. in the node of Receive Mech-Vision Result, you need to change the variables used in this step.

  7. Set the place task by referring to step 8 in Pick and Place with Mech-Vision (picking points).

Till now, a simple pick-and-place program with Mech-Vision (picking path) has been completed. You can run it by pressing run e on the bottom bar.

Create a Pick and Place with Mech-Viz Program

To create a Pick and Place program with Mech-Viz, follow these steps:

  1. Enable the With Mech-Viz option.

    1. On the top bar of the UR teach pendant, press New and select Program to create a new program.

    2. Press Program on the top bar, and then select URCaps  Mech-Mind Pick and Place. An example program node Pick and Place is automatically created under the Robot Program on the left panel.

      add pick place node e
    3. On the Command tab of the right panel, press the With Mech-Viz button. A program template is automatically created under the Pick and Place node in the program tree.

      select with viz option e
  2. Select the Mech-Mind Connect node, and verify that the Host IP setting is the IP address of the Mech-Mind IPC on the right Mech-Mind Connect panel.

    verify host ip viz e
  3. Set the image-capturing pose by referring to step 3 in Pick and Place with Mech-Vision (picking points).

  4. Trigger the Mech-Viz project to run.

    1. Select the Trigger Mech-Viz node, set the Type of robot pose to send parameter on the right Trigger Mech-Viz panel. The specific parameter values are explained in the table below.

      trigger viz e
      Parameter Description

      Type of robot pose to send

      Specify the type of robot pose to be sent to the Mech-Viz project.

      • Current Position: Send the robot’s current joint positions and flange pose to the Mech-Viz project. This setting should be used when the camera is mounted in eye in hand mode.

      • Predefined JPs: Send the custom joint positions to the Mech-Viz project. This can be used to trigger the Mech-Viz project to plan the next round of paths in advance when the robot is outside the image-capturing area. This parameter should be used when the camera is mounted in Eye-To-Hand mode and a pre-capture image is required.

      • If the Mech-Viz project contains a “Branch by Msg” Step, press Set branch exit port, and proceed to Step b to set the branch exit port.

      • If the Mech-Viz project contains an index-related Step, press Set Index Value, and proceed to Step c to set the index value.

    2. (Optional) Select the Set Branch Value node, set Branch Step ID and Exit port number on the right panel.

      set brach value e
    3. (Optional) Select the Set Index Value node, set Move Step ID and Index value on the right panel.

      set index value e
  5. Set how to receive Mech-Viz result.

    Select the Receive Mech-Viz Result node, set the variables for saving the Mech-Viz result.

    receive viz result e
    • When the Return pose type is set to Pose, it indicates that the received pose type is the TCP. Explanations for other parameters are shown in the table below.

      Parameter Description

      Pose

      The pose here refers to the robot’s TCP. By default, the poses are saved in the array variable pose[], with the array starting index as 1.

      Label

      The label corresponds to each pose. Its value is an integer. By default, labels are saved in the array variable label[], with the array starting index as 1.

      TCP

      The tool ID corresponds to the sent pose. ts value is an integer. By default, tool IDs are saved in the array variable label[], with the array starting index as 1.

      Total Received

      The number of poses received from Mech-Viz. By default, saved in the variable total_recv.

      Status code

      The status code returned by Mech-Vision. Codes starting with 21xx indicate normal status, while codes starting with 20xx indicate errors. For detailed information, refer to the Status Codes and Troubleshooting. By default, the status code is saved in the variable status_code.

      Picking point index

      Indicates the position of the Vision Move waypoint (i.e., the waypoint corresponding to the “Vision Move” Step in the project) in the planned path. If the path does not contain a “Vision Move” waypoint, the value of this parameter is 0. By default, the vision point index is saved in the variable vision_point.

      For example, if the planned path consists of the following waypoints: "Fixed-Point Move 1", "Fixed-Point Move_2", "Vision Move", "Fixed-Point Move_3", the position of the Vision Move waypoint is 3.

      Last Data

      Indicates whether all planned path poses have been received from Mech-Viz. The value is either 0 or 1, where 0 means not all poses are received, and 1 means all poses are received. By default, this information is saved in the variable last_data.

    • When the Return pose type is set to Jps, it indicates that the received pose type is the JPs. The explanations for label, toolID, and other parameters are as shown in the table above. By default, the joint position data is saved in the jps[] array variable. Please do not use the jps[] array variable directly; users must extract the array variable before using the joint positions within it. For this example, users can extract the joint positions by following the steps below.

      • Select the Receive Mech-Viz Result node and select Jps for the Return pose type.

      • Select the target:=pose[j] node, then select URCaps  MM Extract JPs, and the Extract Jps node will appear.

        get viz jps 1
      • Select the Extract Jps node, check Variable Input, select j as the Extracted index number, and finally enter target in the Save to variable name field.

        get viz jps 2
      • Select the target:=pose[j] node, and then tap Delete in the toolbar below to remove the node.

        get viz jps 3
  6. Configure the motion loop, which drives the robot to follow the path planned by Mech-Viz, that is, approach the object, pick the object, and depart from the pick point (not including placing the object). For how to set MoveL and MoveJ nodes, refer to step 7 in Pick and Place with Mech-Vision (picking points).

    • In actual applications, the motion loop may contain several pick_above MoveJ nodes, a pick MoveL node, and several pick_depart MoveJ nodes.

    • If you change the default variable names of poses, labels, etc. in the node of Receive Mech-Viz Result, you need to change the variables used in this step.

  7. Set the place task by referring to step 8 in Pick and Place with Mech-Vision (picking points).

Till now, a simple pick-and-place program with Mech-Viz has been completed. You can run it by pressing run e on the bottom bar.

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.