System of technical vision based on active laser triangulation method

The number of failures, the percentage of faulty electric locomotives, and the number of unplanned repairs remain high at the enterprises for repair of traction rolling stock of the network of the main-line Russian railways. It was found that the main reasons for this situation are the unsatisfactory quality of current repairs and maintenance, the insufficient level of mechanization and automation of labor-intensive repair processes. The paper considers an existing positive example of the use of robotic equipment in assembly production for the repair of traction rolling stock. The analysis and classification of sensor control devices for industrial robots is performed. A method for controlling the driving devices of the repair equipment is proposed by obtaining a spatial-geometric image of the object’s surface before the beginning of technological processing by the method of active laser triangulation scanning. The principle of the action of three-dimensional scanning is described; a number of equipment with its technical characteristics and software used during the research in the laboratory of the university is listed. The result of the experiment of the proposed method on the model of the truck frame of the electric locomotive is presented. The metrological characteristics of the measurement results are calculated, allowing comparing and assessing the accuracy of the model obtained and the mock-up of the rolling stock truck. Based on the results of these calculations, it can be said with certainty that all errors and deviations of the results from true values lie within the limits of the norm and this technology can be used to design a vision system for robotic equipment.


Introduction
Because of increased competition in the market of production and repair of rolling stock, the issues of reducing the prime cost of production and services, improving the quality, the ability to quickly change over and adapt production to changing conditions of the external environment are of great importance.
One of the effective ways of complex solution of the tasks is automation of technological processes of production and repair of rolling stock by introducing technological equipment with executive mechanisms based on industrial robots [1,2]. The use of such equipment makes it possible to achieve high labor productivity, significantly reduce the changeover time, and thereby increase the technological flexibility of production [3]. The most technically difficult task is the task of robotizing the manufacturing processes of assembly production, which is due to the significant nomenclature and variety of technological operations, as well as the need for the operation of executive mechanisms in the system of spatial coordinates [4,5]. The traditional solution involves the use of manipulators with three or more degrees of freedom, equipped with an intelligent control system with servo feedback [6].
However, as analysis of advanced domestic and foreign experience shows, the use of such technologies in the production and repair of rolling stock is of a single nature. This can be explained by the following reasons: complexity and high cost of equipment, high professional requirements for maintenance personnel, including programming and training of robots, the inapplicability of many standard industrial solutions of the intelligent control system to the harsh conditions of repair production (for example, tactile and sensing devices, etc.) [7,8,9].
The plant is equipped with a robot Blastman B20S, which can move the shot blasting nozzle to the tight area of the workpiece. The trajectory of the robot's movement is set programmatically -by its preliminary training by the operator. The need for a fairly long, time-consuming and requiring highly skilled operator training of a robot with a change in the nomenclature of production facilities becomes an essential disadvantage of the plant, which reduces its operational technological flexibility [10].
An alternative control option for robot manipulators for assembly production is the use of servo systems using different types of sensors as data on the spatial location of the workpiece ( fig. 1). Sensitive sensors perceive information about the external environment, the spatial location of the processing object, and the manipulators and, after preliminary processing, transfer it to the control system to form control actions for the actuating mechanisms. To obtain information about the external environment, various types of sensors can be used, for example: presence sensors for the parts, distance sensors, object position parameters in space, etc. [11,12]. According to the principle of operation, the sensors can be divided into four groups: tactile (contact-operated), contactless video sensors, sound and ultrasonic sensors, other types of contactless sensors -thermal, magnetic, etc. (fig. 2).
Obtaining accurate information about the spatial characteristics of the product is one of the most technically complex tasks. Attempts at the practical use of several types of tactile and video sensors in the servo feedback systems of robotic complexes, undertaken by us, have shown that they are insufficiently resistant to aggressive influences from the external environment of repair production of rolling stock (in particular, unstable operation under conditions of high humidity, dust and contamination, impossibility to place sensors in close proximity to the actuating mechanisms of washing machines, shot blasting plants, etc.). An alternative option for systems with servo feedback is to obtain a spatial-geometric image of the surface of an object before the processing, for example, by laser triangulation scanning. In this case, the control of the actuating mechanisms is carried out according to a pre-formed rigid trajectory that repeats the contours of the workpiece, which allows solving a number of practical problems of automation of operations such as shot blasting cleaning of bodies of rolling stock, wheel sets and truck frames, washing of units and aggregates, application of paint coatings, etc. [13,14].

Materials and methods
Technologically, processing of the product has two stages. At the first stage, the spatial model of object is formed by results of preliminary scanning. At the second stage, the product is directly processed, for example, by the shot blasting according to the program created as a result of scanning the shape of the object. It is important to note that during the processing of the product, sensitive elements (sensors) are not used and can be removed from the working area (for example, they are closed with a protective cover) [15].
The laser triangulation method of measurement has been widely used in recent years as one of the most accurate and fastest methods of obtaining digital three-dimensional models of real objects [16,17]. The method is based on determining the coordinates of the reflected laser beam image on the photosensitive pad of the matrix photodetector.
The principle of operation of the laser triangulation sensor is shown in fig. 3. The source of laser radiation 1 at a certain angle α illuminates the object with a laser beam. The image of an object with a laser beam on its surface is recorded by a digital video camera 2. By determining the position of the laser beam on the image, three-dimensional coordinates of the points of the object's surface on which the laser beam or line is present are calculated. Scanning of the whole object is possible by shifting the laser beam (line) along the entire surface. Using special software, it is possible to obtain a spatial mathematical model of the object of production. Knowing the position of each vertex, the connection of coordinates with the vertex, and the normal for each vertex, the control system generates signals of control actions by the actuating mechanisms of the robotic technological equipment [18].
In order to study the potentialities of the laser triangulation method for obtaining threedimensional models of rolling stock units of a complex geometric shape, an experiment was conducted in the laboratory of the Omsk State Transport University using a model of the frame of an electric locomotive truck ( fig. 4). Software processing of the scanning results and the construction of the 3D model are performed using the DAVID-laserscanner program.
A laser module with a wavelength of 650 nm (red color) with a power of 5 mW formed a moving scanning laser beam. Its projection was read using a digital web camera with a resolution of 1024 × 768 pixels. At the end of the 3D scanning, the results were stored in the OBJ format -a common data format that contains the 3D geometry of the object, as well as the connection of the texture coordinates with the vertex, the position of each vertex, its normal, and the parameters created by operating domains [10].

Results and calculation
For the values of the measured physical quantity, we take the dimensions of certain sites of the rolling stock truck l (an example of the sites for measurement along the x-axis is shown in fig. 5).  As a result of multiple measurements of the physical quantity l on each considered site of the scanned three-dimensional model of the truck, a set of values is obtained: where i -measurement site; j -measurement on the i-th site; n -number of measurements. Let's find the mathematical expectation of the parameters of the measurements of physical quantities on each studied site of the mock-up according to the formula Results are presented in the table 1. We will use the same method to denote the sites for the y-axis and the z-axis and perform multiple measurements of each site of the model. As a result, the total number of sites is 34, and the number of measurements in all sites is 230. We give a simplified fragment of the general analytical table obtained, in which we indicate the true values of the mock-up of the truck L (table 1). For each measurement at each site, we calculate the absolute error of measurements l: We enter the value of the average absolute error at the site in the table, and then we find the relative error of the measurement results : We calculate the root-mean-square deviation  of the measurement results from the arithmetic mean of each studied site of the three-dimensional model by the formula Based on the calculation results, we plot the dependence of the relative error  on the true values of the measured physical quantity L ( fig. 6). Based on the results of statistical tests, we establish the confidence intervals of the relative errors  of the mathematical expectation ̅ of the value L in a wide range of its measurement.
To determine on which set unit of measure, on average, changes the value of one characteristic when another characteristic changes, it is necessary to perform the regression analysis by the method of Ordinary Least Squares (OLS).
We find and analyze the equations of exponential regression in accordance with our dispersion diagram ŷ=e a+bx and calculate the coefficients a and b of this equation using the formulas: Thus, the sought regression equation has the form To assess the adequacy of the adopted model (8) between the relative error  and the true sizes of the truck mock-up L, it is necessary to calculate the coefficients of correlation R and determination R2.
The correlation coefficient R is calculated by the formula: where Sx -dispersion of ̅ ; Sy -dispersion of δ, The square of the correlation coefficient R is called the coefficient of determination It is also necessary to calculate the average approximation error А ̅ for calculating the average deviation of the calculated values from the actual ones: Statistical indicators of the accuracy assessment from the results of processing the entire set of data are given in table 2.

Conclusions
Based on the calculation of the error in the results of the three-dimensional scanning of the mock-up of the rolling stock truck, it can be said with certainty that all errors and deviations from the true values lie within the limits of the norm. The value of the average error of approximation up to 5% indicates the adequacy of the proposed mathematical model. The correlation coefficient indicates a direct strong connection between the factor and the result: it can be stated with a probability of up to 98% that the value of the 3D scanning parameters will lie in acceptable confidence intervals. This experiment shows that using the three-dimensional scanning by the method of active laser triangulation before the beginning of processing of the object of repair, it is possible to obtain an excellent vision system for automated equipment for repairing parts and assemblies of the rolling stock.
This technology allows solving a number of practical problems of automation of such operations as shot blasting cleaning of bodies of the rolling stock, wheel sets and frames of trucks, washing of units and aggregates, application of paint coatings, etc.