You're reading the documentation for a development version. For the latest released version, please have a look at master.

Virtual Testing

Virtual testing is essential before testing the project workspace in real robot. This step could help to ensure Vision does not send the wrong (dangerous) poses to robot. It is to verified the workspace correctness as well as to ensure the safety of users and hardware. The following virtual robots are good for virtual testing:

Hercules

Hercules is effective for functionality testing of the workspace. Hercules is easy to use, faster responsive for communication between Vision and Hercules.

../../_images/hercules.png

Connection

First of all, we need to connect Vision and Hercules.

On Vision side, open Platform Configuration , choose Robot option. Following the image below, select Other as Robot type, then click + .

../../_images/vis_her.png

Then, you should see the config page like below:

../../_images/vis_other.png

Port number can be modified to any number, this would be useful when connecting multiple robots. You can leave it as 6969 when only connecting to 1 robot.

Select the option Use String for Hercules, since Hercules is sending a String to Vision to simulate the real robot communication.

../../_images/her_vis.png

On Hercules side, select TCP Client , make sure the Module IP and Port is correct: 127.0.0.1 represents self, the current pc which the same as Hercules; Port is defined from Vision side, connecting with correct Port number. Then click Connect .

The red box is the messages templates which would be sent to Vision while connection is established.

Communication

Communications require requests and responses. Vision is the communication Server and Hercules is Client in this communication. Hence, Vision would always wait for a Robot Read before Robot Write , without requests from client, server would not send anything to client side.

../../_images/flow1.png

These 2 nodes are the main communication nodes between Vision and Hercules. Robot Read would always wait for requests from Hercules, without any requests, the flowchart would be waiting at Robot Read until requests come in. You also able to set a Time Out for this node, it could be helpful when there is connection issue between Vision and Hercules.

../../_images/her_sent.png

Hercules sends a string to Vision . Console would shows the details of this request. The fifth index of this message is the command of this request. Different command has different meanings to Vision , it tells Vision what kind of operations robot is working on, as well as the status of previous response. The next indexes after command is playload_1 and payload_2 .

../../_images/console_her.png

Vision would response to Hercules with Robot Write .

../../_images/vis_write_to_her.png

The setting details are below:

  1. Status is important, it is the response command to robot, which tells robot what is the next operation.

2. Pose Object is the pose which robot should perform. During Picking process, Vision would combine the object coordinates and picking pose in to this object, sending it to robot in order to perform picking. If we want the robot holds still, only transmitting command and payloads: we could send back the pose which is read from Robot Read , the robot will stays still.

  1. Processing time is the payload_1 for robot, Geometry type is payload_2 .

  2. This is optional if you want to print message on the console window, put down the message here.

../../_images/message.png

VMware UR Robot

Using virtual machine to simulate UR robot with Vision is another way to test the workspace virtually. This test can be able to run the workspace closer to real world condition, which is essential before delivering.

../../_images/vm.png

VMware is free to download online, we use VMware Workstation 16 player in this document. Download and install it. It might require to change the BIOS setting in order to have it working.

DaoAI UR Simulation Pack

../../_images/vm_desktop.png

After setup should looks like this.

In our example, we use UR5 robot to perform the testing, for details of operation UR: UR-Robot

../../_images/ur_ui.png

Click on Program Robot , you can run the robot simulation as well as change the program for different purpose. Then Load Program .

We can see there are many different urp files in this directory. We can use:

  1. Manual_Calibration.urp for cheese board manual calibration;

../../_images/cali.png

In real world robot, you need to setup all the waypoints for calibration.

  1. Picking.urp to perform picking test;

../../_images/picking1.png

In the real world robot, you should change this detection_pose: this is the robot pose when Vision is performing detection process. This pose should be away from the camera(At lease not blocking the object in camera), so that camera is able to capture the scene cloud to detect the objects in scene.

  1. send_pose.urp to perform pose define.

../../_images/send_pose.png

In real world robot, we need to change this waypoint to a correct picking pose for the object. However, in virtual robot test, this is not require.

Note: We will use Picking.urp as sample for the following demo.

Connection

Connecting with VMware robot is similar with Hercules in Vision .

On Vision side, open Platform Configuration , choose Robot option. Following the image below, select UR as Robot type, then click + .

../../_images/vis_connect_vm.png

Then, you should see the config page like below:

../../_images/vis_ur.png

Click Connect to connect Virtual UR robot to Vision , Clear Buffer can clear the existing buffer for Vision and Virtual UR robot.

Port number can be modified to any number, this would be useful when connecting multiple robots. You can leave it as 6969 when only connecting to 1 robot.

On UR side, click on Setup Robot then select Network .

../../_images/ur_main.png ../../_images/ur_setupnetwork.png ../../_images/ur_network.png

Network setting should be DHCP and use the above IPs. This will connect to Vision .

Then loading the urp file for Calibration, Send pose or Picking. In this example, we loaded Picking.urp:

../../_images/ur_ip.png

Inside of the urp file, we can see there is a field daoai_ip , select this field and click on the Expression .

../../_images/ip_express.png

Change the IP to corresponding IP address. You can check the IP address in cmd then enter ipconfig to check IP address on the PC.

../../_images/ur_ip_change.png

Communication

Communications require requests and responses. Vision is the communication Server and Virtual VM robot is Client in this communication. Hence, Vision would always wait for a Robot Read before Robot Write , without requests from client, server would not send anything to client side.

../../_images/flow1.png

In this Picking.urp we have all the robot loop through the picking process and keeps receiving the pose from Vision as long as there are pickable poses.

../../_images/ur_loop.png

We click on the Run button on UR and Run on Vision , they will keep communicating and send/receive as long as the robot script matches the communications(Robot Read and Robot Write ) on Vision .