Locator Tutorial: Setup and Runtime
The main aim of this page is to provide a detailed overview of the prerequisites, configuration and runtime of the PhoXi Locator
Users are strongly recommended to read the Locator Tutorial: Introduction before starting this page!
Locator - First Launch
Locator Core is configured to start immediately after the boot. The original image comes with the example 3D Scan of several T-fitting objects placed in the bin and the basic T-fitting PLCF file.
When you launch Vision Controller with Locator for the first time, the default configuration of the Locator uses these two data sources for initial run. 3D scan of T-fitting objects in the PhoXi Control screen which you can see immediately after the boot, is a sign that Locator Core has connected to the example PhoXi device and triggered the first scan successfully. In addition to establishing a connection with PhoXi device, Locator Core has also loaded PLCF file, initialized TCP/IP server, opened configured port and changed the current state to "Waiting for connection...".
If you click on the Locator Configurator desktop icon, you will see the current Locator state as shown in the figure below:
Press Stop Server to halt Locator runtime and adapt current configuration according to the application requirements.
Locator is configured to "remember" configuration from previous session so even after turning Vision Controller OFF and ON again, it will start with the last active configuration automatically.
Following sections provide detailed information about PhoXi Scanner configuration, generation of PLCF and Locator setup.
1. PhoXi Control
Locator was designed to work with Photoneo PhoXi Scanners and requires the PhoXi Control application to be running in parallel to the Locator application.
As a first step in the process, ensure that the PhoXi Scanner is connected to the same subnet and appears in the Network Discovery tab of PhoXi Control as is shown in the figure below:
Connect to your PhoXi Scanner and fine tune the scanning parameters in order to achieve the optimal scanning performance. See our knowledge base for more information on this topic.
2. Localization Configurator
PLCF (Photoneo Localization Configuration File) is extremly important for the overall performance of Locator. PLCF holds information about the object that is going to be localized within the scene, including CAD model, point of interest, stop criteria, localization settings and training data. PLCF is generated by Photoneo Localization Configurator, which is available of Vision Controller as a standalone tool and can be launched by typing PhoLocConfig into the console or by searching for Photoneo Localization Configiurator directly in the Ubuntu Applications menu.
NOTE: HW license (USB Dongle) must be inserted into the system before launch!
Launch Photoneo Localization Configurator and upload the model of your object in .ply or .stl format.
The Model Coordinates tab is intended for the configuration of the point of the interest. The point of the interest is the point on the object, which coordinates will be returned by the Localization.
If you plan to approach the object directly in the orientation returned by Localization, set the Z axis of interactive marker to point in the approaching direction of the robot (See the figure below).
Always try to set the point of the interest to be unique with respect to the object, meaning that there is only one possible correct result of successful localization (this not always possible, especially for rotation invariant objects). In cases in which several possible correct localization results might occur, you will need to apply additional logic to the robot controller to avoid situations when the goal pose returned by Locator is not kinematically reachable by the robot.
Such a scenario is shown in the figure below. Even if you define the point of the interest on the top surface of the object, you might obtain a result from the bottom side of the object pointing to the opposite direction. This result is correct from a localization point of view, however it is not kinematically reachable by the robot. In this situation additional logic would have to be applied directly on the robot controller to avoid this outcome.
On the Set Parameters tab, ensure that you have selected suitable Stop Criteria and trigger localization several times to verify that your current configuration provides reliable results. See the figure below:
In cases in which Localization does not work properly, it might be necessary to make adjustments in the Advanced Settings dialog. Contact [Photoneo support] if you need help with this step.
Click Generate to create a PLCF file once Localization Configuration has finished. Use this file as an input for Locator in the following steps.
3. Locator Start [Ubuntu]
Locator Core works as a background service so it should be up and running from the boot. Type ps aux | grep pholocator to verify that the pholocator service is running.
If you want to visualize the Locator GUI, simply search for the Locator Configurator icon in the Applications menu in Ubuntu or type the LocatorConfigurator command directly into the terminal.
4. Locator Configuration
The Locator GUI consists of a control panel on the left side and a 3D Visualizer on the right. As was mentioned above, the Locator GUI is primarily intended for the configuration and validation of Locator functionality.
The Locator controls are as follows:
- - Scanner ID - List of all available PhoXi Scanners as shown by Network Discovery in the PhoXi Control application. Use Refresh to reload available devices.
- - Port - Defines the port which will be opened for socket communication. Locator always works in server mode.
- - PLCF - Photoneo Localization Configuration File generated from Localization Configurator in the previous step. See this link for more information. Use the Configure New button to launch the Photoneo Localization Configurator directly.
- - Best Result Selector - this option is used to filter results returned by Localization. Select from Min X, Max X, Min Y, Max Y, Min Z, Max Z, Max Overlap options.
- - Store Log - If you want to store Locator logs to the text file, check this option and select or create a file using the Browse button.
- - Load/Save Server Configuration - Locator stores the last configuration by default, however these buttons can be used to save the current configuration to a specific file to for future use.
- - Start/Stop Server - This button is intended to start and stop the Locator TCP/IP server.
5. Locator Runtime
When Locator is configured and ready for launch, click Start Server to initialize TCP/IP communication. Locator is now initialized and waits for connection from the client:
As soon as the connection from the client is established and the first scan is triggered, the current point cloud should appear in the 3D visualizer screen on the right side. You might need to use the mouse to reorient the 3D viewer correctly.
The final object whose coordinates are about to be sent to the client is highlighted in 3D visualizer in blue and its coordinates are output to the log screen. The figure below illustrates a situation in which only a single result was requested.
If multiple results have been requested, all localized objects are highlighted blue and all coordinates are output to the log screen in the bottom left corner. See the figure below:
Locator Core works as a background service so even if you close the Locator GUI, the Locator will remain running!