# Application of Virtual Reality Technology in Teaching and Training System of Processing Industrial Robot

Authors: Qinglai Chen
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In order to solve the problem of difficult teaching and slow teaching in the traditional teaching method of industrial robots, a virtual reality technology is proposed in the teaching and training system of industrial robots. The binocular vision module is fixedly connected to the end tool of the robot to reduce the limitation of teaching range. A hand-held teaching device with a feature plate and a position and pose measuring rod is designed to teach the position and pose of set points quickly. The least square method is used to calibrate the translation parameters of the end of the feature plate. The system collects the image of the feature plate of the hand-held teaching device through binocular vision module and processes the image to obtain the position and pose information of the end points; the pose information is converted to the robot base coordinate system to realize the robot teaching reproduction, and then the teaching reproduction test of 25 points in space is carried out. The experimental results show that the average error of the robot teaching position is 2.427 mm; after using mobile demonstration, the mean position error decreases by 25.3%.Conclusion. The application of virtual reality technology in the teaching and training system of machining industrial robot can improve the accuracy of teaching repetition.


---

## Body

## 1. Introduction

Industrial robot technology with computer science and control theory of mechanical and electrical engineering and information technology such as the development of technology has gradually become a standard equipment that is widely used in welding assembly handling a variety of domains such as glue. Industrial robots in raising the level of industrial production automation at the same time greatly reduce the labor costs and improve production efficiency. In addition, as the country attaches great importance to manufacturing and the transformation and upgrading of traditional industries, while promoting the construction of new infrastructure, the demand for high-quality industrial robot application talents is more urgent. Currently, more and more opened industrial robot technology specialty in higher vocational colleges, in the course of industrial robot teaching, need to rely on specific industrial robot workstation, related equipment price is higher, the space is larger, the restriction of the funds and site conditions, school training equipment quantity is less, the classroom 5-6 students share a set of equipment, and embrace operation time is very limited. Aimed at the limitations of operating time, training equipment, and students in the teaching process, through the virtual simulation software to simulation and debugging of workstation, then to test the physical equipment, it can reduce the training costs and improve the training efficiency and teaching effect, and it will also to a certain extent solve the students’ self-study before class and after class development stage without machine problems with entity operations.Sensing technology with computer technology and network communication technology, especially in the context of industrial 4.0, intelligent manufacturing (IM) has been further developed. Intelligent manufacturing has become the main direction of a new round of industrial technology reform in China’s manufacturing industry. It integrates the development of artificial intelligence, flexible manufacturing, virtual manufacturing system, control network, integrated information processing, and other disciplines and technologies. Specially, virtual reality technology in mechanical engineering (e.g., parts and components maintenance in machine tool design) in the field of application greatly promoted the machinery intelligent manufacturing implementation of major projects. Virtual reality (VR) is a computer system that creates people and the world. It is a human-computer interaction tool. Simulation using virtual reality technology makes people feel like they are in the scene and can manipulate and interact with extremely complex data. According to the different degrees of user participation and sense of immersion, virtual reality system is usually divided into desktop virtual reality system, immersive virtual reality system, and distributed virtual reality system.This VR technology is also known as virtual integrated display technology in social practical applications. It is an extension of multimedia technology and the crystallization of intelligent research on computer technology and intelligent sensing technology. The technology allows the human body to touch the virtual world and provide a relatively realistic vision of the virtual space. Research on VR technology has been extended to various fields, including medical industry, disease diagnosis, industrial production, policy prediction, and hydrogeological simulation exploration. Workshop training is a key point to VR technology application, in terms of design and the relevant operational system, the theory of mechanical production and standardized production process as the basis, by calling the high and new technology, to participate in training personnel to provide a relatively true, and can meet the demand of real-time interaction of information and resources of all automation workshop [1], as shown in Figure 1.Figure 1
Virtual reality technology.


## 2. Literature Review

With the continuous development of robot technology, industrial robots have occupied a pivotal position in the field of industrial production in human society. Ordinary industrial robots need to be taught before moving. At present, the traditional way is teaching reproduction and offline programming. In teaching reproduction mode, the position and posture of the robot end-effector need to be adjusted repeatedly. The whole teaching process is time-consuming and labor-consuming, which reduces the working efficiency of the robot. In addition, the operator should be close to the robot to observe the robot when the robot moves, resulting in personal safety risks. Offline programming has higher security, but it needs to build models separately according to different workpieces. In the face of changeable workpieces and processing requirements, heavy preliminary work reduces production efficiency.In view of the shortcomings of the above traditional teaching methods, many scholars combined binocular vision technology with robot teaching to improve teaching efficiency. Ortt, R. proposed a stereo vision teaching method based on binocular camera, which controlled the robot’s repeated motion based on fuzzy set theory until the robot reached the specified teaching point [2]. In the teaching process, Wang, Z. collected binocular vision images of objects, extracted object edges through digital image processing method, calculated three-dimensional coordinates of object center, and generated teaching path through spatial fitting difference method of dimensional transformation [3]. The above methods mainly analyze and calculate the processing path through image processing and data optimization, so as to improve the teaching efficiency. However, the lack of robot end tool pose data source has certain limitations in practical application. Therefore, in this paper, binocular vision system is used to continuously take the image of the teaching handle with calibration object and record the motion trajectory of the handle [4]. This method converts the pose information of the teaching handle in the camera coordinate system to the robot base coordinate system to realize the complex trajectory reproduction. However, this method is not universal and requires the robot end-effector and the teaching handle to have the same shape. A teaching programming system for industrial robot based on visual guidance is proposed, which uses a teaching tool with calibration to carry out continuous teaching and converts it into robot motion instruction, so as to realize the reproduction of teaching trajectory [5]. Maslivetc, V. A., builds a visual system to observe teaching tools. Once the system is calibrated, neither the robot nor the visual system can move, which limits the teaching space and movement range of the robot to a certain extent [6].Aiming at the limitations of binocular vision technology in robot teaching, a robot fast teaching system is proposed by installing binocular vision module on the end tool of the robot to form an eye-on-hand model [7]. The coordinate system transformation of the fast teaching system is studied, and the least square method is used to calibrate the hand-held teaching device designed. Finally, the fast teaching reappearance experiment and mobile teaching experiment are carried out with the system.


## 3. Method

### 3.1. Binocular Vision Teaching System

#### 3.1.1. Principle of Binocular Vision Ranging

Binocular vision structure is based on the principle of human eyes observing the outside world, the image information of the same target under two cameras is processed and calculated, and the depth information of the target in binocular stereo vision system is calculated by triangular parallax method, so as to obtain the position, shape, and posture information of the target in three-dimensional space [8].In the parallel binocular vision system structure, the two cameras placed in parallel, two camera coordinate system exists only between two optical center around a translational transform camera attachmentb is called the baseline, zero PL and PR d is called the parallax, the coordinates of the difference between using parallax d and similar triangle principle, calculation point P in parallel binocular stereo vision system of three-dimensional coordinate information [9].The established coordinate systemoL−xLyLzL and oR−xRyRzR is the coordinate system of the two cameras with the center of light as the origin. The two cameras are placed in parallel, and the optical axes of the two cameras are parallel, that is, oL−xLyLzL and oR−xRyRzR; the coordinate system is parallel [10]. Plane A and B are the imaging planes of the left and right cameras, respectively, and the projection points of points PX,Y,Z on the imaging planes of the left and right cameras are, respectively PLXL,YL,ZL and PRXR,YR,ZR. In order to obtain parallax d, the imaging plane of the right camera is shifted to the imaging plane of the left camera, so that the two imaging planes are overlapped, and the projection point on the imaging plane PR’ of the left camera PR is obtained as shown in Formula (1):
(1)d=XL−XR,(2)ZL=ZR=f.In Formula (2), it is the focal length of the camera.In order to obtain the three-dimensional coordinate information of pointP in the binocular vision coordinate system, let K be the translation displacement of the imaging plane of the right camera, that is, the distance between the optical axes of the two cameras (baseline length b) [11]. f and K were obtained by binocular camera parameter calibration. According to the similar triangle theorem, the relation between parallax D and depth Z is shown in Formula (3):
(3)Z=fKd.Similarly,X and Y of point P are shown in Formula (4):
(4)X=fXLd,Y=fYLd.


#### 3.1.2. Coordinate Conversion of Binocular Vision Teaching System

Binocular vision teaching system mainly includes robot, binocular vision module, and hand-held teaching device. There are five coordinate systems: BCS (robot base coordinate system), TCS (robot end-holding tool coordinate system), CCS (binocular vision coordinate system), SCS (black and white checkerboard coordinate system), and PCS (hand-held teaching device terminal coordinate system) [12]. Among them, BCS is the coordinate system constructed from the center position of the base of the robot body, which is also the reference coordinate system of the robot movement. TCS is a coordinate system with the origin of the end point of the tool held by the robot; CCS is a coordinate system constructed from the optical center of the left camera in the binocular vision system. SCS is constructed by combining the geometric relations between the inner corners of the black and white checkerboard. PCS is a coordinate system with the origin of the end point of the position and pose measuring rod of the hand-held teaching device [13]. T5 is the pose transformation from BCS to PCS, as shown in Formula (5):
(5)T5=T1·T2·T3·T4.T1 is the position and pose transformation relationship between BCS and TCS; T2 is the position and pose transformation relationship from TCS to CCS, that is, the hand-eye relationship. T3 is the position and pose transformation relationship from CCS to SCS. T4 is the position and pose transformation relationship from SCS to PCS [14].According toT5, the position and posture information of the end of the position and posture measuring rod (i.e., teaching point) of the hand-held teaching device can be obtained under BCS, which can be used for the subsequent realization of the position and posture reproduction of teaching point.


### 3.2. Calibration of Parameters of Hand-Held Teaching Device

The hand-held teaching device contains two coordinate systems, SCS and PCS, respectively. The purpose of calibration is to determine the position and pose transformation relationshipT4 between SCS and PCS. If the design size is directly used to determine the rotation and translation transformation relationship between the two coordinate systems, there will be a large error [15]. Therefore, a translation vector calibration method from SCS to PCS was proposed, and T4 was calculated based on the design rotation Angle from SCS to PCS (0~90). The calibration steps were as follows:Step 1. Obtain the three-dimensional coordinate information of the corner points of the visual calibration plate: the visual calibration plate is placed tiled in the effective field of view of binocular vision, and the three-dimensional coordinate information of all corners of the visual calibration plate in the binocular vision coordinate system is calculated and obtained;Step 2. SolveT3: randomly select multiple corner points (at least 3) on the visual calibration board, align the ends of the hand-held teaching device with the selected corner points in turn, and collect the black and white checkerboard images on the hand-held teaching device. Corner information of black and white checkerboard was calculated, and T3 was obtained by constructing pose matrix principle with three-point method.The black and white checkered board has three inner corner points, respectively,P1, P2, and P3; the coordination record under CCS P1, P2, and P3 is recorded as P1x1,y1,z1, P2x2,y2,z2, and P3x3,y3,z3. The space vector under CCS is constructed according to the space coordinates of three points, with point P1 as the common point, and points P2 and points P3, respectively, form vectors, and the two vectors are perpendicular to each other to form the X-Y axis of SCS, as shown in Formula (6) and (7). The Z-axis is determined according to the right rectangular coordinate system, as shown in Formula (8).
(6)Xw=x2−x1,y2−y1,z2−z1,(7)Yw=x3−x1,y3−y1,z3−z1,(8)Zw=Xw×Yw=y2−y1z3−z1−y3−y1z2−z1x3−x1z2−z1−x2−x1z3−z1x2−x1y3−y1−x3−x1y2−y1T.The vectorXw,Yw,Zw is transformed to unit vector, and the rotation matrix R of SCS relative to CCS is established as shown in Formula (9):
(9)R=XwcYwcZwc=Xwe·XcYwe·XcZwe·XcXwe·YcYwe·YcZwe·YcXwe·ZcYwe·ZcZwe·Zc.Finally, the point coordinate valuex1,y1,z1 is set as the origin of the coordinate system of the feature recognition unit, that is, the translation vector of the coordinate system. Finally, the pose transformation matrix T3 between CCS and SCS is constructed as shown in Formula (10):
(10)T3=Xwe·XcYwe·XcZwe·Xcx1Xwe·YcYwe·YcZwe·Ycy1Xwe·ZcYwe·ZcZwe·Zcz10001.Step 3. SolveT4: set the translation vector from SCS to PCS under CCS as Tg, as shown in Formula (11):
(11)Tg=T3·Tt=x·R11+y·R12+z·R13+xgx·R21+y·R22+z·R23+ygx·R31+y·R32+z·R33+zg1.The translation vectorxyzT from SCS to PCS on the hand-held teaching device is denoted as Formula Tt (11), which is equivalent to Formula (12):
(12)R11R12R13xgiR21R22R23ygiR31R32R33zgi·xyz1=xniynizni.i represents the number of calibration points used for calibration, and i⩾3;xniynizniT is the location of the corresponding standard point in the CCS. Substitute the position information of the i standard points under CCS into Equation (12) and get Formula (13):
(13)R11iR12iR13iR21iR22iR23iR31iR32iR33i·xyz=xn1−xgiyn1−ygizn1−zgi.The matrix is obtained by least square methodxyzT.The rotation relationship between SCS and PCS determines the rotation matrixRt, which performs a rotation transformation with rotation angle of 45 along the Y-axis of the SCS when building PCS. Then, Rt is shown in Formula (14):
(14)Rt=cos45∘0sin45∘010−sin45∘0cos45∘.Eventually,T4 is obtained byRtTt01.


### 3.3. Experimental Verification

The experimental platform of binocular vision teaching system was set up, including the binocular vision module of Kawasaki RS010NA industrial robot, for teaching repetition test [16]. Visual system parameters are shown in Table 1.Table 1
Visual system parameter.
Model of cameraMV-CE050-30GMDistinguishability2592x1944Focal length4 mmBaseline distance80 mmWorking distance600 mmField of view900mmx700mmThe robot rapid teaching system with binocular vision shows the teaching process: (1.) switch to the desired trajectory fitting mode by pressing the button; (2.) in the effective field of view of binocular vision module, the hand-held teaching device is operated to align with the set point and teach the position and posture of the set point; (3.) the binocular vision system captures the image of the hand-held teaching device during teaching, calculates the position and pose information of the end of the position and pose measuring rod, and converts the position and pose information to BCS to form the robot motion path information; (4.) according to the selected trajectory fitting mode and teaching point information, the path planning is carried out to form the robot movement code and control the robot to reproduce teaching, so as to complete the rapid teaching of the robot. In addition, in the case of teaching requirements beyond the visual field range of the visual system or in order to reduce the impact of low teaching accuracy caused by large distortion of the edge of the visual field, the hand-held teaching device can be moved to a new position by operating the robot to teach in the center of the visual field of vision [17, 18].


## 3.1. Binocular Vision Teaching System

### 3.1.1. Principle of Binocular Vision Ranging

Binocular vision structure is based on the principle of human eyes observing the outside world, the image information of the same target under two cameras is processed and calculated, and the depth information of the target in binocular stereo vision system is calculated by triangular parallax method, so as to obtain the position, shape, and posture information of the target in three-dimensional space [8].In the parallel binocular vision system structure, the two cameras placed in parallel, two camera coordinate system exists only between two optical center around a translational transform camera attachmentb is called the baseline, zero PL and PR d is called the parallax, the coordinates of the difference between using parallax d and similar triangle principle, calculation point P in parallel binocular stereo vision system of three-dimensional coordinate information [9].The established coordinate systemoL−xLyLzL and oR−xRyRzR is the coordinate system of the two cameras with the center of light as the origin. The two cameras are placed in parallel, and the optical axes of the two cameras are parallel, that is, oL−xLyLzL and oR−xRyRzR; the coordinate system is parallel [10]. Plane A and B are the imaging planes of the left and right cameras, respectively, and the projection points of points PX,Y,Z on the imaging planes of the left and right cameras are, respectively PLXL,YL,ZL and PRXR,YR,ZR. In order to obtain parallax d, the imaging plane of the right camera is shifted to the imaging plane of the left camera, so that the two imaging planes are overlapped, and the projection point on the imaging plane PR’ of the left camera PR is obtained as shown in Formula (1):
(1)d=XL−XR,(2)ZL=ZR=f.In Formula (2), it is the focal length of the camera.In order to obtain the three-dimensional coordinate information of pointP in the binocular vision coordinate system, let K be the translation displacement of the imaging plane of the right camera, that is, the distance between the optical axes of the two cameras (baseline length b) [11]. f and K were obtained by binocular camera parameter calibration. According to the similar triangle theorem, the relation between parallax D and depth Z is shown in Formula (3):
(3)Z=fKd.Similarly,X and Y of point P are shown in Formula (4):
(4)X=fXLd,Y=fYLd.


### 3.1.2. Coordinate Conversion of Binocular Vision Teaching System

Binocular vision teaching system mainly includes robot, binocular vision module, and hand-held teaching device. There are five coordinate systems: BCS (robot base coordinate system), TCS (robot end-holding tool coordinate system), CCS (binocular vision coordinate system), SCS (black and white checkerboard coordinate system), and PCS (hand-held teaching device terminal coordinate system) [12]. Among them, BCS is the coordinate system constructed from the center position of the base of the robot body, which is also the reference coordinate system of the robot movement. TCS is a coordinate system with the origin of the end point of the tool held by the robot; CCS is a coordinate system constructed from the optical center of the left camera in the binocular vision system. SCS is constructed by combining the geometric relations between the inner corners of the black and white checkerboard. PCS is a coordinate system with the origin of the end point of the position and pose measuring rod of the hand-held teaching device [13]. T5 is the pose transformation from BCS to PCS, as shown in Formula (5):
(5)T5=T1·T2·T3·T4.T1 is the position and pose transformation relationship between BCS and TCS; T2 is the position and pose transformation relationship from TCS to CCS, that is, the hand-eye relationship. T3 is the position and pose transformation relationship from CCS to SCS. T4 is the position and pose transformation relationship from SCS to PCS [14].According toT5, the position and posture information of the end of the position and posture measuring rod (i.e., teaching point) of the hand-held teaching device can be obtained under BCS, which can be used for the subsequent realization of the position and posture reproduction of teaching point.


## 3.1.1. Principle of Binocular Vision Ranging

Binocular vision structure is based on the principle of human eyes observing the outside world, the image information of the same target under two cameras is processed and calculated, and the depth information of the target in binocular stereo vision system is calculated by triangular parallax method, so as to obtain the position, shape, and posture information of the target in three-dimensional space [8].In the parallel binocular vision system structure, the two cameras placed in parallel, two camera coordinate system exists only between two optical center around a translational transform camera attachmentb is called the baseline, zero PL and PR d is called the parallax, the coordinates of the difference between using parallax d and similar triangle principle, calculation point P in parallel binocular stereo vision system of three-dimensional coordinate information [9].The established coordinate systemoL−xLyLzL and oR−xRyRzR is the coordinate system of the two cameras with the center of light as the origin. The two cameras are placed in parallel, and the optical axes of the two cameras are parallel, that is, oL−xLyLzL and oR−xRyRzR; the coordinate system is parallel [10]. Plane A and B are the imaging planes of the left and right cameras, respectively, and the projection points of points PX,Y,Z on the imaging planes of the left and right cameras are, respectively PLXL,YL,ZL and PRXR,YR,ZR. In order to obtain parallax d, the imaging plane of the right camera is shifted to the imaging plane of the left camera, so that the two imaging planes are overlapped, and the projection point on the imaging plane PR’ of the left camera PR is obtained as shown in Formula (1):
(1)d=XL−XR,(2)ZL=ZR=f.In Formula (2), it is the focal length of the camera.In order to obtain the three-dimensional coordinate information of pointP in the binocular vision coordinate system, let K be the translation displacement of the imaging plane of the right camera, that is, the distance between the optical axes of the two cameras (baseline length b) [11]. f and K were obtained by binocular camera parameter calibration. According to the similar triangle theorem, the relation between parallax D and depth Z is shown in Formula (3):
(3)Z=fKd.Similarly,X and Y of point P are shown in Formula (4):
(4)X=fXLd,Y=fYLd.


## 3.1.2. Coordinate Conversion of Binocular Vision Teaching System

Binocular vision teaching system mainly includes robot, binocular vision module, and hand-held teaching device. There are five coordinate systems: BCS (robot base coordinate system), TCS (robot end-holding tool coordinate system), CCS (binocular vision coordinate system), SCS (black and white checkerboard coordinate system), and PCS (hand-held teaching device terminal coordinate system) [12]. Among them, BCS is the coordinate system constructed from the center position of the base of the robot body, which is also the reference coordinate system of the robot movement. TCS is a coordinate system with the origin of the end point of the tool held by the robot; CCS is a coordinate system constructed from the optical center of the left camera in the binocular vision system. SCS is constructed by combining the geometric relations between the inner corners of the black and white checkerboard. PCS is a coordinate system with the origin of the end point of the position and pose measuring rod of the hand-held teaching device [13]. T5 is the pose transformation from BCS to PCS, as shown in Formula (5):
(5)T5=T1·T2·T3·T4.T1 is the position and pose transformation relationship between BCS and TCS; T2 is the position and pose transformation relationship from TCS to CCS, that is, the hand-eye relationship. T3 is the position and pose transformation relationship from CCS to SCS. T4 is the position and pose transformation relationship from SCS to PCS [14].According toT5, the position and posture information of the end of the position and posture measuring rod (i.e., teaching point) of the hand-held teaching device can be obtained under BCS, which can be used for the subsequent realization of the position and posture reproduction of teaching point.


## 3.2. Calibration of Parameters of Hand-Held Teaching Device

The hand-held teaching device contains two coordinate systems, SCS and PCS, respectively. The purpose of calibration is to determine the position and pose transformation relationshipT4 between SCS and PCS. If the design size is directly used to determine the rotation and translation transformation relationship between the two coordinate systems, there will be a large error [15]. Therefore, a translation vector calibration method from SCS to PCS was proposed, and T4 was calculated based on the design rotation Angle from SCS to PCS (0~90). The calibration steps were as follows:Step 1. Obtain the three-dimensional coordinate information of the corner points of the visual calibration plate: the visual calibration plate is placed tiled in the effective field of view of binocular vision, and the three-dimensional coordinate information of all corners of the visual calibration plate in the binocular vision coordinate system is calculated and obtained;Step 2. SolveT3: randomly select multiple corner points (at least 3) on the visual calibration board, align the ends of the hand-held teaching device with the selected corner points in turn, and collect the black and white checkerboard images on the hand-held teaching device. Corner information of black and white checkerboard was calculated, and T3 was obtained by constructing pose matrix principle with three-point method.The black and white checkered board has three inner corner points, respectively,P1, P2, and P3; the coordination record under CCS P1, P2, and P3 is recorded as P1x1,y1,z1, P2x2,y2,z2, and P3x3,y3,z3. The space vector under CCS is constructed according to the space coordinates of three points, with point P1 as the common point, and points P2 and points P3, respectively, form vectors, and the two vectors are perpendicular to each other to form the X-Y axis of SCS, as shown in Formula (6) and (7). The Z-axis is determined according to the right rectangular coordinate system, as shown in Formula (8).
(6)Xw=x2−x1,y2−y1,z2−z1,(7)Yw=x3−x1,y3−y1,z3−z1,(8)Zw=Xw×Yw=y2−y1z3−z1−y3−y1z2−z1x3−x1z2−z1−x2−x1z3−z1x2−x1y3−y1−x3−x1y2−y1T.The vectorXw,Yw,Zw is transformed to unit vector, and the rotation matrix R of SCS relative to CCS is established as shown in Formula (9):
(9)R=XwcYwcZwc=Xwe·XcYwe·XcZwe·XcXwe·YcYwe·YcZwe·YcXwe·ZcYwe·ZcZwe·Zc.Finally, the point coordinate valuex1,y1,z1 is set as the origin of the coordinate system of the feature recognition unit, that is, the translation vector of the coordinate system. Finally, the pose transformation matrix T3 between CCS and SCS is constructed as shown in Formula (10):
(10)T3=Xwe·XcYwe·XcZwe·Xcx1Xwe·YcYwe·YcZwe·Ycy1Xwe·ZcYwe·ZcZwe·Zcz10001.Step 3. SolveT4: set the translation vector from SCS to PCS under CCS as Tg, as shown in Formula (11):
(11)Tg=T3·Tt=x·R11+y·R12+z·R13+xgx·R21+y·R22+z·R23+ygx·R31+y·R32+z·R33+zg1.The translation vectorxyzT from SCS to PCS on the hand-held teaching device is denoted as Formula Tt (11), which is equivalent to Formula (12):
(12)R11R12R13xgiR21R22R23ygiR31R32R33zgi·xyz1=xniynizni.i represents the number of calibration points used for calibration, and i⩾3;xniynizniT is the location of the corresponding standard point in the CCS. Substitute the position information of the i standard points under CCS into Equation (12) and get Formula (13):
(13)R11iR12iR13iR21iR22iR23iR31iR32iR33i·xyz=xn1−xgiyn1−ygizn1−zgi.The matrix is obtained by least square methodxyzT.The rotation relationship between SCS and PCS determines the rotation matrixRt, which performs a rotation transformation with rotation angle of 45 along the Y-axis of the SCS when building PCS. Then, Rt is shown in Formula (14):
(14)Rt=cos45∘0sin45∘010−sin45∘0cos45∘.Eventually,T4 is obtained byRtTt01.


## 3.3. Experimental Verification

The experimental platform of binocular vision teaching system was set up, including the binocular vision module of Kawasaki RS010NA industrial robot, for teaching repetition test [16]. Visual system parameters are shown in Table 1.Table 1
Visual system parameter.
Model of cameraMV-CE050-30GMDistinguishability2592x1944Focal length4 mmBaseline distance80 mmWorking distance600 mmField of view900mmx700mmThe robot rapid teaching system with binocular vision shows the teaching process: (1.) switch to the desired trajectory fitting mode by pressing the button; (2.) in the effective field of view of binocular vision module, the hand-held teaching device is operated to align with the set point and teach the position and posture of the set point; (3.) the binocular vision system captures the image of the hand-held teaching device during teaching, calculates the position and pose information of the end of the position and pose measuring rod, and converts the position and pose information to BCS to form the robot motion path information; (4.) according to the selected trajectory fitting mode and teaching point information, the path planning is carried out to form the robot movement code and control the robot to reproduce teaching, so as to complete the rapid teaching of the robot. In addition, in the case of teaching requirements beyond the visual field range of the visual system or in order to reduce the impact of low teaching accuracy caused by large distortion of the edge of the visual field, the hand-held teaching device can be moved to a new position by operating the robot to teach in the center of the visual field of vision [17, 18].


## 4. Result and Analysis

Select a teaching point in the space, use a hand-held teaching device to aim at the set point for teaching, and then use a robot to reproduce the teaching position and posture. The specific process is as follows:25 points were selected in the space, and they were arranged from close to the center of the camera’s field of view to far from the center of the camera’s field of view, and marked asQii=1,2,⋯,25. Use the hand-held teaching device to align Qi and record the terminal position information XiYiZi displayed by the upper computer of the robot; then, the robot is used for teaching and reproducing, and the error between the robot’s reproducing position and teaching point position is measured [19, 20]. The diameter of the robot end welding wire is 1.2 mm, the center of the welding wire is taken as the robot end point, and the feeler gauge is used to measure the error, as shown in Figure 2.Figure 2
X, Y, Z deflection error.The average distance error between the positionXYZ of the teaching point and the position X′Y′Z′ of the robot is 2.427 mm, which shows that the principle of binocular vision teaching system is correct [21]. At the same time, the experimental results show that the set point position near the camera’s field of vision has a small reoccurrence error, while the set point position far from the camera’s field of vision has a large reoccurrence error, which is caused by camera distortion [22, 23]. Therefore, it is proposed to use mobile teaching to conduct a second test on the set point (10 points) with large error to reduce the influence of camera distortion on the experimental results. By moving the robot position, the hand-held teaching device is placed in the center of the camera’s field of vision and the teaching is repeated. The results are shown in Table 2.Table 2
Recurrence error after moving demonstration.
Teaching pointΔX/mmΔY/mmΔZ/mmΔd/mm50.561.600.501.372 04270.101.150.251.533 786111.600.020.102.320 108120.301.750.502.232 151151.250.100.201.767 371171.500.700.051.930 026191.501.501.201.181 101201.001.600.302.048 17211.751.100.501.836 437251.201.300.201.619 907As shown in Figures3 and 4, by comparing the test results of the fixed teaching demonstration with the mobile teaching demonstration with the robot moving, it can be seen that the position error of the 25 points after the mobile teaching is significantly decreased: The x-direction mean error decreased by 10.7%, y-direction mean error decreased by 36.7%, Z-direction mean error decreased by 22.1%, and mean position error decreased by 25.3%. The experimental results show that mobile teaching has certain optimization effect on the teaching repetition accuracy and can reduce the influence caused by camera distortion [24, 25].Figure 3
Position error of 25 points before and after moving demonstration.Figure 4
Mean error of 25 points before and after moving demonstration.


## 5. Conclusion

This paper presents the application of virtual reality technology in the teaching and training system of processing industrial robots and proposes a robot fast teaching system based on binocular vision. The experimental results show that the average error of robot teaching position is 2.427 mm after fast visual teaching. After mobile teaching, the average position error decreases by 25.3%. The system is feasible, and mobile teaching can improve the reproducibility accuracy. A hand-held teaching device is designed to simulate the real welding torch and complete parameter calibration based on the least square method to solve the problem that the current teaching tool method is not universal. The hand-held teaching device can make full use of man hands’ flexibility to quickly and intuitively confirm the position and pose information of the teaching point and reduce the teaching time required by industrial robots.



---

*Source: 3415660-2022-09-20.xml*