Workpiece inspection and calibration methods, systems, devices, computer equipment, and storage media
By acquiring laser measurement data of the workpiece, establishing a model, and performing screening and grading, the correction path and parameters are determined, solving the problems of low accuracy and efficiency in traditional workpiece correction, and achieving high-precision and high-efficiency workpiece correction.
Patent Information
- Application Number
- CN202311132283.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-09-04
AI Technical Summary
Traditional workpiece straightening processes cannot accurately obtain the degree of deformation, resulting in inaccurate straightening results and limited types, making them difficult to apply to various types of workpieces, and resulting in low straightening accuracy and efficiency.
By acquiring laser measurement data of the workpiece, a model to be calibrated is established, compared with a standard model to determine the initial calibration data, qualified areas are screened and area levels are divided, the target calibration path and parameters are determined, and a robot is used for calibration.
It improves the accuracy and efficiency of workpiece alignment, reduces labor costs, avoids workpiece damage, and is applicable to various types of workpieces.
Smart Images

Figure CN119554999B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of manufacturing technology, and in particular to a workpiece inspection and calibration method, system, apparatus, computer equipment, and storage medium. Background Technology
[0002] With the development of manufacturing technology, due to the special characteristics of materials, the special requirements for dimensional accuracy and flatness, it is often difficult to meet the standard requirements in workpiece manufacturing. The straightening process has emerged, which uses special equipment to induce plastic deformation in the workpiece and has gradually become an important part of the workpiece manufacturing process.
[0003] In traditional techniques, the straightening process usually involves applying uncontrollable pressure, and the range of motion of special equipment is limited. In addition, the degree of deformation of the workpiece cannot be accurately obtained before straightening, which limits the types of workpieces that can be straightened and results in inaccurate straightening results.
[0004] Therefore, there is an urgent need in related technologies for a method that can be applied to various types of workpieces and improve the accuracy and efficiency of workpiece shaping. Summary of the Invention
[0005] Therefore, it is necessary to provide a workpiece inspection and calibration method, apparatus, computer equipment, and computer-readable storage medium that can improve the accuracy and efficiency of workpiece calibration, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a method for inspecting and correcting a workpiece. The method includes:
[0007] Acquire laser measurement data of the workpiece to be shaped, and establish a model to be shaped based on the laser measurement data;
[0008] By comparing the model to be calibrated with the standard model, initial calibration data is obtained, which includes calibration amount and initial calibration area;
[0009] The initial calibration data is sequentially filtered for qualified areas and classified into regional levels to determine the target calibration area and the corresponding target calibration area level.
[0010] The target correction path and correction parameters are determined based on the target area to be corrected and the level of the target area to be corrected;
[0011] The workpiece to be calibrated is calibrated based on the target calibration path and calibration parameters.
[0012] Optionally, in one embodiment of this application, acquiring the laser measurement data of the workpiece to be shaped includes:
[0013] If the width of the workpiece to be shaped is within the range of the laser, then the three-dimensional data of the workpiece to be shaped can be directly obtained.
[0014] If the width of the workpiece to be shaped exceeds the range of the laser, then the measurement data is obtained by region, and the region measurement data is stitched together to obtain the three-dimensional data of the workpiece to be shaped.
[0015] Optionally, in one embodiment of this application, comparing the model to be calibrated with the standard model to obtain initial calibration data includes:
[0016] By comparing the three-dimensional data of the standard model and the model to be corrected, the initial regions to be corrected and the corresponding correction amounts in each direction are obtained.
[0017] Optionally, in one embodiment of this application, the step of sequentially screening qualified regions and classifying regions according to their levels in the initial calibration data to determine the target region to be calibrated and the corresponding target region to be calibrated level includes:
[0018] By comparing the correction amount with the acceptable deformation amount, the initial area to be corrected is screened, acceptable points are eliminated, and the target area to be corrected is determined.
[0019] The target area to be corrected is divided based on the correction amount, and the level of the target area to be corrected is determined.
[0020] Optionally, in one embodiment of this application, after determining the target correction path and correction parameters based on the target area to be corrected and the target area to be corrected level, the method further includes:
[0021] The intermediate points of the path are eliminated based on the target correction path.
[0022] Optionally, in one embodiment of this application, the process of acquiring laser measurement data of the workpiece to be calibrated includes:
[0023] Determine the target laser measurement method based on the shape of the workpiece to be calibrated;
[0024] The workpiece to be shaped is measured using the target laser measurement method.
[0025] Secondly, this application also provides a workpiece inspection and calibration system, including a workpiece shape measurement module, a data processing module, and a robot calibration module, wherein:
[0026] The workpiece shape measurement module is used to perform laser measurement on the workpiece to be calibrated, acquire laser measurement data of the workpiece to be calibrated, establish a model to be calibrated based on the laser measurement data, compare the model to be calibrated with the standard model to obtain initial calibration data, the initial calibration data includes calibration amount and initial calibration area, and send the initial calibration data to the data processing module.
[0027] The data processing module is used to sequentially filter qualified areas and classify areas into levels in the initial calibration data, determine the target calibration area and the corresponding target calibration area level; determine the target calibration path and calibration parameters based on the target calibration area and the target calibration area level; and send the target calibration path and calibration parameters to the robot calibration module.
[0028] The robot calibration module is used to calibrate the workpiece to be calibrated based on the target calibration path and calibration parameters.
[0029] Thirdly, this application also provides a workpiece inspection and alignment device. The device includes:
[0030] The model establishment module is used to acquire laser measurement data of the workpiece to be aligned and to establish a model to be aligned based on the laser measurement data.
[0031] The initial calibration data acquisition module is used to compare the model to be calibrated with the standard model to obtain initial calibration data, which includes calibration amount and initial calibration area;
[0032] The target correction area determination module is used to sequentially filter qualified areas and classify the areas into levels from the initial correction data, and determine the target correction area and the corresponding target correction area level.
[0033] The target calibration data determination module is used to determine the target calibration path and calibration parameters based on the target calibration area and the target calibration area level;
[0034] The calibration module is used to calibrate the workpiece to be calibrated based on the target calibration path and calibration parameters.
[0035] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the steps of the methods described in the various embodiments above.
[0036] Fifthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the methods described in the various embodiments above.
[0037] The aforementioned workpiece inspection and calibration method, system, apparatus, computer equipment, and storage medium first acquire laser measurement data of the workpiece to be calibrated, establish a calibration model based on the laser measurement data, then compare the calibration model with a standard model to obtain initial calibration data, which includes calibration amount and initial calibration area. Next, the initial calibration data is sequentially screened for qualified areas and classified into regional levels to determine the target calibration area and its corresponding level. Then, based on the target calibration area and its level, the target calibration path and calibration parameters are determined. Finally, the workpiece to be calibrated is calibrated based on the target calibration path and calibration parameters. In other words, when inspecting and calibrating flat or cylindrical workpieces, the calibration data can be initially determined by measuring three-dimensional data and comparing it with standard data. The calibration data can be further subdivided through qualified area screening and regional level classification, while also reducing labor costs, avoiding workpiece damage, and having a wide range of applicability. Attached Figure Description
[0038] Figure 1 This is an application environment diagram of the workpiece inspection and correction method in one embodiment;
[0039] Figure 2 This is a flowchart illustrating a workpiece inspection and calibration method in one embodiment;
[0040] Figure 3 This is a flowchart illustrating the steps for determining the target laser measurement method in one embodiment;
[0041] Figure 4 This is a schematic diagram of a workpiece inspection and correction system in one embodiment;
[0042] Figure 5 This is a flowchart illustrating the operation of the slide motor in one embodiment;
[0043] Figure 6 This is a schematic diagram of scanning and detecting a flat workpiece in one embodiment;
[0044] Figure 7 This is a schematic diagram of the target alignment path in one embodiment;
[0045] Figure 8 This is a schematic diagram of the shaping of a flat workpiece in one embodiment;
[0046] Figure 9 This is a schematic diagram of the inspection and calibration of a cylindrical workpiece in one embodiment;
[0047] Figure 10 This is a structural block diagram of a workpiece inspection and alignment device in one embodiment;
[0048] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] The workpiece inspection and calibration method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0051] In one embodiment, such as Figure 2 As shown, a workpiece inspection and calibration method is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:
[0052] S201: Obtain laser measurement data of the workpiece to be shaped, and establish a model to be shaped based on the laser measurement data.
[0053] In this embodiment, firstly, laser measurement data of the workpiece to be shaped is acquired, and a model to be shaped is established based on the laser measurement data. The workpiece to be shaped can be a flat workpiece such as a metal plate or a cylindrical workpiece such as a wheel rim. The laser measurement data is depth data, width data, length data, or angle data obtained by laser scanning of the workpiece. Based on any combination of depth data, width data, length data, or depth data, width data, and angle data, a three-dimensional model of either the flat or cylindrical workpiece to be shaped is established.
[0054] S203: Compare the model to be calibrated with the standard model to obtain initial calibration data, which includes calibration amount and initial calibration area.
[0055] In this embodiment of the application, after establishing the model to be calibrated, the model to be calibrated is compared with the standard model, that is, the established flat plate-shaped three-dimensional model to be calibrated is compared with the flat plate-shaped standard three-dimensional model, or the cylindrical three-dimensional model to be calibrated is compared with the cylindrical standard three-dimensional model. Based on the comparison results of the three-dimensional data, the area to be calibrated and the deformation amount of the workpiece are determined, and the corresponding initial calibration data are obtained, including the calibration amount and the initial area to be calibrated. The calibration amount corresponds to the deformation amount of the workpiece, and the initial area to be calibrated is composed of multiple calibration points.
[0056] S205: The initial calibration data is sequentially filtered for qualified regions and classified into regions to determine the target region to be calibrated and the corresponding target region to be calibrated level.
[0057] In this embodiment, after obtaining the initial calibration data, the initial calibration data is specifically judged, including qualified area screening and area level classification, thereby determining the target calibration area and the corresponding target calibration area level. When calibrating points with a large calibration amount, it will affect points with a smaller calibration amount. Therefore, some points with a small calibration amount can be filtered out by qualified area screening. The screening criteria can be set manually. Then, the remaining points to be calibrated are classified into levels. The classification can be based on the distance between the points to be calibrated, the average number of points to be calibrated, or the calibration amount of the points to be calibrated, finally obtaining the target calibration area and the corresponding target calibration area level.
[0058] S207: Determine the target correction path and correction parameters based on the target area to be corrected and the target area to be corrected level.
[0059] In this embodiment, after determining the target area to be calibrated and its corresponding level, a target calibration path is determined based on the target area. Specifically, the three-dimensional coordinates of each point to be calibrated in the target area can be used to connect the points to obtain straight line segments. Multiple straight line segments can then be combined to obtain the processing path, i.e., the target calibration path. Simultaneously, calibration parameters are determined based on the level of the target area to be calibrated. Different levels correspond to different calibration parameters, i.e., different calibration tools or calibration methods.
[0060] S209: The workpiece to be calibrated is calibrated based on the target calibration path and calibration parameters.
[0061] In this embodiment of the application, after determining the target straightening path and straightening parameters, the target straightening path is converted into a robot motion path, and process parameters are selected according to the straightening parameters to straighten the workpiece to be straightened.
[0062] In the above-mentioned workpiece inspection and calibration method, firstly, laser measurement data of the workpiece to be calibrated is acquired, and a calibration model is established based on the laser measurement data. Then, the calibration model is compared with a standard model to obtain initial calibration data, which includes calibration amount and initial calibration area. Next, the initial calibration data is sequentially screened for qualified areas and classified into regional levels to determine the target calibration area and its corresponding level. Then, based on the target calibration area and its level, the target calibration path and calibration parameters are determined. Finally, the workpiece to be calibrated is calibrated based on the target calibration path and calibration parameters. In other words, when inspecting and calibrating flat or cylindrical workpieces, the calibration data can be initially determined by measuring three-dimensional data and comparing it with standard data. Further subdivision of the calibration data through qualified area screening and regional level classification not only improves the accuracy and efficiency of workpiece calibration but also reduces labor costs, avoids workpiece damage, and has a wide range of applicability.
[0063] In one embodiment of this application, acquiring laser measurement data of the workpiece to be shaped includes:
[0064] S301: If the width of the workpiece to be shaped is within the range of the laser, then the three-dimensional data of the workpiece to be shaped is directly obtained.
[0065] S303: If the width of the workpiece to be shaped exceeds the range of the laser, then regional measurement data is obtained by dividing the area into zones, and the regional measurement data is stitched together to obtain the three-dimensional data of the workpiece to be shaped.
[0066] In one embodiment of this application, when performing laser scanning on a workpiece to be calibrated, if the width of the workpiece is within the laser's range, the three-dimensional data of the workpiece is directly acquired. Specifically, taking a flat workpiece as an example, if the width L of the flat workpiece is within the laser's range L... laser Within a given range, laser scanning can automatically obtain depth data z and width data y. The laser scans at a constant speed v above the flat workpiece, with a laser sampling frequency of f and a scanning time of t. Therefore, the length of the flat workpiece is... A 3D model of a flat workpiece can be established using the [x, y, z] 3D data. If the width of the workpiece to be calibrated exceeds the laser's measurement range, then regional measurement data is acquired and stitched together to obtain the 3D data of the workpiece. In a specific application, taking a flat workpiece as an example, if the width L of the flat workpiece exceeds the laser's measurement range L... laser The total number of scans is then n = L / L laserAccordingly, the flat workpiece is divided into n regions according to the laser range, and the laser scans each region accordingly. Similarly, the scanning is performed at a constant speed v, the laser sampling frequency is f, and the scanning time is t. Then, the length of the flat workpiece... After the scanning is complete, the depth data z, width data y, and length data x are summarized and stitched together to obtain the complete three-dimensional data [x, y, z] of the flat workpiece.
[0067] In this embodiment, by using different methods to perform laser scanning on the workpiece to be calibrated according to different situations, it is possible to ensure that the measured three-dimensional data of the workpiece to be calibrated is complete and accurate.
[0068] In one embodiment of this application, comparing the model to be calibrated with the standard model to obtain initial calibration data includes:
[0069] By comparing the three-dimensional data of the standard model and the model to be corrected, the initial regions to be corrected and the corresponding correction amounts in each direction are obtained.
[0070] In one embodiment of this application, the depth, width, length, or angle of the workpiece may deform. Therefore, when comparing the model to be calibrated with the standard model, the three-dimensional data of the standard model and the model to be calibrated are compared respectively. That is, the deformation is judged from different dimensions such as depth, width, length, or angle, and the area to be calibrated in each direction and the amount of deformation are determined to obtain the corresponding initial calibration data, including the calibration amount and the initial area to be calibrated. The calibration amount corresponds to the amount of deformation, and the initial area to be calibrated is composed of multiple calibration points.
[0071] In this embodiment, by comprehensively considering the deformation of various dimensions and comparing the model as a whole, the integrity and accuracy of the scanning and detection results can be guaranteed.
[0072] In one embodiment of this application, the step of sequentially filtering qualified regions and classifying regions according to their levels in the initial calibration data to determine the target region to be calibrated and the corresponding target region level includes:
[0073] S401: Compare the correction amount with the qualified deformation amount, screen the initial area to be corrected, remove qualified points, and determine the target area to be corrected.
[0074] S403: Divide the target area to be calibrated based on the calibration amount and determine the level of the target area to be calibrated.
[0075] In one embodiment of this application, firstly, an initial area to be calibrated is screened, and a qualified deformation amount is set. The calibration amount and the qualified deformation amount are compared sequentially for each calibration point. When the calibration amount ≤ the qualified deformation amount, the point is considered qualified and requires no calibration; when the calibration amount > the qualified deformation amount, the point is considered unqualified and requires calibration. By judging each point individually, the initial area to be calibrated is divided into qualified and unqualified areas. The qualified area consists of multiple qualified points, and the unqualified area consists of multiple unqualified points. Then, qualified points are removed, and only unqualified points are retained. The corresponding unqualified areas are determined as the target area to be calibrated. Next, the target area to be calibrated is further divided according to the calibration amount, that is, according to different degrees of deformation, unqualified points are divided into multiple deformation intervals. Each deformation interval corresponds to different shot peening process parameters, i.e., different target areas to be calibrated correspond to different levels.
[0076] In this embodiment, by comparing the correction amount with the qualified deformation amount, the initial area to be corrected is screened, qualified points are eliminated, and the target area to be corrected is determined. The target area to be corrected is divided based on the correction amount, and the level of the target area to be corrected is determined. This can obtain more accurate data to be corrected, resulting in better workpiece correction effect.
[0077] In one embodiment of this application, after determining the target correction path and correction parameters based on the target area to be corrected and the target area to be corrected level, the method further includes:
[0078] The intermediate points of the path are eliminated based on the target correction path.
[0079] In one embodiment of this application, the target correction path determined based on the target area to be corrected contains hundreds or thousands of points, but the shape of the workpiece changes very little within each path segment. Therefore, the intermediate points of each correction path are removed, and only the beginning and end points of each path segment are retained, that is, the key points of each target correction path.
[0080] In this embodiment, by eliminating intermediate points in the target correction path, the amount of data in the target correction path can be greatly reduced, thereby reducing the number of repeated responses from the correction execution machine.
[0081] In one embodiment of this application, the process of acquiring laser measurement data of the workpiece to be shaped includes:
[0082] S501: Determine the target laser measurement method based on the shape of the workpiece to be calibrated.
[0083] S503: Measure the workpiece to be shaped based on the target laser measurement method.
[0084] In one embodiment of this application, such as Figure 3As shown, the workpiece to be calibrated can be a flat workpiece such as a metal plate or a cylindrical workpiece such as a wheel rim. The corresponding target laser measurement method is determined based on the shape of the workpiece, and the workpiece is measured using this method. In specific applications, if the workpiece is flat, the target laser measurement method involves the robot's end flange automatically changing the tool to a 2D line laser via a quick-change fixture. The flat workpiece is placed flat on the tool table, and the robot's motion trajectory is programmed to drive the 2D line laser, thus enabling scanning of flat workpieces of various sizes. If the workpiece is cylindrical, the target laser measurement method involves a 2D line laser mounted on a laser lifting slide, which can move up and down. Simultaneously, a turntable clamps and rotates the cylindrical workpiece, enabling 360-degree full-range scanning of the cylindrical workpiece. This overcomes the scanning length limitation of the 2D line laser itself, allowing for the scanning of various long cylindrical workpieces.
[0085] In this embodiment, the target laser measurement method is determined based on the shape of the workpiece to be calibrated, and the workpiece to be calibrated is measured based on the target laser measurement method, which enables the measurement of a wide variety of different workpieces to be calibrated.
[0086] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0087] In one embodiment, such as Figure 4 As shown, a workpiece inspection and calibration system is provided, including a workpiece shape measurement module, a data processing module, and a robot calibration module, wherein:
[0088] S601: The workpiece shape measurement module is used to perform laser measurement on the workpiece to be calibrated, obtain laser measurement data of the workpiece to be calibrated, establish a model to be calibrated based on the laser measurement data, compare the model to be calibrated with the standard model to obtain initial calibration data, the initial calibration data includes calibration amount and initial calibration area, and send the initial calibration data to the data processing module.
[0089] In this embodiment, the workpiece shape measurement module is mainly used to perform laser measurement on the workpiece to be calibrated, and to establish a model to be calibrated based on the obtained laser measurement data. It then compares the model to be calibrated with a standard model to obtain initial calibration data and sends it to the data processing module. Specifically, the workpiece shape measurement module is divided into a plate measurement program and a cylinder measurement program, both of which include a motor drive control subroutine, a 2D line laser measurement subroutine, and a point cloud data preprocessing subroutine. The motor drive control subroutine controls the laser lifting slide motor to adjust the 2D line laser measurement position and controls the turntable motor to drive the turntable rotation. A cRIO-9045 real-time controller is used as the motor drive controller, communicating with the industrial computer and the NI-9512 motion control module to generate drive pulses and achieve motor drive control. Figure 5 As shown, taking the laser lifting slide motor as an example, when the laser lifting slide motor starts working, the `power` function is called to enable the NI-9512 module's `Drive Enable+` terminal in the cRIO to output a signal, enabling the motor driver and electromagnetic brake, thus completing motor initialization. Subsequently, the `Straight Line Move` attribute node of the motor drive axis is called, controlling the `Direction` (CCW) terminal to output a signal to the motor driver to determine the motor's direction of motion. The `Step` (CW) outputs drive pulses to the motor driver; the output frequency and number of drive pulses affect the motor's speed and displacement. The `Read Status` attribute node of the motor drive axis is called to calculate and read the motor's speed and position. Finally, the `Stop Move` function block disables the motor. The laser lifting slide motor drives the slide movement via a ball screw, achieving adjustment of the 2D line laser measurement position. The turntable motor drives the turntable rotation via a reducer, achieving rotational scanning of cylindrical workpieces. The industrial control computer communicates with the cRIO-9045, sharing the variables `slide position`, `slide`, `stop slide`, and `slide complete` over the network to achieve drive control and motion status acquisition of the laser lifting slide. The control principle of the turntable motor is similar to that of the laser lifting slide motor, so it will not be elaborated here.
[0090] The 2D line laser measurement subroutine primarily operates on a 2D line laser and laser mounting equipment. The 2D line laser can simultaneously scan the surface depth (z) and width (y) of a workpiece. Optionally, for flat workpieces, the laser mounting equipment includes robots and quick-change fixtures; for cylindrical workpieces, it includes a laser lifting slide. The 2D line laser measurement subroutine performs laser measurements on the workpiece to be calibrated and sends the measurement data to a point cloud data preprocessing subroutine. This preprocessing subroutine then builds a model to be calibrated based on the measurement data and compares it with a standard model to obtain initial calibration data, which is then sent to the data processing module.
[0091] S603: The data processing module is used to sequentially filter qualified areas and classify area levels in the initial calibration data to determine the target calibration area and the corresponding target calibration area level; determine the target calibration path and calibration parameters based on the target calibration area and the target calibration area level; and send the target calibration path and calibration parameters to the robot calibration module.
[0092] In this embodiment, the data processing module is mainly used to sequentially filter qualified areas and classify areas into levels for the initial calibration data, determine the target calibration area and the corresponding target calibration area level; and obtain the target calibration path and calibration parameters based on the target calibration area and target calibration area level and send them to the robot calibration module. Specifically, the data processing module includes a data rearrangement and bundling subroutine, a qualified area judgment subroutine, a processing area division subroutine, a processing path generation subroutine, and an invalid data removal subroutine. The initial calibration data sent by the point cloud data preprocessing subroutine is input into the data processing module in the form of a table file. Each sub-table in the table file corresponds to four types of data: X coordinate, Y coordinate, Z coordinate, and deformation amount of each point on the workpiece surface. The data rearrangement and bundling program needs to bundle the relevant data of tens of millions of points in the table, index out the X, Y, Z coordinates and deformation amount of the same point scattered in the corresponding positions of each sub-table, and then bundle them into "groups". Each "group" represents the X, Y, Z coordinates and deformation amount information of each point. Next, the data's dot matrix format needs to be rearranged into a single column so that subsequent programs can read the relevant information of each point in sequence.
[0093] The qualified area judgment subroutine compares the correction amount with the qualified deformation amount, filters the initial areas to be corrected, and determines the target areas to be corrected. The processing area division subroutine divides the target areas to be corrected based on the correction amount and determines the level of the target areas to be corrected. The processing path generation subroutine determines the target correction path based on the target areas to be corrected. Taking a flat workpiece as an example, since the X, Y, and Z coordinates of each point on the workpiece surface are known, where Z is used to calculate the deformation amount by comparing with a standard part, and the X and Y coordinates are used for positioning, the processing path can be obtained based on, but not limited to, the Y coordinate as a reference. iThe processing path is obtained by connecting the points (y1) to form a straight line segment, and then changing the Y-coordinate at certain intervals. Since a straight line segment connected at the same Y-coordinate may traverse multiple processing areas, this program also identifies and divides the straight line segments to ensure that each processing path is within the same processing area. The invalid data removal subroutine mainly includes qualified point removal and path midpoint removal. Qualified point removal is used because points within the area are qualified and do not require processing, thus reducing the amount of data. Path midpoint removal removes the midpoints of each processing path, retaining only the start and end points of each path segment, i.e., the key points of each processing path.
[0094] S605: The robot calibration module is used to calibrate the workpiece to be calibrated based on the target calibration path and calibration parameters.
[0095] In this embodiment, the robot alignment module is mainly used to align the workpiece to be aligned based on the target alignment path and alignment parameters. Specifically, the robot alignment module includes a robot motion subroutine, an automatic tool switching subroutine, and a workpiece alignment subroutine. The workpiece alignment subroutine is used to convert the target alignment path into a robot motion path, and simultaneously uses the built-in process package to select process parameters according to the alignment parameters and send switching commands to automatically align each area of the workpiece to be aligned.
[0096] The robot motion subroutine is used to control the robot's motion trajectory according to the robot's motion path. Communication between the industrial computer, Beckhoff module, KUKA robot, and control cabinet is established via LabVIEW. The industrial robot uses a KR C4 series control cabinet, which supports PLC as a host computer. Therefore, the LabVIEW platform is used to simulate PLC control, thereby realizing the motion control of the industrial robot. In the KUKA control cabinet system environment, the official KUKA software package supporting PLC and the UDP communication port are called to communicate with the toolbox under the LabVIEW platform, establishing a connection between the industrial computer and the KUKA control cabinet, and realizing the effective transmission of robot motion commands between the two. Any complex motion of the industrial robot can be composed of point-to-point motion (PTP), linear motion (LINE), and curvilinear motion (CIRCULAR). By inputting the coordinates of key trajectory points, i.e., the robot's motion path, and using the KUKA control cabinet's own trajectory planning algorithm in CP mode (Continuous Path Mode), the KUKA robot motion trajectory is programmed, realizing continuous trajectory processing of the robot.
[0097] The automatic tool switching subroutine is used to switch the calibration tool according to the switching command. Specifically, according to the different needs of each stage, the tool is automatically changed through a pneumatic quick-change device, such as 2D line laser, ultrasonic shot peening guns of different specifications, etc. When automatically switching to a specified tool, the coordinates of the robot's key trajectory points and the reference coordinates of the robot's end effector reaching the specified workstation are read. Safety signals are verified: end face detection signal, locking detection signal, loosening detection signal, and tool detection signal. When all signals are normal, the vacuum pump air source is turned on through the solenoid valve, the quick-change device loosens the female head to remove the tool, and at the same time reaches the workstation of the tool to be replaced, completing the tool switching and sending the robot's motion status to the industrial control computer. When the safety signal is abnormal, the emergency protection state is entered, the robot's motion is terminated, and the operator is required to troubleshoot the fault.
[0098] In one embodiment, such as Figure 4 As shown, the workpiece inspection and alignment system also includes an industrial control computer module. This module, developed in the LabVIEW environment, employs a queued message state machine architecture combined with a Compact RIO module to achieve communication and collaborative control between the industrial robot and peripheral devices. The queued message state machine defines various states through custom enumeration data types, including at least four states: initialization, idle, exit, and blank. Other states can be freely defined by the user. The initialization state is the start state of the state machine, responsible for hardware and software initialization, such as initializing shift registers, opening files, reading configuration information, and opening hardware devices. After the initialization state is completed, it automatically enters the idle state. The idle state is the default state, responsible for responding to various operations and data requests in the program. The exit state is used to terminate the queued message state machine and perform cleanup tasks, such as closing files and shutting down hardware devices. The queued message state machine determines the state transition order based on the working state, accompanied by necessary data communication. The Compact RIO control module is a product of NI. Industrial PCs can use the Compact RIO module (hereinafter referred to as cRIO), Ethernet module, Real-Time module, etc. in LabVIEW software to simultaneously control the movement of equipment in the workpiece shape measurement module, data processing module, and robot calibration module, such as the rotation of motors of gimbals and turntables, and the switching of solenoid valves.
[0099] The specific steps of the workpiece inspection and calibration method of this application are illustrated below with a concrete embodiment. Figure 6As shown, taking a flat metal plate as an example, firstly, in step S701, the target laser measurement method is determined based on the shape of the workpiece to be shaped. Then, in step S703, the workpiece to be shaped is measured based on the target laser measurement method. A 2D line laser 61 is installed at the end effector of the robot using a quick-change fixture. The scanning path is controlled by programming the robot to achieve the measurement of the workpiece's shape. Next, in step S705, the laser measurement data of the workpiece to be shaped is acquired. A model to be shaped is established based on the laser measurement data, and the Cartesian coordinate system of the robot base is set to {R}, and the workpiece coordinate system is set to {G}. At this point, the width L of the plate exceeds the laser's measurement range L. laser The total number of scans is n = L / L laser Accordingly, the workpiece is divided into three regions according to the laser range. The robotic arm 63 connects to the line laser 61 via the quick-change fixture 62. Starting from the beginning of the first region, the centerline of the line laser 61 is ensured to be perpendicular to the surface of the workpiece 64, allowing the line laser 61 to scan uniformly along the X-axis at a speed v. The laser sampling frequency is f, and the scanning time is t. Then, the length of the workpiece... During subsequent region scanning, it is necessary to ensure that the x and z coordinates of the scanning starting point are consistent. Assume the data from the i-th scan passes through [x... i y i , z i The scanned data are arranged sequentially, and the point cloud data is stitched together to obtain the final 3D data of the board. At the same time, the workpiece data is automatically saved, and a three-dimensional model of the plate can be built based on the three-dimensional data.
[0100] Next, in step S707, the model to be corrected is compared with the standard model to obtain initial correction data. The initial correction data includes the correction amount and the initial area to be corrected. After obtaining the complete scanned 3D model, the entire 3D data [x,y,z] is compared with the standard 3D model data [x,y,Z] item by item. Considering only the deformation of the plate's depth, the correction amount of the plate is Δz = Zz, and the machining allowance of the entire plate is (x,y,Δz). The location of the machining area can be determined by (x,y).
[0101] Then, in steps S709-S715, the correction amount is compared with the acceptable deformation amount, the initial area to be corrected is screened, acceptable points are removed, the target area to be corrected is determined, the target area to be corrected is divided based on the correction amount, the target area to be corrected is determined, the target area to be corrected is determined, the target area to be corrected and the target area to be corrected are determined based on the target area to be corrected and the target area to be corrected, the target correction path and correction parameters are determined, and intermediate points of the path are removed based on the target correction path. Figure 7 As shown, the data is automatically divided into multi-level processing areas based on the calibration amount, and processing paths are automatically generated, which are then converted into usable data that can be directly imported into the robot calibration module.
[0102] Finally, in step S717, the workpiece to be calibrated is calibrated based on the target calibration path and calibration parameters. For example... Figure 8 As shown, the coordinates of the origin of {G} in {R} are (X... g ,Y g Z g The industrial computer 86 controls the robot arm 83 to move to the coordinate (X) according to the coordinate system {R} via the Compact RIO module 87. g ,Y g Z g At point ), the robot arm 83 moves to the corresponding processing area (x,y) according to the workpiece coordinate system {G}; the industrial control computer 86 instructs the robot to automatically switch tools, changing to the ultrasonic shot peening gun 81, and then automatically selects the ultrasonic shot peening process parameters in the process package according to the workpiece's correction amount Δz. Then, through the Compact RIO module 87, it sends instructions to control the robot to use quick-change tooling to clamp the ultrasonic shot peening gun 81 to correct the processing area. The ultrasonic shot peening gun can use a high-speed impact needle flow to impact the surface of the workpiece to be corrected, causing the impacted surface and its underlying metal material to undergo plastic deformation and extend, thereby gradually causing the surface of the workpiece to undergo bidirectional bending deformation that bulges towards the peening surface, thus realizing the correction processing of the metal sheet.
[0103] The specific steps of the workpiece inspection and calibration method of this application are described below using another specific embodiment. Figure 9 As shown, taking a cylindrical workpiece hub as an example, firstly, in step S801, the target laser measurement method is determined based on the shape of the workpiece to be shaped. Then, in step S803, the workpiece to be shaped is measured based on the target laser measurement method. A 2D line laser 92 is mounted on a lifting slide 91, and the hub 93 is fixed on a turntable 94. The workpiece shape is measured by the movement of the lifting slide 91 and the turntable 94. Next, in step S805, the laser measurement data of the workpiece to be shaped is acquired. A model to be shaped is established based on the laser measurement data. The Cartesian coordinate system of the robot base is set to {R}, and the workpiece coordinate system is set to {G}. At this point, the width L of the rim exceeds the laser's measurement range L. laser The total number of scans is then n = L / L laser Accordingly, the wheel hub is divided into two regions according to the laser range. A 2D line laser 92 scans each region of the wheel hub 93 via a lifting slide 91. The wheel hub 93 is mounted on a wheel hub clamping table 94 and rotates at a constant angular velocity w. A full rotation is 360°. With a laser sampling frequency of f, the angle of the wheel hub is... Assume the data from the i-th scan is obtained through [θ] i y i , z iThe scanned data are arranged sequentially, and the point cloud data is stitched together to obtain the final 3D data of the wheel hub. Simultaneously, the workpiece data is automatically saved, and a complete 3D scanning model of the wheel hub can be obtained based on the 3D data.
[0104] Next, in step S807, the model to be corrected is compared with the standard model to obtain initial correction data. The initial correction data includes the correction amount and the initial area to be corrected. After obtaining the complete scanned 3D model, the entire 3D data [θ, y, z] is compared with the standard 3D model data [Θ, y, z] item by item. Considering only the deformation of the surface depth of the wheel hub, the correction amount of the wheel hub is Δz = Zz, and the machining allowance of the entire wheel hub is (θ, y, Δz). The location of the machining area can be determined by (θ, y).
[0105] Then, in steps S809-S815, the correction amount is compared with the acceptable deformation amount, the initial area to be corrected is screened, acceptable points are removed, the target area to be corrected is determined, the target area to be corrected is divided based on the correction amount, the target area to be corrected is determined, the target area to be corrected is determined, the target area to be corrected and the target area to be corrected are determined based on the target area to be corrected and the target area to be corrected are determined, the target correction path and correction parameters are determined, and intermediate points of the path are removed based on the target correction path. Similarly, as... Figure 7 As shown, the data is automatically divided into multi-level processing areas based on the calibration amount, and processing paths are automatically generated, which are then converted into usable data that can be directly imported into the robot calibration module.
[0106] Finally, in step S817, the workpiece to be calibrated is calibrated based on the target calibration path and calibration parameters. The coordinates of the origin of {G} in {R} are (X... g ,Y g Z g The industrial computer 98 controls the robot arm 97 to move to coordinate (X) according to coordinate system {R} via the Compact RIO module 99. g ,Y g Z g At point C, the robotic arm 97 moves to point (θ,y) with point C as the center. The industrial control computer 98 automatically selects the ultrasonic shot peening process parameters in the process package according to the workpiece's correction amount Δz. Then, it sends instructions through the Compact RIO module 99 to control the robot to clamp the ultrasonic shot peening gun 95 with quick-change tooling to correct the processing area. The ultrasonic shot peening gun can use a high-speed impact needle flow to impact the surface of the workpiece to be corrected, causing the impacted surface and its underlying metal material to undergo plastic deformation and extend, thereby gradually causing the surface of the workpiece to undergo bidirectional bending deformation that bulges towards the peening surface, thus realizing the correction process of the wheel hub.
[0107] Based on the same inventive concept, this application also provides a workpiece inspection and calibration apparatus for implementing the workpiece inspection and calibration method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more workpiece inspection and calibration apparatus embodiments provided below can be found in the limitations of the workpiece inspection and calibration method described above, and will not be repeated here.
[0108] In one embodiment, such as Figure 10 As shown, a workpiece inspection and straightening device 1000 is provided, including: a straightening model establishment module 1001, an initial straightening data acquisition module 1003, a target straightening area determination module 1005, a target straightening data determination module 1007, and a straightening module 1009, wherein:
[0109] The model establishment module 1001 is used to acquire laser measurement data of the workpiece to be aligned and establish a model to be aligned based on the laser measurement data.
[0110] The initial calibration data acquisition module 1003 is used to compare the model to be calibrated with the standard model to obtain initial calibration data, which includes calibration amount and initial calibration area.
[0111] The target correction area determination module 1005 is used to sequentially filter qualified areas and classify the area levels of the initial correction data to determine the target correction area and the corresponding target correction area level.
[0112] The target calibration data determination module 1007 is used to determine the target calibration path and calibration parameters based on the target calibration area and the target calibration area level.
[0113] The correction module 1009 is used to correct the workpiece to be corrected based on the target correction path and correction parameters.
[0114] In one embodiment of this application, the calibration model building module is further configured to:
[0115] If the width of the workpiece to be shaped is within the range of the laser, then the three-dimensional data of the workpiece to be shaped can be directly obtained.
[0116] If the width of the workpiece to be shaped exceeds the range of the laser, then the measurement data is obtained by region, and the region measurement data is stitched together to obtain the three-dimensional data of the workpiece to be shaped.
[0117] In one embodiment of this application, the initial calibration data acquisition module is further configured to:
[0118] By comparing the three-dimensional data of the standard model and the model to be corrected, the initial regions to be corrected and the corresponding correction amounts in each direction are obtained.
[0119] In one embodiment of this application, the target correction area determination module is further configured to:
[0120] By comparing the correction amount with the acceptable deformation amount, the initial area to be corrected is screened, acceptable points are eliminated, and the target area to be corrected is determined.
[0121] The target area to be corrected is divided based on the correction amount, and the level of the target area to be corrected is determined.
[0122] The workpiece inspection and calibration device also includes an invalid data rejection module.
[0123] In one embodiment of this application, the invalid data removal module is further configured to:
[0124] The intermediate points of the path are eliminated based on the target correction path.
[0125] The workpiece inspection and calibration device also includes a measurement mode selection module.
[0126] In one embodiment of this application, the measurement method selection module is further configured to:
[0127] Determine the target laser measurement method based on the shape of the workpiece to be calibrated;
[0128] The workpiece to be shaped is measured using the target laser measurement method.
[0129] Each module in the aforementioned workpiece inspection and alignment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0130] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 11As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a workpiece inspection and calibration method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0131] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0132] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0133] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0134] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0135] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0136] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method of workpiece inspection and straightening, comprising: The method comprises: obtaining laser measurement data of the workpiece to be calibrated, and establishing a model to be calibrated according to the laser measurement data; comparing the model to be calibrated with a standard model to obtain initial calibration data, wherein the initial calibration data comprises a calibration amount and an initial region to be calibrated; sequentially performing qualified region screening and region grade division on the initial calibration data to determine a target region to be calibrated and a corresponding target region grade to be calibrated; determining a target calibration path and calibration parameters based on the target region to be calibrated and the target region grade to be calibrated; calibrating the workpiece to be calibrated based on the target calibration path and the calibration parameters; the method for obtaining laser measurement data of the workpiece to be calibrated comprises: if the width of the workpiece to be calibrated is within the range of the laser, directly obtaining three-dimensional data of the workpiece to be calibrated; if the width of the workpiece to be calibrated exceeds the range of the laser, obtaining sub-region measurement data in a region-by-region manner, and splicing the sub-region measurement data to obtain three-dimensional data of the workpiece to be calibrated; the method for comparing the model to be calibrated with the standard model to obtain initial calibration data comprises: respectively comparing three-dimensional data of the standard model and the model to be calibrated to obtain an initial region to be calibrated in each direction and a corresponding calibration amount.
2. The method of claim 1, wherein, the method for sequentially performing qualified region screening and region grade division on the initial calibration data to determine a target region to be calibrated and a corresponding target region grade to be calibrated comprises: comparing the calibration amount with a qualified deformation amount, screening the initial region to be calibrated, eliminating qualified points, and determining a target region to be calibrated; dividing the target region to be calibrated based on the calibration amount to determine a target region grade to be calibrated.
3. The method of claim 1, wherein, after determining the target calibration path and the calibration parameters based on the target region to be calibrated and the target region grade to be calibrated, the method further comprises: eliminating intermediate points in the target calibration path.
4. The method of claim 1, wherein, before obtaining laser measurement data of the workpiece to be calibrated, the method comprises: determining a target laser measurement method based on the shape of the workpiece to be calibrated; measuring the workpiece to be calibrated based on the target laser measurement method.
5. A workpiece inspection and straightening system, comprising: The method comprises a workpiece topography measurement module, a data processing module, and a robot calibration module, wherein: the workpiece topography measurement module is configured to perform laser measurement on the workpiece to be calibrated, obtain laser measurement data of the workpiece to be calibrated, establish a model to be calibrated according to the laser measurement data, compare the model to be calibrated with a standard model, obtain initial calibration data, and send the initial calibration data to the data processing module, wherein the initial calibration data comprises a calibration amount and an initial region to be calibrated; the data processing module is configured to sequentially perform qualified region screening and region grade division on the initial calibration data, determine a target region to be calibrated and a corresponding target region grade to be calibrated, determine a target calibration path and calibration parameters based on the target region to be calibrated and the target region grade to be calibrated, and send the target calibration path and the calibration parameters to the robot calibration module; the robot calibration module is configured to calibrate the workpiece to be calibrated based on the target calibration path and the calibration parameters. The workpiece profile measurement module is further configured to: if the width of the workpiece to be calibrated is within the range of the laser, directly acquire three-dimensional data of the workpiece to be calibrated; if the width of the workpiece to be calibrated exceeds the range of the laser, acquire sub-region measurement data in a region-by-region manner, and splice the sub-region measurement data to obtain the three-dimensional data of the workpiece to be calibrated. The workpiece profile measurement module is further configured to respectively compare the three-dimensional data of the standard model and the workpiece to be calibrated to obtain initial workpiece-to-be-calibrated regions in each direction and corresponding calibration amounts.
6. A workpiece inspection and straightening apparatus characterized by comprising: The device comprises: A calibration model establishing module configured to acquire laser measurement data of a workpiece to be calibrated, and establish a workpiece-to-be-calibrated model according to the laser measurement data; An initial calibration data acquiring module configured to compare the workpiece-to-be-calibrated model and a standard model to obtain initial calibration data, the initial calibration data including calibration amounts and initial workpiece-to-be-calibrated regions; A target calibration region determining module configured to sequentially perform qualified region screening and region grade division on the initial calibration data, and determine target workpiece-to-be-calibrated regions and corresponding target workpiece-to-be-calibrated region grades; A target calibration data determining module configured to determine a target calibration path and calibration parameters based on the target workpiece-to-be-calibrated regions and target workpiece-to-be-calibrated region grades; A calibration module configured to calibrate the workpiece to be calibrated based on the target calibration path and calibration parameters; The calibration model establishing module is further configured to: if the width of the workpiece to be calibrated is within the range of the laser, directly acquire three-dimensional data of the workpiece to be calibrated; if the width of the workpiece to be calibrated exceeds the range of the laser, acquire sub-region measurement data in a region-by-region manner, and splice the sub-region measurement data to obtain the three-dimensional data of the workpiece to be calibrated. The initial calibration data acquiring module is further configured to respectively compare the three-dimensional data of the standard model and the workpiece to be calibrated to obtain initial workpiece-to-be-calibrated regions in each direction and corresponding calibration amounts. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 4.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Workpiece shape correcting method and workpiece shape correcting device
CN113042577A