# Automatic Cutting System Design of Robot Hand Based on Stereo Vision

Authors: Hongbiao Mei; Zhongping Li; Chunhong Zou
Journal: Scientific Programming
 (2022)

---

## Abstract

At present, the pouring riser of valve castings is mainly removed by manual cutting, polluting the environment and causing harm to the human body with a low efficiency. Therefore, an automatic cutting pouring riser method using the stereo vision system and manipulator is proposed. The relative position of the valve casting and the end of the manipulator is obtained through the position transformation of the valve casting coordinate system, the manipulator end of the coordinate system, and the camera coordinate system. The spatial motion trajectory of the manipulator is planned, implementing automatic pouring riser cutting of the same valve casting with the same pose. The experimental results show that the position deviation and the angle deviation of the repetitive positioning accuracy and the random positioning accuracy of the visual system are within ±1 mm and ±1°; in the pouring riser cutting test, the maximum deviation between the actual cutting trajectory and the theoretical cutting trajectory is 3 mm. In summary, the method shows a good reliability and could meet the requirements of cutting accuracy.


---

## Body

## 1. Introduction

As a control unit to control medium flow in the pipeline conveying system, the valve which is widely used in petroleum industry, chemical industry, metallurgy, electric power industry, etc., can change the channel section and medium direction to realize the diversion, globe, throttle, check, or the overflow pressure relief, and other functions. Because of the complexity of its internal structure, the major part of valve blank is manufactured by casting [1–4]. The pouring riser which is inevitable in the cast process should be cut out as “excess” for subsequent machining. At present, the pouring riser is cut with a hand-held abrasive cutting machine basically which has high labor intensity and low efficiency [5–7]. Large amounts of metal dust and smoke from cutting process float in the air and cause environmental pollution. In addition, the cutting staff who breathe these kinds of dust is likely to suffer from occupational diseases, such as pneumoconiosis, and this has a negative influence on the social image of enterprises [8–12]. Therefore, it has become an urgent problem for the valve manufacturers to develop an automatic cutting method and equipment for cutting pouring riser.With the development and advancement of the industrial robot technology, the robot is gradually used to cut the pouring riser of the valve and other castings. At present, the common way is to clamp the casting onto the mechanism. Cutting tools, such as cutting disc and flame cutter, are installed at the end of the robot. The cutting trajectory is determined by teaching; then, the robot is controlled to move to finish the cutting according to the teaching trajectory. The advantage of this method is that one teaching track could be called for cutting the same casting theoretically. However, in practice, due to the complex shape of blank parts, it is difficult to determine a coarse datum to improve positional accuracy, resulting in overcutting or undercutting. In addition, enterprises would bear a huge manufacturing cost of positioning and clamping devices for different castings. Thus, large time cost for track teaching causes a lower efficiency and cannot meet the production requirements of enterprises.In summary, developing a universal positioning method and fixture for valve casting is of great significance. Furthermore, the positioning device of valve casting should meet the following two requirements: (1) for different types of valve castings, the same positioning method and device can be fixed on the same positioning clamping device, and (2) for the same valve castings fixed on the clamping device in the same position and attitude, the pouring riser cutting will be completed using the same teaching program after track teaching.This paper discusses the positioning method and system for automatic cutting pouring riser of valve castings by an integration of machine vision, robot, network communications, artificial intelligence, and information processing technology [13–16], to achieve the same body in the same position, and the posture is clamped on the automatic cutting equipment, with the same program to complete the same valve pouring riser cutting, which laid a foundation for automatic cutting of the pouring riser and solved the urgent problems faced by enterprises. The research and development work has broad application prospects, which can significantly improve the economic benefits of foundry enterprises and achieve good social benefits.


## 2. Positioning System Composition

The positioning system mainly includes the following: 6-dOF industrial robot, 4 high-precision industrial infrared cameras, computer, positioning disc, and flange. Robots, industrial cameras, and computers are connected to switches to form industrial Ethernet, which uses the TCP/IP protocol for communication.The positioning disc is positioned and mounted to the end of the robot with the flange. The end of the robot is a flange structure, the end face has a pin hole and a stopper, users can achieve their own process equipment or precise positioning between the actuator and the robot by the pin hole and fixing structure; in addition, there are 8 bolt holes on the end face to facilitate the user to install and fasten the positioning fixture to the robot. The corresponding pin hole and convex platform are designed on the flange plate, the convex platform is loaded into the stopper, and then the pin is installed into the pin hole of the flange and at the end face of the robot to position the flange precisely on the robot. Another pin hole is processed in the center of the flange, and then there are two pin holes on the flange. The positioning plate is processed with two pin holes which are corresponding to the flange plate, and four bolt holes are processed in the circumferential direction and installed on the flange plate after positioning.When the system is working, we place the body casting into the work space at first and then place three marker balls on the circular convex platform; an infrared camera would measure the coordinates of the marker ball in the camera coordinate system, and a computer would calculate the motion parameters of the robot according to the coordinates of the three marked balls; the robot takes the positioning plate and moves to the top of the body casting according to the parameters (for the same valve castings, the position and attitude relationship between the positioning plate and valve body should be fixed. In this way, the positioning clamping device on automatic cutting equipment can be ensured with the same position and attitude). After positioning, the operator connects the body casting to the positioning plate by the welding steel for its subsequent installation and positioning on the cutting equipment.The crucial problem is to solve the motion parameters of the robot according to the position and attitude of the valve casting, to ensure that the position and attitude between the positioning plate and the valve are within the specified deviation range after the same valve robot moves. In this paper, coordinate transformation is used to solve this problem. More detail about the principle of positioning and the method of solving robot motion parameters will be presented in subsequent paragraphs.


## 3. Positioning Principle and Algorithm

Four coordinate systems ((C), (R), (V), and (P)) are, respectively, fixated on the camera, robot, valve casting, and positioning plate. The main function of the system is to drive the positioning plate from the initial position to move to the upper part of the body and keep it in a fixed attitude relationship with the valve. For the coordinate system, we make the xoy plane of the positioning plate coordinate (P) parallel to the xoy plane of the valve coordinate system (V), thez-axis must coincide, and the origins differ by an adjustable height H. In order to calculate the robot motion parameters to achieve the position and attitude relationship, the transformation relationship between the body coordinate system and the robot coordinate system needs to be established. The following describes how to achieve this principle and model by establishing the transformation relationship between coordinate systems to calculate the motion parameters of the robot.


### 3.1. Establishment of the Camera Coordinate System (C)

The camera system is a multicamera stereo vision system [17–29] composed of 4 infrared cameras, which can measure the object’s coordinates in 3D space. Calibration software and calibration devices are provided by the manufacturer. After the camera is installed and the working space is determined, the establishment of camera coordinate system (C) can be quickly completed according to the manufacturer’s instructions and software. The establishment process will not be described in detail in this paper. The camera coordinate system (C) is the bridge to link other coordinate systems, the establishment and the transformation relationship of the other coordinate systems are realized by establishing the transformation relationship between the body casting coordinate systems (V) and (C), the transformation relationship between the robot coordinates (R) and (C), and the transformation relationship between the location plate coordinates (P) and (C). The motion parameters of the robot are calculated according to these transformation relations.


### 3.2. Transformation Relationship between the Body Casting Coordinate System (V) and the Camera Coordinate System (C)

Three circular convex platforms are casted according to design reference, on which are placed the reflective marking balls A, B, and C; the midpoint of the connection between A and B isOV, and we make sure that COv⊥AB when casting. The coordinates of the three reflective marker balls in camera coordinates were obtained by camera shooting, which were, respectively, denoted as(1)A=xACyACzACB=xBCyBCzBCC=xCCyCCzCC.When the valve casting coordinate system (V) is established,OV is the origin of coordinates, vector AB⇀ is the x-axis, the normal vector of the plane formed by A, B, and C is z-axis, and the y-axis is determined according to the right-hand rule.The body casting coordinate system (V) can be regarded as the coordinate system which coincides with the camera coordinate system (C) after rotation and translation. Rotation is the change of attitude, which can be represented by a 3 × 3 rotation matrix, denoted byRVC; translation is the change of the origin, which is represented by a vector of 3 × 1, and the origin of the valve casting coordinate system (V) is OV, which is denoted as OCV in the camera coordinate system (C); then,(2)OVC=xAC+xBC2yAC+yBC2zAC+zBC2.The unit vector on thex-axis of the body casting coordinate system (V) is denoted by eVxC in (C); then,(3)eVxC=AB⇀AB⇀.We connect CA and CB in the camera coordinate system (C) to construct vectorsCA⇀ and CB⇀; then, the vector corresponding to z-axis of the body casting coordinate system (V) in the camera coordinate system (C) is the cross-product of these two vectors, and the unit vector of the z-axis of the body casting coordinate system (V)is denoted by eVzC in the camera coordinate system (C); then,(4)eVzC=CA⇀×CB⇀CA⇀×CB⇀.The unit vector of they-axis of the body casting coordinate system (V) is denoted by eVyC in the camera coordinate system (C); then, eVyC is the cross product between the two unit vectors, which are the x-axis and the z-axis of the body casting coordinate system (V) in the camera coordinate system (C) vector; then,(5)eVyC=eVzC×eVxC.In the camera coordinate system, the unit vector ofx, y, and z-axis can be expressed as(6)eCx=100eCy=010eCz=001.Then, the elements in the rotation matrixRVC can be represented by the dot product between unit vectors eVxC, eVyC, and eVzC and unit vectors eCx, eCy, and eCz, when eVxC, eVyC, and eVzC are the unit vectors of x, y, and z-axis of the body casting coordinate system (V) in the camera coordinate system (C) and eCx, eCy, and eCz are unit vectors of the x, y, and z-axis of the camera coordinate system; then,(7)RVC=eCx⋅eVxCeCx⋅eVyCeCx⋅eVzCeCy⋅eVxCeCy⋅eVyCeCy⋅eVzCeCz⋅eVxCeCz⋅eVyCeCz⋅eVzC.


### 3.3. Transformation Relationship between Robot Tool Coordinate System (R) and Camera Coordinate System (C)

The tool coordinate system (R) is at the end of the robot which is formulated by the robot manufacturer. A positioning pin hole and a positioning stopper are at the end of robot, origin of coordinates is the center of the stopper,x-axis is the line between the center of the pin hole and the center of the stopper whose direction is from the center of the pin hole to the center of the stopper, z-axis is the axis direction, and y-axis is determined by the right-hand rule as aforementioned. The robot can be accurately positioned through the convex platform and the positioning pin hole of the flange.In the stereo vision system, the traditional method to determine the coordinate transformation relationship between the robot and the camera is complicated and difficult to implement; therefore, this paper will adopt the following methods to establish this relationship. A T-type calibration rod is processed and manufactured, the corresponding T-groove, the positioning pin hole, and the thread hole are processed along thex and y-axis of the tool coordinates on the positioning flange. Two marking balls D and E are placed on the T-type calibration rod along the x-axis direction, to ensure that D and E are symmetrically arranged on both sides of the origin of the robot coordinates, and two marking balls are placed along the y-axis. The coordinates of marking balls D, E, F, and G in the camera coordinate system can be obtained with the camera; the transformation relationship between the tool coordinate system (R) and the camera coordinate system (C) is established according to the similar method in Section 3.2.The robot coordinate system (R) is obtained from the camera coordinate system (C) after rotation and translation. It represents the change of attitude, which can be represented by a 3 × 3 rotation matrix, denoted byRRC. Translation is the change of origin, denoted by a 3 × 1 vector, and the coordinates of the origin OR of the robot tool coordinate system (R) are COR in the camera coordinate system (C).The midpoints ofD and E are taken as the coordinate origin OR of the robot tool coordinate system (R), and the coordinate of OR in the camera coordinate system (C) is OCR; then,(8)ORC=xDC+xEC2yDC+yEC2zDC+zEC2.The unit vector on thex-axis of the robot coordinate system (R) is indicated in the camera coordinate system (C) as(9)eRxC=DE⇀DE⇀.The unit vector on they-axis of the robot coordinate system (R) is indicated in the camera coordinate system (C) as(10)eRyC=FG⇀FG⇀.The unit vector on thez-axis of the robot coordinate system (R) is eRzC in the camera coordinate system (C); it can be obtained from the cross product of eRxC and eRyC; then,(11)eRzC=eRyC×eRxC.Elements in the rotation matrixRVC is the dot product between two unit vectors, in which one is the unit vector of each coordinate axis of the robot tool coordinate system (R) in the camera coordinate system (C) denoted by eRxC, eRyC, and eRzC and another is the unit vector of the x, y, and z axes of the camera coordinate denoted by eCx,eCy,andeCz; then,(12)RRC=eCx⋅eRxCeCx⋅eRyCeCx⋅eRzCeCy⋅eRxCeCy⋅eRyCeCy⋅eRzCeCz⋅eRxCeCz⋅eRyCeCz⋅eRzC.


### 3.4. Transformation Relationship between the Positioning Plate Coordinate System (P) and Robot Tool Coordinate System (R)

The positioning plate is positioned on the flange through two pin holes; in this way, the position and attitude between the positioning plate and the robot are fixed. We establish the coordinate system (P) of the positioning disk and take the line between the center of the two pin holes of the positioning disk as thex-axis, the vertical orientation of the positioning plate is the z-axis, the y-axis is determined according to the right-hand rule, and the center of the positioning plate is taken as the origin of the coordinates OP. When the coordinate system of the positioning plate is established in this way, its x and y axes are parallel to the x and y axes of the robot tool coordinate system and their z-axis overlaps. There is only translation between the positioning plate coordinate system (P) and the robot tool coordinate system (R), and there is no rotation of the coordinate axis. The rotation transformation matrix is an identity matrix, denoted by(13)RPR=100010001.When the thickness of the position plate ishp and the thickness of the flange plate is hf, the coordinates of the origin of the positioning plate coordinate system (P) in the robot tool coordinate system (R) can be denoted by(14)OPR=00−hp+hf.


### 3.5. Transformation Relationship between the Robot Tool Coordinate System (R) and the Valve Coordinate System (V)

The function of the positioning system is to make the robot drive the positioning plate to move from the initial position to the upper side of the valve. At this time, the xoy plane of the positioning plate coordinate (P) is parallel to the xoy plane of the valve coordinate (V), and theZ axis coincides. The distance of the origins of the coordinates is H, in which H = h + f. Then, the translational motion of the robot can be regarded as moving from its initial position to H+hp+hf on the z-axis of the body frame (V). Then, only the transformation relationship between the camera coordinate system (C), valve coordinate system (V), and the robot coordinate system (R) needs to be considered.The robot coordinate (R) overlaps with the camera coordinate system after rotation and translation and then moves again to the origin of the robot coordinate (R) to the point P; itsZ axis coincides with the z-axis of the body coordinate system; its x-axis and y-axis are, respectively, parallel to the x-axis and y-axis of the body coordinate system (V), and the x-axis and y-axis are parallel to the x-axis and y-axis of the valve coordinate system (V).Then, the transformation relation between the robot coordinate system (R) and the valve coordinate system (V) can be established.The rotation transformation matrix between the valve coordinate system (V) and the robot coordinate system (R) is denoted byRVR; then,(15)RVR=RCR×RVC=RRCT×RVC.The coordinate of P in the valve coordinate systemV is PV; then,(16)PV=00H+hp+hf.The coordinate of P in the camera coordinate systemC is PR; then,(17)PC=RVCVP+OCV.The coordinate of P in the robot coordinate systemR is PR; then,(18)PR=RRCTPC−OCR.By substituting equation (17) into equation (18), we get(19)PR=RRCTRVCPV+OCV−OCR.


## 3.1. Establishment of the Camera Coordinate System (C)

The camera system is a multicamera stereo vision system [17–29] composed of 4 infrared cameras, which can measure the object’s coordinates in 3D space. Calibration software and calibration devices are provided by the manufacturer. After the camera is installed and the working space is determined, the establishment of camera coordinate system (C) can be quickly completed according to the manufacturer’s instructions and software. The establishment process will not be described in detail in this paper. The camera coordinate system (C) is the bridge to link other coordinate systems, the establishment and the transformation relationship of the other coordinate systems are realized by establishing the transformation relationship between the body casting coordinate systems (V) and (C), the transformation relationship between the robot coordinates (R) and (C), and the transformation relationship between the location plate coordinates (P) and (C). The motion parameters of the robot are calculated according to these transformation relations.


## 3.2. Transformation Relationship between the Body Casting Coordinate System (V) and the Camera Coordinate System (C)

Three circular convex platforms are casted according to design reference, on which are placed the reflective marking balls A, B, and C; the midpoint of the connection between A and B isOV, and we make sure that COv⊥AB when casting. The coordinates of the three reflective marker balls in camera coordinates were obtained by camera shooting, which were, respectively, denoted as(1)A=xACyACzACB=xBCyBCzBCC=xCCyCCzCC.When the valve casting coordinate system (V) is established,OV is the origin of coordinates, vector AB⇀ is the x-axis, the normal vector of the plane formed by A, B, and C is z-axis, and the y-axis is determined according to the right-hand rule.The body casting coordinate system (V) can be regarded as the coordinate system which coincides with the camera coordinate system (C) after rotation and translation. Rotation is the change of attitude, which can be represented by a 3 × 3 rotation matrix, denoted byRVC; translation is the change of the origin, which is represented by a vector of 3 × 1, and the origin of the valve casting coordinate system (V) is OV, which is denoted as OCV in the camera coordinate system (C); then,(2)OVC=xAC+xBC2yAC+yBC2zAC+zBC2.The unit vector on thex-axis of the body casting coordinate system (V) is denoted by eVxC in (C); then,(3)eVxC=AB⇀AB⇀.We connect CA and CB in the camera coordinate system (C) to construct vectorsCA⇀ and CB⇀; then, the vector corresponding to z-axis of the body casting coordinate system (V) in the camera coordinate system (C) is the cross-product of these two vectors, and the unit vector of the z-axis of the body casting coordinate system (V)is denoted by eVzC in the camera coordinate system (C); then,(4)eVzC=CA⇀×CB⇀CA⇀×CB⇀.The unit vector of they-axis of the body casting coordinate system (V) is denoted by eVyC in the camera coordinate system (C); then, eVyC is the cross product between the two unit vectors, which are the x-axis and the z-axis of the body casting coordinate system (V) in the camera coordinate system (C) vector; then,(5)eVyC=eVzC×eVxC.In the camera coordinate system, the unit vector ofx, y, and z-axis can be expressed as(6)eCx=100eCy=010eCz=001.Then, the elements in the rotation matrixRVC can be represented by the dot product between unit vectors eVxC, eVyC, and eVzC and unit vectors eCx, eCy, and eCz, when eVxC, eVyC, and eVzC are the unit vectors of x, y, and z-axis of the body casting coordinate system (V) in the camera coordinate system (C) and eCx, eCy, and eCz are unit vectors of the x, y, and z-axis of the camera coordinate system; then,(7)RVC=eCx⋅eVxCeCx⋅eVyCeCx⋅eVzCeCy⋅eVxCeCy⋅eVyCeCy⋅eVzCeCz⋅eVxCeCz⋅eVyCeCz⋅eVzC.


## 3.3. Transformation Relationship between Robot Tool Coordinate System (R) and Camera Coordinate System (C)

The tool coordinate system (R) is at the end of the robot which is formulated by the robot manufacturer. A positioning pin hole and a positioning stopper are at the end of robot, origin of coordinates is the center of the stopper,x-axis is the line between the center of the pin hole and the center of the stopper whose direction is from the center of the pin hole to the center of the stopper, z-axis is the axis direction, and y-axis is determined by the right-hand rule as aforementioned. The robot can be accurately positioned through the convex platform and the positioning pin hole of the flange.In the stereo vision system, the traditional method to determine the coordinate transformation relationship between the robot and the camera is complicated and difficult to implement; therefore, this paper will adopt the following methods to establish this relationship. A T-type calibration rod is processed and manufactured, the corresponding T-groove, the positioning pin hole, and the thread hole are processed along thex and y-axis of the tool coordinates on the positioning flange. Two marking balls D and E are placed on the T-type calibration rod along the x-axis direction, to ensure that D and E are symmetrically arranged on both sides of the origin of the robot coordinates, and two marking balls are placed along the y-axis. The coordinates of marking balls D, E, F, and G in the camera coordinate system can be obtained with the camera; the transformation relationship between the tool coordinate system (R) and the camera coordinate system (C) is established according to the similar method in Section 3.2.The robot coordinate system (R) is obtained from the camera coordinate system (C) after rotation and translation. It represents the change of attitude, which can be represented by a 3 × 3 rotation matrix, denoted byRRC. Translation is the change of origin, denoted by a 3 × 1 vector, and the coordinates of the origin OR of the robot tool coordinate system (R) are COR in the camera coordinate system (C).The midpoints ofD and E are taken as the coordinate origin OR of the robot tool coordinate system (R), and the coordinate of OR in the camera coordinate system (C) is OCR; then,(8)ORC=xDC+xEC2yDC+yEC2zDC+zEC2.The unit vector on thex-axis of the robot coordinate system (R) is indicated in the camera coordinate system (C) as(9)eRxC=DE⇀DE⇀.The unit vector on they-axis of the robot coordinate system (R) is indicated in the camera coordinate system (C) as(10)eRyC=FG⇀FG⇀.The unit vector on thez-axis of the robot coordinate system (R) is eRzC in the camera coordinate system (C); it can be obtained from the cross product of eRxC and eRyC; then,(11)eRzC=eRyC×eRxC.Elements in the rotation matrixRVC is the dot product between two unit vectors, in which one is the unit vector of each coordinate axis of the robot tool coordinate system (R) in the camera coordinate system (C) denoted by eRxC, eRyC, and eRzC and another is the unit vector of the x, y, and z axes of the camera coordinate denoted by eCx,eCy,andeCz; then,(12)RRC=eCx⋅eRxCeCx⋅eRyCeCx⋅eRzCeCy⋅eRxCeCy⋅eRyCeCy⋅eRzCeCz⋅eRxCeCz⋅eRyCeCz⋅eRzC.


## 3.4. Transformation Relationship between the Positioning Plate Coordinate System (P) and Robot Tool Coordinate System (R)

The positioning plate is positioned on the flange through two pin holes; in this way, the position and attitude between the positioning plate and the robot are fixed. We establish the coordinate system (P) of the positioning disk and take the line between the center of the two pin holes of the positioning disk as thex-axis, the vertical orientation of the positioning plate is the z-axis, the y-axis is determined according to the right-hand rule, and the center of the positioning plate is taken as the origin of the coordinates OP. When the coordinate system of the positioning plate is established in this way, its x and y axes are parallel to the x and y axes of the robot tool coordinate system and their z-axis overlaps. There is only translation between the positioning plate coordinate system (P) and the robot tool coordinate system (R), and there is no rotation of the coordinate axis. The rotation transformation matrix is an identity matrix, denoted by(13)RPR=100010001.When the thickness of the position plate ishp and the thickness of the flange plate is hf, the coordinates of the origin of the positioning plate coordinate system (P) in the robot tool coordinate system (R) can be denoted by(14)OPR=00−hp+hf.


## 3.5. Transformation Relationship between the Robot Tool Coordinate System (R) and the Valve Coordinate System (V)

The function of the positioning system is to make the robot drive the positioning plate to move from the initial position to the upper side of the valve. At this time, the xoy plane of the positioning plate coordinate (P) is parallel to the xoy plane of the valve coordinate (V), and theZ axis coincides. The distance of the origins of the coordinates is H, in which H = h + f. Then, the translational motion of the robot can be regarded as moving from its initial position to H+hp+hf on the z-axis of the body frame (V). Then, only the transformation relationship between the camera coordinate system (C), valve coordinate system (V), and the robot coordinate system (R) needs to be considered.The robot coordinate (R) overlaps with the camera coordinate system after rotation and translation and then moves again to the origin of the robot coordinate (R) to the point P; itsZ axis coincides with the z-axis of the body coordinate system; its x-axis and y-axis are, respectively, parallel to the x-axis and y-axis of the body coordinate system (V), and the x-axis and y-axis are parallel to the x-axis and y-axis of the valve coordinate system (V).Then, the transformation relation between the robot coordinate system (R) and the valve coordinate system (V) can be established.The rotation transformation matrix between the valve coordinate system (V) and the robot coordinate system (R) is denoted byRVR; then,(15)RVR=RCR×RVC=RRCT×RVC.The coordinate of P in the valve coordinate systemV is PV; then,(16)PV=00H+hp+hf.The coordinate of P in the camera coordinate systemC is PR; then,(17)PC=RVCVP+OCV.The coordinate of P in the robot coordinate systemR is PR; then,(18)PR=RRCTPC−OCR.By substituting equation (17) into equation (18), we get(19)PR=RRCTRVCPV+OCV−OCR.


## 4. Calculation of the Robot Motion Parameters

According to the transformation relationship between the robot tool coordinate system (R) and the valve coordinate system (V), the motion parameters of the robot from the initial position and attitude adjusting to the same position and attitude with the valve can be calculated.The adjustment of robot attitude is achieved by rotation anglesγ, β, and α around xR, yR, and zR of the robot tool coordinate system; then, positioning between the positioning disc and the valve can be calculated as(20)γ=Atan2RVR3,2,RVR3,3,β=Atan2−RVR3,1,RVR1,12+RVR2,12,α=Atan2RVR2,1,RVR1,1.The robot’s translation ofxR,yR,andzR along the tool coordinate system (R) is , Δx,Δy,Δz.(21)Δx=PR1,Δy=PR2,Δz=PR3.After calculation, the motion parameters of the robot are sent to the robot controller through industrial Ethernet and the positioning between the positioning disc and the valve can be realized according to the motion parameters.


## 5. Practical Application of the Positioning System

The positioning system is established, including 4 infrared cameras, Kawasaki robot, and computer. As a lot of matrix calculations are involved in the positioning algorithm, MATLAB 2017 software is installed on the computer to realize the positioning algorithm and provide a human-computer interaction environment.The operation process is as follows: Click “static calibration” button to realize automatic calculation of the rotation matrixRRC and the translation vector PRC between the robot tool coordinate system (R) and the camera coordinate system (C). During the positioning operation, enter the valve code and the height difference H between the locating disc and the corresponding valve; thickness hp and flange thickness hf are automatically retrieved from the Excel table by the system. The “Start” button is used to start the positioning system to read coordinates from the camera, calculate the movement parameters of the robot, and control the robot move to the upper side of the valve to achieve positioning. The “Reset” button is used to reset the robot to its initial position and attitude. Parameters of the new valve or modified parameters of the old valve can be saved into the Excel sheet by clicking “Save” button, and click the “Save” button.In order to verify the accuracy of the positioning method, a cross laser is installed on the positioning disk and the experiments are as follows: (1) the repeat positioning accuracy test: fix the valve in a certain position, repeat the positioning process for 10 times, and observe the center position of the cross cursor and the deflection angle of the cross line; (2) the random positioning accuracy test: move the valve randomly, change its position and attitude, change the position and attitude of the valve, and observe the center position of the cross cursor and the deflection of the cross line in every motion.


## 6. The Error Evaluation Method

In order to evaluate the precision of repeat, after the first position, mark the center and the projection line of cross laser on the valve castings (solid linesx and y and point O). The deviation of the projection line and the center (dotted linesx∧′ and y∧′ and point O′) from the first projection line and center was compared in the subsequent positioning.In the deviation between the cross laser, the translation error is evaluated by the distanceOO′ and the angle positioning error is evaluated by θ. According to the geometric relationship, it can be calculated as(22)θ=tan−1OO′OOR,where OOR=H+hp+hf.In the test, the thickness of the positioning plate ishp=40mm, the thickness of the flange is hf=40mm, and the positioning height is H=200mm, and then OOR=H+hp+hf=280mm.The data of the repeat positioning accuracy test are shown in Table1, and the experimental data of the random positioning accuracy test are shown in Table 2.Table 1
The repeat positioning accuracy test.
Times12345678910OO′ (mm)0.5−0.61.90.41.31.6−1.1−1.2−0.90.2θ (℃)0.1−0.120.40.080.260.32−0.23−0.25−0.180.04Table 2
The random positioning accuracy test.
Times12345678910OO′ (mm)−2.4−0.06−1.842.37−2.41−2.70.3411.6−1.12−1.92θ (℃)−0.49−0.01−0.380.48−0.49−0.510.070.33−0.23−0.39The test results show the following: (1) in the repeat positioning accuracy test, the position error is within ±2 mm and the angle positioning error is within ±0.5°C; (2) in the random positioning accuracy test, the position error is also controlled within ±3 mm and the angle positioning error is controlled within ±1°C. The results show that the positioning method is effective.


## 7. Conclusion

To solve the problem of locating the valve on cutting equipment in automatic cutting of pouring riser after valve casting, a positioning system integrating stereo vision, robot, and information processing technology for automatic pouring riser cutting of valve casting was designed, using the principle and method of coordinate transformation. We establish a coordinate relationship between the rotation and translation by fixing the coordinate system of the valve castings, positioning plate, robot, and camera. We calculated the motion parameters of robot in the working space and realized that the positioning plate can be positioned to the upper side of the same type valve casting with the same position and attitude. The experimental results and the actual cutting show that the proposed positioning method has high positioning accuracy, satisfies the cutting accuracy requirements of valve castings, and has a wide application prospect.



---

*Source: 4663213-2022-08-27.xml*