CN-121980704-A - Automatic calculation method and device for workpiece leveling quantity based on visual positioning
Abstract
The invention provides a visual positioning-based automatic calculation method and device for leveling quantity of a workpiece, wherein the method comprises the steps of performing high-precision visual target positioning on the workpiece to obtain a coordinate of a target point under a camera coordinate system, performing machine tool coordinate conversion by utilizing obtained coordinate information to obtain machine tool coordinates, performing leveling quantity calculation and suggested leveling quantity on the machine tool coordinates by using a seesaw algorithm, writing the leveling quantity into a leveling device, obtaining target point coordinates of a lower end face, testing whether leveling is performed, obtaining target coordinates of an upper end face, calculating centers and characteristic quantities of the upper end face and the lower end face, comparing and evaluating the workpiece characteristic quantity with drawing characteristic quantities, if evaluation is not qualified, calculating the leveling quantity of the lower end face, if evaluation is qualified, obtaining the center of the lower end face by using a four-point coordinate diagonal line of the calculated lower end face, calculating a busbar aligning angle of the workpiece, writing the obtained aligning angle into a machine tool system, rotating a turntable by the angle to enable the workpiece to be opposite, and completing alignment before workpiece processing.
Inventors
- Chen Die
- FAN MINGJIANG
- SA JIMING
- LI YAN
- WANG XIAO
- YU HANYAN
- HAN YONG
- HUANG XIAOGANG
- GUO BIN
- YUAN YUAN
- HUANG YECHEN
Assignees
- 武汉重型机床集团有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260127
Claims (10)
- 1. The automatic calculation method for the workpiece leveling quantity based on visual positioning is characterized by comprising the following steps of: Performing high-precision visual target positioning on a workpiece, and performing target arrangement and visual image acquisition to obtain the coordinates of a target point under a camera coordinate system; Converting the machine tool coordinates by using the obtained coordinate information to obtain machine tool coordinates for leveling calculation; Performing leveling quantity calculation and suggesting leveling quantity on the machine tool coordinates by using a teeterboard algorithm, and writing the leveling quantity into a leveling device; Acquiring target coordinates of the lower end face, testing whether leveling is performed, acquiring target coordinates of the upper end face, and calculating centers and characteristic quantities of the upper end face and the lower end face; And if the evaluation is qualified, obtaining the center of the lower end face by a calculated four-point coordinate diagonal line of the lower end face, calculating the correction angle of a bus on the side of the workpiece, writing the obtained correction angle into a machine tool system, and rotating a turntable by the angle to enable the workpiece to be opposite to each other, thereby completing the alignment before the workpiece is processed.
- 2. The automated workpiece leveling metrology calculation method based on visual localization of claim 1, wherein the performing target placement and visual image acquisition comprises: And arranging a plurality of optical target points with high contrast at contour characteristic positions of a preset processing area on the surface of a workpiece, collecting global images containing all the target points through an industrial camera fixed on a machine tool motion axis, extracting initial pixel coordinates of each target point based on a characteristic matching algorithm, and obtaining the coordinates of the target points under a camera coordinate system through internal parameters of the camera by the initial pixel coordinates.
- 3. The automated workpiece leveling quantity calculation method based on visual positioning according to claim 1, wherein the performing machine coordinate transformation using the obtained coordinate information, obtaining machine coordinates for leveling calculation, comprises: And converting the obtained camera coordinates of the workpiece into coordinates under a machine tool coordinate system through a camera external parameter rotation-translation matrix obtained through camera external parameter calibration, performing circle fitting through discrete target points to obtain the center of a fitting circle, considering the center as the intersection point of the end face and the side generatrix, and recording the coordinates of each intersection point.
- 4. The automated workpiece leveling calculation method based on visual positioning according to claim 1, wherein the calculating the leveling amount for the machine tool coordinates using a see-saw algorithm comprises: And selecting the highest point in the Y direction from the coordinates of the intersection point of the obtained workpiece side generatrix and the lower contour line under the coordinate system of the machine tool, taking the highest point as zero, and carrying out difference making on the Y-direction coordinates of the other three points and the Y-direction coordinates of the highest point to obtain a height difference value.
- 5. The automated workpiece leveling calculation method based on visual positioning according to claim 4, wherein the leveling calculation of machine coordinates using a see-saw algorithm further comprises: Setting the intersection point of the side bus and the lower contour line as the highest point, and carrying out upward leveling operation on the opposite point of the highest point to make the value of the opposite point zero; Taking a median value after adding two adjacent points, lifting the adjacent point with low height to the median value, and lowering the adjacent point with low height to the median value so as to make the values of the two adjacent points equal; subtracting the corresponding coordinate point obtained by the point coordinates of the inverting operation from the latest coordinate point to obtain the leveling quantity of each point, and adding the calculated leveling quantity and the supporting height of the original hydraulic cylinder supporting wedge block to obtain the final leveling quantity.
- 6. The automated workpiece leveling quantity calculation method based on visual positioning according to claim 1, wherein suggesting leveling quantities for machine tool coordinates using a see-saw algorithm comprises: after the coordinates of the target center point are obtained, the height difference of the alignment center point, namely the alignment difference, is calculated, the height difference between the current center point and the left or right center point is calculated, namely the adjacent position difference, and the bottom surface of the workpiece is judged by the maximum alignment difference and the maximum adjacent position difference.
- 7. The automated workpiece leveling method of claim 6, wherein determining the bottom surface of the workpiece from the maximum alignment difference and the maximum ortho-position difference comprises: and if the lower end face is not qualified, the leveling quantity is recalculated, leveling is carried out, and the lower end face is returned to the coordinate measurement verification again.
- 8. The automated workpiece leveling quantity calculation method based on visual positioning according to claim 1, wherein the calculating the workpiece side busbar return angle from the calculated four-point coordinate diagonal line of the lower end surface to obtain the lower end surface center comprises: And calculating the diagonal line of the four points of the lower end surface to obtain a lower end surface center O, calculating the X and Z coordinates of the lower end surface center O and the side bus intersection point P1, and calculating a rotation angle which enables the X coordinates of the side bus intersection point P1 to be equal to the X coordinates of the lower end surface center O, wherein the angle is the angle of aligning the No. 1 side bus and facing the cutter head.
- 9. The automated workpiece leveling quantity calculation method based on visual positioning according to claim 8, wherein the calculating a rotation angle that makes the X-coordinate of the side busbar intersection point P1 equal to the X-coordinate of the lower end face center O includes: based on the four intersection points of the obtained lower end surface and the side bus ; Constructing two straight lines, and calculating the intersection point of the two straight lines, wherein the average height in the Y direction and the intersection point of the two straight lines is the coordinate of the center XYZ of the end face; an XOZ plane coordinate P of the center O of the lower end surface of the side bus intersection point P1 , ) And% , ) Obtaining the theoretical rotation angle of the B axis 。
- 10. Workpiece leveling quantity automatic calculation device based on visual positioning, which is characterized by comprising: the binocular high-precision industrial camera is used for carrying out high-precision visual target positioning on a workpiece and carrying out target arrangement and visual image acquisition; the PLC and the hydraulic leveling device are used for calculating and suggesting leveling quantities for machine tool coordinates by using a teeterboard algorithm, the leveling quantities are written into a hydraulic cylinder of the leveling device, and the PLC is responsible for receiving a leveling starting signal through communication with the master control software; The industrial personal computer and the communication switch thereof run general control software, display the current operation steps, display GUI for visual display and user control, utilize the obtained coordinate information to carry out machine coordinate conversion to obtain machine coordinates for leveling calculation, calculate leveling quantity and calculate the center and characteristic quantity of the upper and lower end faces; The machine tool numerical control system is communicated with the general control software OPCUA, controls the workpiece to rotate, shoots and operates, provides the machine tool coordinates currently shot by the industrial camera, writes the obtained alignment angle into the machine tool system, and rotates the turntable by the angle to align the workpiece before machining the workpiece.
Description
Automatic calculation method and device for workpiece leveling quantity based on visual positioning Technical Field The invention relates to the technical field of workpiece leveling, in particular to a visual positioning-based automatic calculation method and device for workpiece leveling quantity. Background With the rapid development of intelligent manufacturing, machine vision technology is used as a core part in the production process, and is becoming a key means for improving the production efficiency and the product quality. Traditional location is fixed a position through artifical use instrument, along with the demand increases constantly, and manual positioning measurement error is big, and complex operation and consuming time are long can't satisfy processing real time monitoring. In the field of precision machining, such as numerical control machine tool machining and precision part manufacturing, accurate positioning and clamping leveling of a workpiece are core preconditions for guaranteeing machining precision. Currently, the process mainly relies on manual operation or semi-automation means, and has significant limitations. The positioning of the machining point usually depends on the experience of an operator, uses a mechanical profiling, a locating pin or simple optical equipment for alignment, has low precision and efficiency, and is easily affected by human factors. The leveling process is to repeatedly measure the surface of the workpiece at multiple points by means of a dial indicator, a level gauge and other tools, and manually calculate the thickness of the gasket or adjust the inclination angle of the workbench, so that the time consumption is long and the requirement on the skill of an operator is high. And when the end face of the workpiece is in a shape of an inclined truncated cone, the traditional dial indicator 'rotary dial method' detection can not have rotational symmetry due to the inclined truncated cone, and the dial indicator reading can jump violently and irregularly during rotation, and can not be aligned by taking the outer circle as a reference. Although the existing semiautomatic leveling system can acquire workpiece inclination data, a leveling quantity calculation model is often too simplified, and the actual placement posture of a workpiece, deformation caused by clamping force, inherent geometric errors of a machine tool and design requirements of a specific machining surface cannot be comprehensively considered, so that a calculation result is deviated from a real machining requirement. Meanwhile, the traditional machining positioning is usually finished off-line before machining, and micro-changes and possible thermal deformation in the machining process cannot be responded in real time. The problem of insufficient precision is common in simple visual positioning, and positioning information cannot be effectively used for dynamic closed-loop control of leveling quantity. The problems of limited positioning precision, inaccurate leveling calculation and cutting of a positioning and leveling system directly lead to inaccurate establishment of a workpiece coordinate system, uneven distribution of machining allowance, extremely easy occurrence of over-cutting, under-cutting, inconsistent surface quality and the like, seriously affect Stability (Stability), accuracy (Accumacy) and repeatability (Repeatability) of machining quality, are particularly more prominent in machining of large, thin-wall or easily-deformed workpieces, increase rejection rate and rework cost, and become bottlenecks for restricting high-precision and high-efficiency automatic machining development. Therefore, an integrated intelligent system capable of realizing high-precision automatic positioning and calculating and controlling the workpiece leveling quantity in real time based on comprehensive working condition data is needed. Disclosure of Invention Aiming at the technical problems in the prior art, the invention provides a workpiece leveling quantity automatic calculation method and a device based on visual positioning, the invention relates to a processing point positioning and automatic workpiece leveling quantity calculation and control system based on high-precision visual positioning, a visual positioning system constructed by a multi-point target, based on the high-precision positioning of the processing point, the leveling quantity of the workpiece is calculated and adjusted in real time by comprehensively analyzing the workpiece placement condition and the machine tool data, so that the problems of low precision, large error, high cost and the like of the traditional processing are solved, and the processing efficiency and accuracy are improved. According to a first aspect of the present invention, there is provided a method for automatically calculating a workpiece leveling amount based on visual localization, comprising: Performing high-precision visual target positioning on a