Difference between revisions of "Locator Tutorial: Setting up Locator to work with ABB robots"

From 3D scanning Knowledge base - Photoneo wiki
Jump to: navigation, search
m
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
'''Users are strongly recommended to read [http://wiki.photoneo.com/index.php/Locator_Tutorial:_Introduction Locator Tutorial: Introduction] prior to installation of specific robot intere'''
 +
 
== 1. Prerequisities ==
 
== 1. Prerequisities ==
  
Locator ABB Interface is compatible with '''RobotWareOS versions 5.13 and higher'''.  
+
Locator ABB Interface is compatible with '''RobotWareOS versions 6.04 and higher'''.
  
 
System options required for Locator ABB Interface: '''(616-6) PC Interface Module'''
 
System options required for Locator ABB Interface: '''(616-6) PC Interface Module'''
  
 +
''NOTE: Running Locator ABB Interface on RobotWare 5 systems is also possible with certain limitations. Contact support for more information''
  
[[File: Locator prerequisities.png]]
 
  
 +
[[File: Locator ABB Setting Up Guide Prerequisities.png]]
  
''NOTE: Use of '''Robot Studio v.6.06''' or higher is highly recommended for Locator ABB Interface setup.''
+
 
 +
''NOTE: '''Robot Studio v.6.06''' or higher is highly recommended for use with Locator ABB Interface setup.''
  
 
== 2. ABB Controller setup ==
 
== 2. ABB Controller setup ==
  
The following tutorial gives a step by step guide of how to configure your ABB IRC5 controller and install RAPID files to get the interface up and running.  
+
The following tutorial gives a step by step guide for configuring your ABB IRC5 controller and installing the necessary RAPID files to get the interface up and running.  
  
This tutorial was originally written using the latest '''RobotWare v.6.06''', however it should be compatible with older versions with minor changes.   
+
This tutorial was originally written using the latest version of '''RobotWare v.6.06''', however it should be compatible with older versions with minor changes.   
  
 
=== 2.1 Network configuration ===
 
=== 2.1 Network configuration ===
  
''NOTE: The network configuration procedure described below only works with RobotWareOS v.6 or higher. If you have an older version of RobotWareOS and need to change an IP address, please contact local ABB support.''  
+
''NOTE: The network configuration procedure described below only works with RobotWareOS v.6.06 or higher. If you have an older version of RobotWareOS and need to change an IP address, please contact local ABB support.''  
  
 
Turn on the IRC5 Controller, wait for the Initialization Screen to appear, open the '''Menu screen''' and select the '''Control Panel''' option:
 
Turn on the IRC5 Controller, wait for the Initialization Screen to appear, open the '''Menu screen''' and select the '''Control Panel''' option:
Line 45: Line 49:
  
  
Choose '''OK button''' and restart the Controller to apply the new settings:
+
Click '''OK''' and restart the Controller to apply the new settings:
  
  
Line 65: Line 69:
 
If everything is configured properly, Robot Studio should connect to the IRC5 controller and you should see the content of '''"Current Station"''' in the left pane.  
 
If everything is configured properly, Robot Studio should connect to the IRC5 controller and you should see the content of '''"Current Station"''' in the left pane.  
  
''NOTE: For the purpose of writing this tutorial, an ABB IRB1200 7kg was used.''
+
''NOTE: For the purposes of this tutorial, an ABB IRB1200 7kg robot was used.''
  
  
 
[[File: Locator ABB tutorial s3.png]]
 
[[File: Locator ABB tutorial s3.png]]
 +
  
 
=== 3.2 Load Locator ABB Module files ===
 
=== 3.2 Load Locator ABB Module files ===
  
Locator module for ABB consists of two RAPID files - '''LocatorBasicTemplate.mod''' and '''LocatorCommunication.sys''' .  
+
The Locator module for ABB consists of two RAPID files - '''LocatorBasicTemplate.mod''' and '''LocatorCommunication.sys''' .
 +
 
 +
Both files need to be uploaded to the controller. Request Write Access first and press Grant Button on Teach Pendant.
  
Both files needs to be uploaded to the controller. Right Click on '''T_ROB1''' task and select '''Load Module''' option. Browse to the '''LocatorBasicTemplate.mod''' and hit '''Open'''.
 
  
Repeat the same procedure with '''LocatorCommunication.sys file'''.  
+
[[File: ABB pendant grant access.png]]
 +
 
 +
 
 +
Now Right Click on the '''T_ROB1''' task and select the '''Load Module''' option. Browse to the '''LocatorBasicTemplate.mod''' and click '''Open'''.
 +
 
 +
Repeat the same procedure for the '''LocatorCommunication.sys file'''.  
  
 
You should see that both files have appeared in the T_ROB1 module list.  
 
You should see that both files have appeared in the T_ROB1 module list.  
Line 84: Line 95:
  
  
If '''Synchronize to Station''' dialog panel appears, just click '''Cancel''', we will synchronize later.
+
If the '''Synchronize to Station''' dialog panel appears, just click '''Cancel''', it will be synchronized later.
  
  
Line 90: Line 101:
  
  
In case you are working with a clean system and you do not plan to make use of default '''Module1''', feel free to delete it.  
+
If you are working with a clean system and you do not intend to make use of the default '''Module1''' option, feel free to delete it.  
  
  
Line 97: Line 108:
 
=== 3.3 Configure Main Entry ===
 
=== 3.3 Configure Main Entry ===
  
Now we need to set '''LocatorBasicTemplate''' to become the main robot program. On the left pane, select '''Controller''' -> '''Configuration''' -> '''Task'''   
+
Now we need to set '''LocatorBasicTemplate''' as the main robot program. On the left pane, select '''Configuration''' -> '''Controller''' -> '''Task'''   
  
  
Line 103: Line 114:
  
  
Double click on '''T_ROB1 task'''. Instance Editor dialog screen should appear.  
+
Double click on the '''T_ROB1 task'''.The Instance Editor dialog screen should now appear.  
  
Here change '''Main Entry''' to Locator main fucntion which is called '''locatorMain''' and Hit '''OK'''.  
+
Change the '''Main Entry''' tab option '''locatorMain''' and click '''OK'''.  
  
  
Line 111: Line 122:
  
  
Since this is a major change to the system, a restart is needed in order to take effect. Hit '''OK''' here, we will restart system later on.   
+
Since this is a major change to the system, a restart is needed in order for tha change to take effect. Select'''OK''' for now and we will restart system later.   
  
  
Line 118: Line 129:
 
=== 3.4 Adopt Network Configuration ===
 
=== 3.4 Adopt Network Configuration ===
  
Now click '''LocatorBasicTemplate''' in the left pane to open the '''RAPID code'''. Adopt first three constants to meet your application requirements and network configuration.  
+
Now click '''LocatorBasicTemplate''' in the left pane to open the '''RAPID code'''. Amend the first three constants according to your application requirements and network configuration.  
  
  
Line 124: Line 135:
  
  
Click '''Apply''' button when finished
+
Click '''Apply''' when finished
  
  
Line 130: Line 141:
  
  
Now it is the time to '''Restart''' the system. Use Restart button in Robot Studio or directly on the Pendant.  
+
It is now time to '''Restart''' the system. Use the Restart option in Robot Studio or use the option provided on the Pendant.  
  
  
 
[[File: Locator ABB tutorial s12.png]]
 
[[File: Locator ABB tutorial s12.png]]
  
=== 3.5 Reteach Start and End poses ===
 
  
After system reboot open the '''Production Window''' and hit '''PP to Main''' button.
+
== 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''':
 +
 
 +
 
 +
[[File: KUKA SettingUp Guide Scanner Calibration 10.png]]
 +
 
 +
 
 +
Connect to the Scanner, select '''Quaternion formalism''' (Standard for ABB robots), adjust the '''Sphere radius''' (20 mm in case of standard ping pong ball) and set the '''Min visible''' parameter to 40%:
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide Connect.png]]
 +
 
 +
 
 +
On the ABB Pendant select '''Main Menu''' -> '''Jogging'''. In '''Position Format''' window set following options :
 +
 
 +
Position shown in:  '''Base'''
 +
 
 +
Orientation format: '''Quaternion'''
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide Base.png]]
 +
 
 +
 
 +
Press '''OK''' and return back to the Jogging menu. Switch '''Motion Mode''' to '''Linear''' to visualize the current Cartesian pose of the Tool frame as shown in the figure below:
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide Jogging Base Frame.png]]
 +
 
 +
 
 +
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 and input the '''X,Y,Z''' and '''q1, q2, q3, q4''' values of the current position to the first line of the point list.
 +
 
 +
'''WARNING: In current implementation of Robot Camera Calibrator: Rotation 1 = q2  |  Rotation 2 = q3  |  Rotation 3 = q4  |  Rotation4 = q1'''
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide Convention.png]]
 +
 
 +
 
 +
Try to change the orientation of the tool in all axes in each point 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'''. (1.9897mm in this example).
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide Calculated.png]]
 +
 
 +
 
 +
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.
 +
 
 +
 
 +
[[File:Locator ABB Setting Up Guide Set.png]]
 +
 
 +
 
 +
Do not forget to switch the '''Coordinate Space''' in PhoXi Control after calibration has been completed successfully:
 +
 
 +
 
 +
[[File: KUKA SettingUp Guide Scanner Calibration 20.png]]
 +
 
 +
 
 +
In addition to the Robot - Camera transformation matrix, the calibration process also calculates a '''Calibration Sphere Misplacement vector''' which denotes the transformation between the selected Tool ('''Base''') and the center of the sphere (the ping-pong ball). This information can be used for calibration verification. Create a new tool for this purpose. Ensure that the ping-pong ball has not moved since the end of calibration.
 +
 
 +
On ABB Pendant go to '''Main Menu''' -> '''Program Data''' -> '''tooldata''' and select '''New'''
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide New.png]]
 +
 
 +
 
 +
Set '''Name''' to current_tool (or other) and select '''Initial Value''' at the bottom:
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide Initial Value.png]]
 +
 
 +
 
 +
Set '''tframe: trans X,Y,Z''' according to the misplacement vector calculated by Photoneo Robot Camera Calibrator and '''tload: mass''' from -1 to 1. Press '''OK''' to save newly created tool;
 +
 
 +
 
 +
[[File:Locator ABB Setting Up Guide new tool.png]]
 +
 
 +
 
 +
Jog the robot to the center of the scanning volume and select the '''Test''' button in the Photoneo Robot Camera Calibration Tool:
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide Test.png]]
 +
 
 +
 
 +
Compare the position of the ball calculated in Robot Transformation Coordinate Space with '''$pos_act values''':
 +
 
 +
 
 +
[[File: Locator ABB Setting Up Guide Current Tool.png]]
 +
 
 +
 
 +
The values calculated by the Photoneo Robot Camera Calibration Tool should approximately match the values reported by the ABB Pendant:
 +
 
 +
== 5. Runtime ==
 +
 
 +
=== 5.1 Reteach Start and End poses ===
 +
 
 +
Open the '''Production Window''' and click '''PP to Main'''.
  
  
Line 143: Line 257:
  
  
You should see the '''LocatorBasicTemplate''' being properly loaded with the '''Program Pointer''' set as shown in the figure below:  
+
You should see the '''LocatorBasicTemplate''' with the '''Program Pointer''' set as is shown in the figure below:  
  
  
Line 149: Line 263:
  
  
Before we play the program, we need to '''Reteach Start and End positions''' to meet your application requirements. From the Main menu on Pendant select the '''Program Editor''' tool.  
+
Before we start the program, we need to '''Reteach Start and End positions''' to meet your application requirements. From the Main menu on the Pendant select the '''Program Editor''' tool.  
  
  
Line 155: Line 269:
  
  
Switch to the '''Manual mode''', jog the robot to your desired start position, select the asterisk at the '''locator_start_robtarget''' line and hit '''Modify Position'''.   
+
Switch to '''Manual mode''', jog the robot to your desired start position, select the asterisk at the '''locator_start_robtarget''' line and hit '''Modify Position'''.   
  
Repeat the same procedure for locator end position.
+
Repeat the same procedure for the locator end position.
  
  
 
[[File: Locator ABB tutorial step16.PNG]]
 
[[File: Locator ABB tutorial step16.PNG]]
  
=== 3.6 Run Locator ===
+
=== 5.2 Run Locator ===
  
Now you are ready to run the program. Switch back to '''Auto mode''', Plug Ethernet cable to pre-configured '''WAN port''' and due to safety reasons '''select 10% speed'''.  
+
You are now ready to run the program. Switch back to '''Auto mode''', plug the Ethernet cable into the pre-configured '''WAN port''' and '''select 10% speed'''; this option is recommended for safety reasons.
  
Open '''Production Window''', '''PP to Main''' and hit '''Play'''.  
+
Open the '''Production Window''', '''PP to Main''' and hit '''Play'''.  
  
Make sure that you are ready to stop the motion execution immediately in case if something goes wrong.  
+
Make sure that you are ready to stop the motion execution immediately if something goes wrong.  
  
If everything was configured and calibrated properly, robot should trigger a first scan, wait for the result and move to towards the first localized object (if returned pose is reachable).
+
If everything has been configured and calibrated properly, the robot should trigger a first scan, wait for the result and move towards the first localized object (if the returned pose is within reach).
  
You can monitor program steps directly on the pendant info log panel.   
+
You can monitor the program steps directly on the pendant info log panel.   
  
  
Line 178: Line 292:
  
  
== 4. RAPID ==
+
== 6. RAPID ==
  
The '''ABB Locator module''' is a set of RAPID procedures which handle socket communication with Locator and provide basic example how to navigate robot to specific targets.  
+
The '''ABB Locator module''' is a set of RAPID procedures which handle socket communication with the Locator and provides basic examples of how to navigate the robot to specific targets.  
  
=== 4.1 MAIN ===
+
=== 6.1 Main ===
  
Following code is a main loop from '''LocatorBasicTemplate.mod'''.    
+
The following code is a main loop from the '''LocatorBasicTemplate.mod'''. If you have configured your own tool '''different from tool0''', assign its name to the '''current_tool''' variable at the beginning of the file.   
  
 
     PROC locatorMain()
 
     PROC locatorMain()
 
        
 
        
 +
        !Select tool of your robot
 +
        current_tool := tool0;
 +
        !
 
         ! Reteach start and end positions for your application and convert to Jointtarget representation
 
         ! Reteach start and end positions for your application and convert to Jointtarget representation
 
         locator_start_robtarget := *;
 
         locator_start_robtarget := *;
Line 195: Line 312:
 
      
 
      
 
         ! Move Arm to Start Position
 
         ! Move Arm to Start Position
         MoveAbsJ locator_start_jointtarget, v100, z20, tool0;
+
         MoveAbsJ locator_start_jointtarget, v100, z20, current_tool;
 
         !
 
         !
 
         ! Establish Connection to Locator  
 
         ! Establish Connection to Locator  
Line 217: Line 334:
 
         ENDWHILE
 
         ENDWHILE
  
''' Feel free to adopt the RAPID code above to meet your application requirements, change speed, precision or the order of the steps in the main loop.'''
+
''' Feel free to adapt the RAPID code to meet your application requirements or to change the speed, precision or order of steps in the main loop.'''
  
=== 4.2 COMMUNICATION API ===
+
=== 6.2 Communication API ===
  
RAPID procedures necessary for communication with Locator are available in '''LocatorCommunication''' system module.
+
RAPID procedures necessary for communication with Locator are available in the'''LocatorCommunication''' system module.
 
 
==== 4.2.1 RAPID PROCEDURES ====
 
  
 
----
 
----
  
'''connectToLocator(string server_ip, num port, \num wait_time)''' - a procedure to establish connection to Locator.
+
'''connectToLocator(string server_ip, num port, \num wait_time)''' - procedure to establish a connection with the Locator.
 
   
 
   
- ''server_ip'' - An IP address of Vision Controller running Locator.
+
- ''server_ip'' - IP address of the Vision Controller running the Locator.
  
- ''port'' - A port on which Locator is listening for a connection.
+
- ''port'' - port on which the Locator listens for a connection.
  
 
----
 
----
  
'''trigLocator(num mode, \num num_of_results)''' - a procedure to trigger next localization
+
'''trigLocator(num mode, \num num_of_results)''' - procedure to trigger the next localization
  
 
- ''mode'' - two modes are available - '''SINGLE_RESULT_MODE''' and '''MULTIPLE_RESULT_MODE'''.  
 
- ''mode'' - two modes are available - '''SINGLE_RESULT_MODE''' and '''MULTIPLE_RESULT_MODE'''.  
  
- ''\num num_of_results'' - optional parameter used in MULTIPLE_RESULT_MODE - defines a number of how many results are expected by user.
+
- ''\num num_of_results'' - optional parameter used in MULTIPLE_RESULT_MODE - defines the number of results expected by the user.
  
 
----
 
----
  
'''waitForLocatorResponse()''' - a procedure to wait for a result of localization to be received  
+
'''waitForLocatorResponse()''' - procedure to wait for a localization result to be received  
  
 
----
 
----
Line 250: Line 365:
  
 
----
 
----
=== 4.3 MOTION EXECUTION API ===
+
=== 6.3 Motion Execution API ===
  
A very simple example, which illustrates how Locator can be easily integrated into existing RAPID application is available in RAPID module called '''LocatorBasicTemplate.mod'''.  
+
A very simple example, which illustrates how the Locator can be integrated into existing RAPID applications is available in a RAPID module called '''LocatorBasicTemplate.mod'''.  
  
Use of Locator in both '''SINGLE_RESULT_MODE''' and '''MULTIPLE_RESULT_MODE''' + basic routine to navigate arm to goals received from Locator is provided.   
+
The module provides a basic routines for navigating the arm to goal received from the Locator and also permits the use of the Locator in both '''SINGLE_RESULT_MODE''' and '''MULTIPLE_RESULT_MODE'''.   
 
 
==== 4.3.1 RAPID PROCEDURES ====
 
  
 
----
 
----
  
'''moveToTarget(\num target_id)''' - a procedure to reach the target received as a result of localization
+
'''moveToTarget(\num target_id)''' - procedure to reach the target received as a result of localization
  
 
- ''\num target_id'' - optional parameter used in MULTIPLE_RESULT_MODE - specifies which of multiple received targets to reach.
 
- ''\num target_id'' - optional parameter used in MULTIPLE_RESULT_MODE - specifies which of multiple received targets to reach.
Line 266: Line 379:
 
----
 
----
  
'''isReachable(robtarget point)''' - a procedure to check if given pose is reachable by the selected arm. Procedure sets/resets global flag '''is_reachable'''.
+
'''isReachable(robtarget point)''' - procedure to check if a given pose is reachable by the selected arm. The procedure sets/resets global flag '''is_reachable'''.
  
 
-  ''robtarget point'' - robtarget pose received as a result of localization.
 
-  ''robtarget point'' - robtarget pose received as a result of localization.
  
 
----
 
----
 +
 +
=== 6.4 Communication Protocol ===
 +
 +
Following figures explain Locator-ABB communication protocol in both Single and Multiple Result Modes:
 +
 +
 +
[[File: Single result mode3.png]]
 +
 +
 +
[[File: Multiple result mode.png]]

Latest revision as of 17:35, 26 February 2019

Users are strongly recommended to read Locator Tutorial: Introduction prior to installation of specific robot intere

1. Prerequisities

Locator ABB Interface is compatible with RobotWareOS versions 6.04 and higher.

System options required for Locator ABB Interface: (616-6) PC Interface Module

NOTE: Running Locator ABB Interface on RobotWare 5 systems is also possible with certain limitations. Contact support for more information


Locator ABB Setting Up Guide Prerequisities.png


NOTE: Robot Studio v.6.06 or higher is highly recommended for use with Locator ABB Interface setup.

2. ABB Controller setup

The following tutorial gives a step by step guide for configuring your ABB IRC5 controller and installing the necessary RAPID files to get the interface up and running.

This tutorial was originally written using the latest version of RobotWare v.6.06, however it should be compatible with older versions with minor changes.

2.1 Network configuration

NOTE: The network configuration procedure described below only works with RobotWareOS v.6.06 or higher. If you have an older version of RobotWareOS and need to change an IP address, please contact local ABB support.

Turn on the IRC5 Controller, wait for the Initialization Screen to appear, open the Menu screen and select the Control Panel option:


ABB pendant menu RW6.png


In the Control Panel pane, select Controller Settings:


ABB pendant control panel.png


Select Settings and choose the Network option:


ABB pendant network.png


The Network Settings window should now appear. Use the Touch Panel Keypad to set the IP address of the IRC5 WAN port:


ABB pendant IP setup.png


Click OK and restart the Controller to apply the new settings:


ABB pendant restart.png


3 Robot Studio Setup

3.1 Connect to IRC5 Controller from Robot Studio

Set your local PC network settings to DHCP, plug an Ethernet cable into the Service Port of the IRC5 Controller and launch Robot Studio.

For a direct connection to the Robot Controller, select the Controller tab and select the One Click Connect option:


Locator ABB tutorial step2.PNG


If everything is configured properly, Robot Studio should connect to the IRC5 controller and you should see the content of "Current Station" in the left pane.

NOTE: For the purposes of this tutorial, an ABB IRB1200 7kg robot was used.


Locator ABB tutorial s3.png


3.2 Load Locator ABB Module files

The Locator module for ABB consists of two RAPID files - LocatorBasicTemplate.mod and LocatorCommunication.sys .

Both files need to be uploaded to the controller. Request Write Access first and press Grant Button on Teach Pendant.


ABB pendant grant access.png


Now Right Click on the T_ROB1 task and select the Load Module option. Browse to the LocatorBasicTemplate.mod and click Open.

Repeat the same procedure for the LocatorCommunication.sys file.

You should see that both files have appeared in the T_ROB1 module list.


Locator ABB tutorial s4.png


If the Synchronize to Station dialog panel appears, just click Cancel, it will be synchronized later.


Locator ABB tutorial s5.png


If you are working with a clean system and you do not intend to make use of the default Module1 option, feel free to delete it.


Locator ABB tutorial s6.png

3.3 Configure Main Entry

Now we need to set LocatorBasicTemplate as the main robot program. On the left pane, select Configuration -> Controller -> Task


Locator ABB tutorial s7.png


Double click on the T_ROB1 task.The Instance Editor dialog screen should now appear.

Change the Main Entry tab option locatorMain and click OK.


Locator ABB tutorial s8.png


Since this is a major change to the system, a restart is needed in order for tha change to take effect. SelectOK for now and we will restart system later.


Locator ABB tutorial s9.png

3.4 Adopt Network Configuration

Now click LocatorBasicTemplate in the left pane to open the RAPID code. Amend the first three constants according to your application requirements and network configuration.


Locator ABB tutorial s10.png


Click Apply when finished


Locator ABB tutorial s11.png


It is now time to Restart the system. Use the Restart option in Robot Studio or use the option provided on the Pendant.


Locator ABB tutorial s12.png


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:


KUKA SettingUp Guide Scanner Calibration 10.png


Connect to the Scanner, select Quaternion formalism (Standard for ABB robots), adjust the Sphere radius (20 mm in case of standard ping pong ball) and set the Min visible parameter to 40%:


Locator ABB Setting Up Guide Connect.png


On the ABB Pendant select Main Menu -> Jogging. In Position Format window set following options :

Position shown in: Base

Orientation format: Quaternion


Locator ABB Setting Up Guide Base.png


Press OK and return back to the Jogging menu. Switch Motion Mode to Linear to visualize the current Cartesian pose of the Tool frame as shown in the figure below:


Locator ABB Setting Up Guide Jogging Base Frame.png


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 and input the X,Y,Z and q1, q2, q3, q4 values of the current position to the first line of the point list.

WARNING: In current implementation of Robot Camera Calibrator: Rotation 1 = q2 | Rotation 2 = q3 | Rotation 3 = q4 | Rotation4 = q1


Locator ABB Setting Up Guide Convention.png


Try to change the orientation of the tool in all axes in each point 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. (1.9897mm in this example).


Locator ABB Setting Up Guide Calculated.png


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.


Locator ABB Setting Up Guide Set.png


Do not forget to switch the Coordinate Space in PhoXi Control after calibration has been completed successfully:


KUKA SettingUp Guide Scanner Calibration 20.png


In addition to the Robot - Camera transformation matrix, the calibration process also calculates a Calibration Sphere Misplacement vector which denotes the transformation between the selected Tool (Base) and the center of the sphere (the ping-pong ball). This information can be used for calibration verification. Create a new tool for this purpose. Ensure that the ping-pong ball has not moved since the end of calibration.

On ABB Pendant go to Main Menu -> Program Data -> tooldata and select New


Locator ABB Setting Up Guide New.png


Set Name to current_tool (or other) and select Initial Value at the bottom:


Locator ABB Setting Up Guide Initial Value.png


Set tframe: trans X,Y,Z according to the misplacement vector calculated by Photoneo Robot Camera Calibrator and tload: mass from -1 to 1. Press OK to save newly created tool;


Locator ABB Setting Up Guide new tool.png


Jog the robot to the center of the scanning volume and select the Test button in the Photoneo Robot Camera Calibration Tool:


Locator ABB Setting Up Guide Test.png


Compare the position of the ball calculated in Robot Transformation Coordinate Space with $pos_act values:


Locator ABB Setting Up Guide Current Tool.png


The values calculated by the Photoneo Robot Camera Calibration Tool should approximately match the values reported by the ABB Pendant:

5. Runtime

5.1 Reteach Start and End poses

Open the Production Window and click PP to Main.


Locator ABB tutorial step13.PNG


You should see the LocatorBasicTemplate with the Program Pointer set as is shown in the figure below:


Locator ABB tutorial s13.png


Before we start the program, we need to Reteach Start and End positions to meet your application requirements. From the Main menu on the Pendant select the Program Editor tool.


Locator ABB tutorial s14.png


Switch to Manual mode, jog the robot to your desired start position, select the asterisk at the locator_start_robtarget line and hit Modify Position.

Repeat the same procedure for the locator end position.


Locator ABB tutorial step16.PNG

5.2 Run Locator

You are now ready to run the program. Switch back to Auto mode, plug the Ethernet cable into the pre-configured WAN port and select 10% speed; this option is recommended for safety reasons.

Open the Production Window, PP to Main and hit Play.

Make sure that you are ready to stop the motion execution immediately if something goes wrong.

If everything has been configured and calibrated properly, the robot should trigger a first scan, wait for the result and move towards the first localized object (if the returned pose is within reach).

You can monitor the program steps directly on the pendant info log panel.


Locator ABB tutorial s15.png


6. RAPID

The ABB Locator module is a set of RAPID procedures which handle socket communication with the Locator and provides basic examples of how to navigate the robot to specific targets.

6.1 Main

The following code is a main loop from the LocatorBasicTemplate.mod. If you have configured your own tool different from tool0, assign its name to the current_tool variable at the beginning of the file.

   PROC locatorMain()
     
       !Select tool of your robot
       current_tool := tool0;
       !
       ! Reteach start and end positions for your application and convert to Jointtarget representation
       locator_start_robtarget := *;
       locator_end_robtarget := *;
       locator_start_jointtarget := robtargetToJointtarget(locator_start_robtarget);
       locator_end_jointtarget := robtargetToJointtarget(locator_end_robtarget);
   
       ! Move Arm to Start Position
       MoveAbsJ locator_start_jointtarget, v100, z20, current_tool;
       !
       ! Establish Connection to Locator 
       connectToLocator LOCATOR_IP, LOCATOR_PORT;
   
       ! Main loop
       WHILE (TRUE) DO	    
           ! Single Result mode
           trigLocator SINGLE_RESULT_MODE;
           waitForLocatorResponse;
           if(locator_status = LOCATOR_RESPONSE_OK) moveToTarget;   
       
           ! Multiple Result Mode
           trigLocator MULTIPLE_RESULT_MODE, \num_of_results := 5;
           waitForLocatorResponse;
           IF(locator_status = LOCATOR_RESPONSE_OK) THEN
               FOR i FROM 1 TO num_of_results_available STEP 1 DO
                   moveToTarget \target_id:=i;
               ENDFOR
           ENDIF       
       ENDWHILE

Feel free to adapt the RAPID code to meet your application requirements or to change the speed, precision or order of steps in the main loop.

6.2 Communication API

RAPID procedures necessary for communication with Locator are available in theLocatorCommunication system module.


connectToLocator(string server_ip, num port, \num wait_time) - procedure to establish a connection with the Locator.

- server_ip - IP address of the Vision Controller running the Locator.

- port - port on which the Locator listens for a connection.


trigLocator(num mode, \num num_of_results) - procedure to trigger the next localization

- mode - two modes are available - SINGLE_RESULT_MODE and MULTIPLE_RESULT_MODE.

- \num num_of_results - optional parameter used in MULTIPLE_RESULT_MODE - defines the number of results expected by the user.


waitForLocatorResponse() - procedure to wait for a localization result to be received


flushSocket() - a procedure to read and discard all remaining bytes in the socket buffer


6.3 Motion Execution API

A very simple example, which illustrates how the Locator can be integrated into existing RAPID applications is available in a RAPID module called LocatorBasicTemplate.mod.

The module provides a basic routines for navigating the arm to goal received from the Locator and also permits the use of the Locator in both SINGLE_RESULT_MODE and MULTIPLE_RESULT_MODE.


moveToTarget(\num target_id) - procedure to reach the target received as a result of localization

- \num target_id - optional parameter used in MULTIPLE_RESULT_MODE - specifies which of multiple received targets to reach.


isReachable(robtarget point) - procedure to check if a given pose is reachable by the selected arm. The procedure sets/resets global flag is_reachable.

- robtarget point - robtarget pose received as a result of localization.


6.4 Communication Protocol

Following figures explain Locator-ABB communication protocol in both Single and Multiple Result Modes:


Single result mode3.png


Multiple result mode.png