Difference between revisions of "Locator Tutorial: Setting up Locator to work with SIASUN robots"
Line 229: | Line 229: | ||
''NOTE #1: SIASUN appends \0 sign automatically at the end of each string message. '' | ''NOTE #1: SIASUN appends \0 sign automatically at the end of each string message. '' | ||
− | ''NOTE #2: | + | ''NOTE #2: Floating point values are represented by 8 bytes as Double. '' |
''NOTE #3: It is not possible to read single integer or float value therefore result ID is not being send in Multiple Mode.'' | ''NOTE #3: It is not possible to read single integer or float value therefore result ID is not being send in Multiple Mode.'' |
Revision as of 16:45, 29 November 2018
It is highly recommended that users read Locator Tutorial: Introduction prior to installation of specific robot interface
Contents
1. Prerequisities
Locator SIASUN Interface was developed using following system version: UI: 2.0.5, Robot: 1.0.5
Compatibility with other system versions is not guaranteed. You can find info about your system version at About Tab:
If your pendant is still in Chinese, select Settings tab and switch language to English at the bottom of the page:
2. SIASUN Controller Setup
The following tutorial gives a step by step guide of how to configure your SIASUN robot controller, install all the necessary files and amend the robotic program to get the Locator up and running.
2.1 Network Configuration
The Locator SIASUN Module utilizes TCP/IP communication for transferring data between SIASUN Robot Controller and Vision Controller.
As a first step in commissioning, ensure that the IP address of the SIASUN controller meets your network configuration requirements
Browse to Setting -> IP Address:
Select Static option and configure network settings of robot controller:
Confirm the new network configuration by clicking on YES button:
The new network configuration is applied immediately, reboot is not necessary.
3. Photoneo SIASUN Module Setup
Photoneo SIASUN Locator Module is available in two variants:
- - Single Result Mode - only one localization result will be requested [Locator_Single_Result.spf]
- - Multiple Result Mode - user decides how many localization results within allowed range <1-12> will be requested [Locator_Multiple_Result.spf]
It is recommended to import both .spf files to the robot controller and use more appropriate version accordingly.
Insert USB Stick containing Locator files to the one of USB slots on the robot controller.
Select Program Tab -> Import -> Single/Multiple_Result_Mode and confirm by clicking the Import Button:
Successful import is confirmed by pop-up window:
4. Calibration
Robot Camera Calibration is a crucial step in Locator configuration. Accurate calibration guarantees that the object positions will be calculated directly in Robot Base coordinates.
4.1 Robot - Camera Calibration
Mount the Scanner firmly, ensure that the scene is properly captured from the final position and start the Photoneo Robot Camera Calibrator:
Ensure that ToolTCP Setting is set to zeros:
Connect to the Scanner, select XYZ_Extrinsic formalism (Standard for SIASUN robots), adjust the Sphere radius (20 mm in case of standard ping pong ball) and set the Min visible parameter to 40%:
Attach a ping-pong ball to the gripper, and jog the robot to the first position (usually the nearest corner of the bin/ area of interest).
Press the Capture button on the first line of the list of points in order to capture the ball position.
On the SIASUN Pendant select Status -> Joints to obtain the current tool position:
Input the X,Y,Z and A,B,C values of the current position to the first line of the point list and repeat the same procedure for at least 5 more points.
Recommended procedure is to cover all four corners of the scanning volume/bin + two positions in the center of the scanning volume.
Change the orientation of the tool in all axes to achieve a wider range of input values. Press the Compute button after adding the final point.
For successful calibration the Final Error per point should not exceed 2-3 mm. (0.565 mm in this example).
If the Final Error value is too high, try adding more points or start the calibration from the beginning again.
Once you are satisfied with the results, press the Set Matrix to PhoXi button to store the results to the PhoXi Scanner.
Do not forget to switch the Coordinate Space in PhoXi Control after calibration has been completed successfully:
In addition to the Robot - Camera transformation matrix, the calibration process also calculates a Calibration Sphere Misplacement vector.
This vector denotes the transformation between the selected Zero Tool and the center of the sphere (the ping-pong ball). This information can be used for calibration verification.
Ensure that the ping-pong ball has not moved since the end of calibration. Select Setting -> ToolTCPSetting, insert values from Misplacement Vector here and click on Set button to apply new settings.
Jog the robot to the center of the scanning volume and select the Test button in the Photoneo Robot Camera Calibration Tool:
Compare the position of the ball calculated in Robot Transformation Coordinate Space with the position reported by the robot:
The values calculated by the Photoneo Robot Camera Calibration Tool should approximately match the values reported by the SIASUN Pendant as shown in the figures above.
5. Runtime
5.1 Reteach Positions in the program
Once the Robot-Camera and Tool calibration have been completed, you can proceed to re-teaching the application poses. Prior to starting this process, please ensure that you have selected and configured/calibrated the Tool Frame.
Open Single/Multiple Result Mode program and go over the code. Adapt all movej and movel positions except those which are executing motion to the targets poses received from the locator.
Highlight the motion execution line, jog robot to the new position and Click Set Node Position button:
Jog the robot to the desired position and confirm by clicking on Save Position button:
5.2 Run Locator
You are now ready to run the program. Switch to AUTO mode and select 10% speed; this option is recommended for safety reasons.
Switch to the Run tab and select Locator_Single/Multiple_Result mode from the list
Robot needs to be in a Start Pose before launching program, hold Press to Move button until Start position is reached.
Ensure that you are ready to stop the motion execution immediately using Emergency Button if something goes wrong. Click Play button again to start the Locator program
If everything has been configured and calibrated properly, the robot should trigger a first scan, wait for the result, process data and move towards the first localized object.
6. SIASUN
6.1 SPF file
The following code is the Locator_Single_Result.spf source file. Siasun Robot requests one result and execute motion towards the returned targets. Attached object will be then placed in predefined position.
Users can adapt this code to meet their application requirements, change the speed, precision or order of steps in the main loop if needed.
6.2 Communication Protocol
The following illustrations explain the Locator - SIASUN communication protocol in both Single and Multiple Result Modes.
NOTE #1: SIASUN appends \0 sign automatically at the end of each string message.
NOTE #2: Floating point values are represented by 8 bytes as Double.
NOTE #3: It is not possible to read single integer or float value therefore result ID is not being send in Multiple Mode.