Method for correcting coordinates of track points of five-axis dispensing machine based on industrial camera
The workpiece offset information is obtained through industrial cameras, and the trajectory point coordinates of the five-axis dispenser are modified by the transformation relationship between the machinery and workpiece coordinate system, which solves the problem of trajectory point adjustment caused by the difficulty of five-axis linkage dispensing programming and the change in the workpiece position, and improves the problem of trajectory point adjustment due to the difficulty of five-axis linkage dispensing programming, which is a problem of trajectory point adjustment caused by the change of workpiece position. The accuracy and debugging efficiency of the glue dispensing are achieved.
Patent Information
- Application Number
- CN202411774981.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The programming of five-axis linkage dispensing is difficult, and the slight change in the workpiece position makes it difficult to adjust the position of the track point. The existing methods require re-modification of all instructions, which takes a long time and may lead to offset errors.
The coordinate coordinate correction method of trajectory point of five-axis dispenser based on industrial cameras is used to create visual templates, obtain dispensing instructions, take pictures to obtain offset information, correct track point coordinates, and use the mechanical and workpiece coordinate system conversion relationship to calculate the corrected coordinates. , improve the accuracy and debugging efficiency of glue dispensing.
It realizes accurate correction of the coordinates of the trajectory point when the workpiece position changes, improves the accuracy of dispensing, reduces the difficulty and time of debugging, and is faster and more efficient than blind adjustment.
Smart Images

Figure CN119216183A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of glue dispensing technology, and in particular to a method for correcting track point coordinates of a five-axis glue dispensing machine based on an industrial camera. Background Art
[0002] For workpieces with complex surfaces, ordinary rectangular coordinate dispensing machines can no longer meet the needs of the dispensing process, while five-axis linkage dispensing can achieve high-precision dispensing processes for three-dimensional space and complex surface workpieces, but the programming of five-axis linkage dispensing is relatively difficult and time-consuming. The five-axis linkage dispensing method requires adding visual templates and dispensing track point instructions while keeping the position of the workpiece on the carrier unchanged. However, in the actual dispensing process debugging, it is often necessary to modify the position of a track point or add a new track point without changing other instructions. Since the position of the workpiece on the carrier will change slightly, when it is impossible to ensure that the workpiece is consistent with the position before the instruction was added, the position of the track point cannot be directly modified or a new track point cannot be added through teaching.
[0003] The commonly used method at present is to re-modify all instructions under the current workpiece state, but this method takes a long time for process debugging and may also cause offset errors in previously adjusted trajectory points; directly modifying the coordinate values of the trajectory points is a blind adjustment, which requires continuous attempts based on the actual dispensing effect. It is difficult to debug the dispensing process and the debugging efficiency is slow. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0005] To this end, the present invention provides a method for correcting the coordinates of trajectory points of a five-axis dispensing machine based on an industrial camera, which improves the accuracy of dispensing and the debugging efficiency.
[0006] According to the trajectory point coordinate correction method of a five-axis dispensing machine based on an industrial camera according to an embodiment of the present invention, the five-axis dispensing machine includes a camera, a workpiece carrier, a linear axis X-axis, a linear axis Y-axis, a linear axis Z-axis, a first rotation axis rotating around the linear axis Z-axis, and a second rotation axis rotating around the linear axis Y-axis. The first rotation axis is the C-axis, and the second rotation axis is the B-axis. Figure 1 As shown, the trajectory point coordinate correction method includes: Creating a first visual template of a standard workpiece under target requirements; Acquire a set dispensing instruction for a standard workpiece, wherein the dispensing instruction includes a plurality of standard trajectory points; Moving the camera to the workpiece carrier, taking a picture of the current workpiece placed on the workpiece carrier, and obtaining a workpiece image; Based on the first visual template, the workpiece image is processed by a visual positioning algorithm to obtain the offset information of the current workpiece; Correcting the standard trajectory point based on the offset information specifically includes: Select any standard track point A that needs to be corrected in the dispensing instruction i , obtain the standard trajectory point A i Corresponding to the actual trajectory point A on the current workpiece i ’ The mechanical coordinates of According to the conversion relationship between the mechanical coordinate system and the workpiece coordinate system, the actual trajectory point A i ’ The mechanical coordinates are converted to obtain the actual trajectory point A i ’ Workpiece coordinates; Based on the offset information and the actual trajectory point A i ’ The workpiece coordinates are calculated to calculate the corrected standard trajectory point A on the standard workpiece. i Workpiece coordinates; The corrected standard trajectory point A i The workpiece coordinates are converted to obtain the corrected standard trajectory point A i The mechanical coordinates of Set the standard track point A in the dispensing instruction i The mechanical coordinates and workpiece coordinates are modified to the corrected standard trajectory point A i The machine coordinates and workpiece coordinates are calculated and saved to complete the coordinate correction of the standard trajectory points in the workpiece dispensing instruction.
[0007] The beneficial effect of the present invention is that a method for correcting trajectory point coordinates of a five-axis dispensing machine based on an industrial camera can correct the mechanical coordinates and workpiece coordinates of the standard trajectory points according to the offset information of the current workpiece when the position of the workpiece on the workpiece carrier changes, thereby improving the accuracy of dispensing and reducing the difficulty of debugging compared to the existing blind adjustment method, and the debugging efficiency is fast.
[0008] According to one embodiment of the present invention, the actual trajectory point A i ’ The mechanical coordinates are obtained through teaching, including: By rotating the first rotating axis and the second rotating axis, the workpiece is moved to the preset dispensing posture, the linear axis X axis and the linear axis Y axis are moved to make the camera center at the preset dispensing position, and the linear axis Z axis is moved to make the camera take a clear picture, and the actual track point A at the preset dispensing position is obtained. i ’ The mechanical coordinates are expressed as , They correspond to the coordinate values of the X-axis, Y-axis, and X-axis of the mechanical coordinate system, respectively. is the rotation angle of the first rotation axis, is the rotation angle of the second rotation axis.
[0009] According to one embodiment of the present invention, the offset information of the current workpiece includes: in the pixel coordinate system, the pixel coordinate of the center of the second visual template of the current workpiece on the image , the rotation angle between the second visual template and the first visual template , xy Direction offset distance ; According to the pixel coordinates of the center of the second visual template on the image , calculate the mechanical coordinates of the second visual template center where the camera center is located at the current workpiece .
[0010] According to one embodiment of the present invention, the mechanical coordinate system is defined based on the origin positions of the linear axis X axis, the linear axis Y axis, and the linear axis Z axis; The current workpiece coordinate system is established with the point at the center of the second visual template, and the mechanical coordinates of the camera center at the origin of the current workpiece coordinate system are obtained by visual positioning and calibration: ; A standard workpiece coordinate system is established with the point at the center of the first visual template, and the direction of the standard workpiece coordinate system is consistent with the direction of the mechanical coordinate system; The first rotation axis coordinate system and the second rotation axis coordinate system are established respectively. The mechanical coordinates of the camera center located at the rotation center of the first rotation axis can be obtained by calibration. and the mechanical coordinates at the center of rotation of the second rotation axis A first rotation axis coordinate system is established with the rotation center of the first rotation axis as the origin, and a second rotation axis coordinate system is established with the rotation center of the second rotation axis as the origin; The direction of the current workpiece coordinate system, the standard workpiece coordinate system, the first rotation axis coordinate system and the second rotation axis coordinate system are all consistent with the direction of the mechanical coordinate system.
[0011] According to one embodiment of the present invention, based on the conversion relationship between the mechanical coordinate system and the workpiece coordinate system, the actual trajectory point A i ’ The mechanical coordinates are converted to obtain the actual trajectory point A i ’ The workpiece coordinates include: The actual trajectory point A i ’The mechanical coordinates of are transformed into the coordinates of the second rotation axis coordinate system through translation and rotation. The calculation formula is: ; The actual trajectory point A i ’ The coordinates of in the second rotation axis coordinate system are converted into the coordinates of in the first rotation axis coordinate system through translation and rotation. The calculation formula is: ; The actual trajectory point A i ’ The coordinates in the first rotation axis coordinate system are transformed into the coordinates in the current workpiece coordinate system through translation. The calculation formula is: .
[0012] According to one embodiment of the present invention, based on the offset information and the actual trajectory point A i ’ The workpiece coordinates are calculated to calculate the corrected standard trajectory point A i The workpiece coordinates include: According to the rotation angle between the second visual template and the first visual template , the actual trajectory point A i ’ The workpiece coordinates are transformed into the workpiece coordinates in the standard workpiece coordinate system by rotation. The calculation formula is: ; The actual trajectory point A i ’ The second rotation axis rotation angle is converted into the second rotation axis rotation angle in the standard workpiece coordinate system, and the actual trajectory point A i ’ The rotation angle of the second rotation axis in the standard workpiece coordinate system is ; The actual trajectory point A i ’ The first rotation axis rotation angle is converted into the first rotation axis rotation angle in the standard workpiece coordinate system, and the rotation angle between the second visual template and the first visual template is equal to the rotation angle between the current workpiece and the standard workpiece in the first rotation axis direction, that is, the actual trajectory point A i ’ The rotation angle of the first rotation axis in the standard workpiece coordinate system is ; Corrected standard trajectory point A i The workpiece coordinates are expressed as: .
[0013] According to one embodiment of the present invention, the corrected standard trajectory point Ai The workpiece coordinates are converted to obtain the corrected standard trajectory point A i The mechanical coordinates include: Based on the mechanical coordinates of the camera center at the center point of the standard workpiece vision template The mechanical coordinates of the camera center at the origin in the standard workpiece coordinate system are: ; The corrected standard trajectory point A i The workpiece coordinates are converted into the coordinates of the first rotation axis coordinate system. The calculation formula is: ; The corrected standard trajectory point A i The coordinates of the first rotation axis coordinate system of the standard workpiece are converted into the coordinates of the second rotation axis coordinate system. The calculation formula is: ; The corrected standard trajectory point A i The coordinates of the second rotation axis coordinate system of the standard workpiece are converted into mechanical coordinates. The calculation formula is: ; Based on the corrected standard trajectory point A i The rotation angle of the second rotation axis under the first visual template and the corrected standard trajectory point A i The rotation angle of the first rotation axis under the first visual template Update standard trajectory point A i The rotation angle is based on the corrected standard trajectory point A i Mechanical coordinates of the standard trajectory point A i Mechanical coordinates, modified standard trajectory point A i The mechanical coordinates are expressed as .
[0014] According to one embodiment of the present invention, the linear axis X axis, the linear axis Y axis, the linear axis Z axis, the first rotary axis and the second rotary axis are controlled to drive the dispensing valve to follow the mechanical coordinates of the corrected standard trajectory point. Carry out dispensing.
[0015] According to one embodiment of the present invention, the mechanical coordinates of the second visual template center where the camera center is located at the current workpiece are calculated. include: The mechanical coordinates of the current workpiece photography position are known , pixel coordinates of the center of the current workpiece image , the pixel coordinates of the center point of the second visual template of the current workpiece , the center of the camera is located at the mechanical coordinates of the center of the second visual template of the current workpiece The calculation formula is:
[0016]
[0017] in, is the pixel equivalent.
[0018] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0019] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0021] Figure 1 The figure is a schematic diagram of the method flow of the first embodiment of the present invention.
[0022] Figure 2 It is a schematic diagram of various offset information of the current workpiece in the pixel coordinate system according to the first embodiment of the present invention.
[0023] Figure 3 It is a schematic diagram of the five-axis relationship of the five-axis dispensing machine of the first embodiment of the present invention.
[0024] Figure 4 It is a schematic diagram of the structure of a computer device according to the second embodiment of the present invention.
[0025] In the figure, 10 is a computer device; 1002 is a processor; 1004 is a memory; and 1006 is a transmission device. DETAILED DESCRIPTION
[0026] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0027] Example 1 The embodiment of the present application provides a method for correcting the coordinates of trajectory points of a five-axis dispensing machine based on an industrial camera. The five-axis dispensing machine includes a camera, a workpiece carrier, a linear axis X-axis, a linear axis Y-axis, a linear axis Z-axis, a first rotation axis rotating around the linear axis Z-axis, and a second rotation axis rotating around the linear axis Y-axis. The first rotation axis is the C-axis and the second rotation axis is the B-axis. Figure 1 As shown, the trajectory point coordinate correction method includes: Step S1, creating a first visual template of a standard workpiece under target requirements; Step S2, obtaining a set dispensing instruction for a standard workpiece, wherein the dispensing instruction includes a plurality of standard trajectory points; Step S3, moving the camera to the workpiece carrier, taking a picture of the current workpiece placed on the workpiece carrier, and obtaining a workpiece image; Step S4, based on the first visual template, the workpiece image is processed by a visual positioning algorithm to obtain the offset information of the current workpiece; wherein, Figure 2 As shown, the offset information includes: in the pixel coordinate system, the pixel coordinate of the center of the second visual template of the current workpiece on the image , the rotation angle between the second visual template and the first visual template (that is, the placement position of the current workpiece relative to the placement position of the standard workpiece) , xy Direction offset distance ; Step S5, correcting the standard track point based on the offset information, specifically includes: S51, select any standard track point A that needs to be corrected in the dispensing instruction i , obtain the standard trajectory point A i Corresponding to the actual trajectory point A on the current workpiece i ’ The mechanical coordinates of S52, according to the conversion relationship between the machine coordinate system and the workpiece coordinate system, the actual trajectory point A i ’ The mechanical coordinates are converted to obtain the actual trajectory point A i ’ Workpiece coordinates; S53, based on the offset information and the actual track point A i ’ The workpiece coordinates are calculated to calculate the corrected standard trajectory point A on the standard workpiece. i Workpiece coordinates; S54, the corrected standard trajectory point A i The workpiece coordinates are converted to obtain the corrected standard trajectory point A i The mechanical coordinates of S55, the standard track point A in the dispensing instruction i The machine coordinates and workpiece coordinates are modified to form the corrected standard trajectory point A i The machine coordinates and workpiece coordinates are obtained and saved in the dispensing instruction to complete the coordinate correction of the standard trajectory points in the workpiece dispensing instruction.
[0028] In an embodiment, the pixel coordinates of the center of the second visual template on the image are also calculated. , calculate the mechanical coordinates of the camera center at the center of the second visual template of the current workpiece ; In other words, when the camera center moves to the center point of the second visual template of the current workpiece, the mechanical coordinates of the camera center are , the mechanical coordinates of the camera center is the coordinate in the mechanical coordinate system, and the calculation method includes: the mechanical coordinate of the current workpiece shooting position is known , pixel coordinates of the center of the current workpiece image , the pixel coordinates of the center point of the second visual template of the current workpiece , the center of the camera is located at the mechanical coordinates of the center of the second visual template of the current workpiece The calculation formula is:
[0029]
[0030] in, is the pixel equivalent.
[0031] In step S51, the actual trajectory point A i ’ The mechanical coordinates are obtained through teaching, including: By rotating the first rotation axis and the second rotation axis, the workpiece is moved to the preset dispensing posture, and the center of the camera is moved to the preset dispensing position by moving the linear axis X axis and the linear axis Y axis, and the linear axis Z axis is moved to make the photo taken by the camera clear, and the actual track point A at the preset dispensing position is obtained. i ’ The mechanical coordinates are expressed as , They correspond to the coordinate values of the X-axis, Y-axis, and X-axis of the mechanical coordinate system respectively. is the rotation angle of the first rotation axis, is the rotation angle of the second rotation axis. In this embodiment, the counterclockwise direction of the first rotation axis and the second rotation axis is positive.
[0032] In the examples, see Figure 3 As shown, to correct the standard trajectory points, a coordinate system needs to be established, including: The mechanical coordinate system XYZ is established based on the origin positions of the linear axis X axis, linear axis Y axis, and linear axis Z axis; the current workpiece coordinate system xyz is established with the point at the center of the second visual template, and the mechanical coordinate of the camera center at the origin of the current workpiece coordinate system is obtained by visual positioning and calibration. ; Establish a standard workpiece coordinate system with the point at the center of the first visual template. The direction of the standard workpiece coordinate system is consistent with the direction of the mechanical coordinate system; establish the first rotation axis coordinate system and the second rotation axis coordinate system respectively. Through calibration, the mechanical coordinates of the camera center at the rotation center of the first rotation axis can be obtained. and the mechanical coordinates at the center of rotation of the second rotation axis A first rotation axis coordinate system is established with the rotation center of the first rotation axis as the origin, and a second rotation axis coordinate system is established with the rotation center of the second rotation axis as the origin; wherein the direction of the current workpiece coordinate system, the standard workpiece coordinate system, the first rotation axis coordinate system and the second rotation axis coordinate system are all consistent with the direction of the mechanical coordinate system.
[0033] It should be noted that the workpiece coordinate system is used to realize the RTCP (tool tip following) function of five-axis linkage. The workpiece coordinate system xyz is established with the point on the workpiece as the origin. The position coordinates of the dispensing trajectory points are described by the workpiece coordinates. In order to facilitate the calculation of the workpiece coordinates, this embodiment establishes the workpiece coordinate system with the center of the workpiece visual template, which improves the calculation efficiency.
[0034] In step S52, the actual trajectory point A is converted into i ’ The mechanical coordinates are converted to obtain the actual trajectory point A i ’ The workpiece coordinates include: The actual trajectory point A i ’ The mechanical coordinates of are transformed into the coordinates of the second rotation axis coordinate system through translation and rotation. The calculation formula is: ; The actual trajectory point A i ’ The coordinates of in the second rotation axis coordinate system are converted into the coordinates of in the first rotation axis coordinate system through translation and rotation. The calculation formula is: ; The actual trajectory point A i ’ The coordinates in the first rotation axis coordinate system are transformed into the coordinates in the current workpiece coordinate system through translation. The calculation formula is: .
[0035] In step S53, based on the offset information and the actual trajectory point A i ’ The workpiece coordinates are calculated to calculate the corrected standard trajectory point A i The workpiece coordinates include: According to the rotation angle between the second visual template and the first visual template , the actual trajectory point A i ’ The workpiece coordinates are transformed into the workpiece coordinates in the standard workpiece coordinate system by rotation. The calculation formula is: ; The actual trajectory point A i ’ The second rotation axis rotation angle is converted into the second rotation axis rotation angle in the standard workpiece coordinate system to obtain the corrected standard trajectory point A i The rotation angle of the second rotation axis in the standard workpiece coordinate system is ; The actual trajectory point A i ’ The first rotation axis rotation angle is converted into the first rotation axis rotation angle in the standard workpiece coordinate system. The rotation angle between the second visual template and the first visual template is equal to the rotation angle between the current workpiece and the standard workpiece in the direction of the first rotation axis, that is, the corrected standard trajectory point A i The rotation angle of the first rotation axis in the standard workpiece coordinate system is , the corrected standard trajectory point A i The workpiece coordinates are expressed as: .
[0036] In step S54, the corrected standard trajectory point A i The workpiece coordinates are converted to obtain the corrected standard trajectory point A i The mechanical coordinates include: Based on the mechanical coordinates of the camera center at the center point of the standard workpiece vision template The mechanical coordinates of the camera center at the origin in the standard workpiece coordinate system are: ; The corrected standard trajectory point A i The workpiece coordinates are converted into the coordinates of the first rotation axis coordinate system. The calculation formula is: ; The corrected standard trajectory point A i The coordinates of the first rotation axis coordinate system of the standard workpiece are converted into the coordinates of the second rotation axis coordinate system. The calculation formula is: ; The corrected standard trajectory point A i The coordinates of the second rotation axis coordinate system of the standard workpiece are converted into mechanical coordinates. The calculation formula is: ; Based on the corrected standard trajectory point A iThe rotation angle of the second rotation axis under the first visual template and the corrected standard trajectory point A i The rotation angle of the first rotation axis under the first visual template Update the rotation angle of the standard trajectory point according to the corrected standard trajectory point A i The mechanical coordinates of the standard trajectory point are modified. After modification, the standard trajectory point A i The mechanical coordinates are expressed as .
[0037] In the embodiment, the linear axis X axis, the linear axis Y axis, the linear axis Z axis, the first rotary axis and the second rotary axis are controlled to drive the dispensing valve to follow the mechanical coordinates of the corrected standard trajectory point. Carry out dispensing.
[0038] To sum up, the present invention is a method for correcting trajectory point coordinates of a five-axis dispensing machine based on an industrial camera. When the position of the workpiece on the workpiece carrier changes, the mechanical coordinates and workpiece coordinates of the standard trajectory points can be corrected according to the offset information of the current workpiece, thereby improving the accuracy of dispensing. Compared with the existing blind adjustment method, it reduces the difficulty of debugging and has a fast debugging efficiency.
[0039] Example 2 An embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a method for correcting trajectory point coordinates of a five-axis dispensing machine based on an industrial camera as provided in the above method embodiment.
[0040] Figure 4 The hardware structure diagram of a device for implementing a method for correcting the coordinates of a five-axis dispensing machine trajectory based on an industrial camera provided in an embodiment of the present application is shown. The device may participate in or include the apparatus or system provided in an embodiment of the present application. Figure 4 As shown, the computer device 10 may include one or more processors 1002 (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4More or fewer components as shown, or with Figure 4 Different configurations are shown.
[0041] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer device 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0042] The memory 1004 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 1004, that is, realizing the above-mentioned method. The memory 1004 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1004 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0043] The transmission device 1006 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer device 10. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1006 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0044] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer device 10 (or mobile device).
[0045] Example 3 An embodiment of the present application also provides a computer-readable storage medium, which can be set in a server to store at least one instruction or at least one program related to a method for correcting the trajectory point coordinates of a five-axis dispensing machine based on an industrial camera in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement a method for correcting the trajectory point coordinates of a five-axis dispensing machine based on an industrial camera provided in the above method embodiment.
[0046] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0047] Example 4 The embodiment of the present invention also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes a method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera provided in the above various optional embodiments.
[0048] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0049] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0050] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0051] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A method for correcting the coordinates of trajectory points of a five-axis dispensing machine based on an industrial camera, wherein the five-axis dispensing machine comprises a camera, a workpiece bearing seat, a linear axis X axis, a linear axis Y axis, a linear axis Z axis, a first rotating axis rotating around the linear axis Z axis, and a second rotating axis rotating around the linear axis Y axis, wherein the first rotating axis is a C axis and the second rotating axis is a B axis, and wherein: The trajectory point coordinate correction method comprises: Creating a first visual template of a standard workpiece under target requirements; Acquire a set dispensing instruction for a standard workpiece, wherein the dispensing instruction includes a plurality of standard trajectory points; Moving the camera to the workpiece carrier, taking a picture of the current workpiece placed on the workpiece carrier, and obtaining a workpiece image; Based on the first visual template, the workpiece image is processed by a visual positioning algorithm to obtain the offset information of the current workpiece; Correcting the standard trajectory point based on the offset information specifically includes: Select any standard track point A that needs to be corrected in the dispensing instruction i , obtain the standard trajectory point A i Corresponding to the actual trajectory point A on the current workpiece i ’ The mechanical coordinates of According to the conversion relationship between the mechanical coordinate system and the workpiece coordinate system, the actual trajectory point A i ’ The mechanical coordinates are converted to obtain the actual trajectory point A i ’ Workpiece coordinates; Based on the offset information and the actual trajectory point A i ’ The workpiece coordinates are calculated to calculate the corrected standard trajectory point A on the standard workpiece. i Workpiece coordinates; The corrected standard trajectory point A i The workpiece coordinates are converted to obtain the corrected standard trajectory point A i The mechanical coordinates of Set the standard track point A in the dispensing instruction i The mechanical coordinates and workpiece coordinates are modified to the corrected standard trajectory point A i The machine coordinates and workpiece coordinates are calculated and saved to complete the coordinate correction of the standard trajectory points in the workpiece dispensing instruction.
2. The method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera as claimed in claim 1, characterized in that: The actual trajectory point A i ’ The mechanical coordinates are obtained through teaching, including: By rotating the first rotating axis and the second rotating axis, the workpiece is moved to the preset dispensing posture, the linear axis X axis and the linear axis Y axis are moved to make the camera center at the preset dispensing position, and the linear axis Z axis is moved to make the camera take a clear picture, and the actual track point A at the preset dispensing position is obtained. i ’ The mechanical coordinates are expressed as , They correspond to the coordinate values of the X-axis, Y-axis, and X-axis of the mechanical coordinate system, respectively. is the rotation angle of the first rotation axis, is the rotation angle of the second rotation axis.
3. The method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera as claimed in claim 2, characterized in that: The offset information of the current workpiece includes: the pixel coordinates of the center of the second visual template of the current workpiece on the image in the pixel coordinate system , the rotation angle between the second visual template and the first visual template , xy Direction offset distance ; According to the pixel coordinates of the center of the second visual template on the image , calculate the mechanical coordinates of the second visual template center where the camera center is located at the current workpiece .
4. The method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera as claimed in claim 3 is characterized in that: The mechanical coordinate system is defined based on the origin positions of the linear axis X axis, the linear axis Y axis, and the linear axis Z axis; The current workpiece coordinate system is established with the point at the center of the second visual template, and the mechanical coordinates of the camera center at the origin of the current workpiece coordinate system are obtained by visual positioning and calibration: ; A standard workpiece coordinate system is established with the point at the center of the first visual template, and the direction of the standard workpiece coordinate system is consistent with the direction of the mechanical coordinate system; Establish the first rotation axis coordinate system and the second rotation axis coordinate system respectively, and obtain the mechanical coordinates of the camera center at the rotation center of the first rotation axis through calibration and the mechanical coordinates at the center of rotation of the second rotation axis A first rotation axis coordinate system is established with the rotation center of the first rotation axis as the origin, and a second rotation axis coordinate system is established with the rotation center of the second rotation axis as the origin; The direction of the current workpiece coordinate system, the standard workpiece coordinate system, the first rotation axis coordinate system and the second rotation axis coordinate system are all consistent with the direction of the mechanical coordinate system.
5. The method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera as claimed in claim 4, characterized in that: According to the conversion relationship between the mechanical coordinate system and the workpiece coordinate system, the actual trajectory point A i ’ The mechanical coordinates are converted to obtain the actual trajectory point A i ’ The workpiece coordinates include: The actual trajectory point A i ’ The mechanical coordinates of are transformed into the coordinates of the second rotation axis coordinate system through translation and rotation. The calculation formula is: ; The actual trajectory point A i ’ The coordinates of in the second rotation axis coordinate system are converted into the coordinates of in the first rotation axis coordinate system through translation and rotation. The calculation formula is: ; The actual trajectory point A i ’ The coordinates in the first rotation axis coordinate system are transformed into the coordinates in the current workpiece coordinate system through translation. The calculation formula is: 。 6. The method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera as claimed in claim 5, characterized in that: Based on the offset information and the actual trajectory point A i ’ The workpiece coordinates are calculated to calculate the corrected standard trajectory point A i The workpiece coordinates include: According to the rotation angle between the second visual template and the first visual template , the actual trajectory point A i ’ The workpiece coordinates are transformed into the workpiece coordinates in the standard workpiece coordinate system by rotation. The calculation formula is: ; The actual trajectory point A i ’ The second rotation axis rotation angle is converted into the second rotation axis rotation angle in the standard workpiece coordinate system to obtain the corrected standard trajectory point A i The rotation angle of the second rotation axis in the standard workpiece coordinate system is ; The actual trajectory point A i ’ The first rotation axis rotation angle is converted into the first rotation axis rotation angle in the standard workpiece coordinate system, and the rotation angle between the second visual template and the first visual template is equal to the rotation angle between the current workpiece and the standard workpiece in the first rotation axis direction, that is, the corrected standard trajectory point A is obtained. i The rotation angle of the first rotation axis in the standard workpiece coordinate system is ; Corrected standard trajectory point A i The workpiece coordinates are expressed as: .
7. The method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera as claimed in claim 6, characterized in that: For the corrected standard trajectory point A i The workpiece coordinates are converted to obtain the corrected standard trajectory point A i Mechanical coordinates; specific include: Based on the mechanical coordinates of the camera center at the center point of the standard workpiece vision template The mechanical coordinates of the camera center at the origin in the standard workpiece coordinate system are: ; The corrected standard trajectory point A i The workpiece coordinates are converted into the coordinates of the first rotation axis coordinate system. The calculation formula is: ; The corrected standard trajectory point A i The coordinates of the first rotation axis coordinate system of the standard workpiece are converted into the coordinates of the second rotation axis coordinate system. The calculation formula is: ; The corrected standard trajectory point A i The coordinates of the second rotation axis coordinate system of the standard workpiece are converted into mechanical coordinates. The calculation formula is: ; Based on the corrected standard trajectory point A i The rotation angle of the second rotation axis under the first visual template and the corrected standard trajectory point A i The rotation angle of the first rotation axis under the first visual template Update standard trajectory point A i The rotation angle is based on the corrected standard trajectory point A i Mechanical coordinates of the standard trajectory point A i Mechanical coordinates, modified standard trajectory point A i The mechanical coordinates are expressed as .
8. The method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera as claimed in claim 7, characterized in that: Control the linear axis X axis, linear axis Y axis, linear axis Z axis, first rotary axis and second rotary axis to drive the dispensing valve to follow the mechanical coordinates of the corrected standard trajectory point Carry out dispensing.
9. The method for correcting the coordinates of the trajectory points of a five-axis dispensing machine based on an industrial camera as claimed in claim 4, characterized in that: Calculate the mechanical coordinates of the second visual template center where the camera center is located on the current workpiece include: The mechanical coordinates of the current workpiece photography position are known , pixel coordinates of the center of the current workpiece image , the pixel coordinates of the center point of the second visual template of the current workpiece , the center of the camera is located at the mechanical coordinates of the center of the second visual template of the current workpiece The calculation formula is: in, is the pixel equivalent.
Citation Information
Patent Citations
Dispensing track correction method, device and system based on visual following and medium
CN111905983A
Full-automatic five-axis glue dispenser
CN112547424A
Optimal path interpolation method and application for rotating axes and used for five-axis linkage adhesive-dispensing track
CN112974153A
Glue dispensing method and five-axis linkage glue dispensing machine
CN113399200A
Method and system for correcting positioning error of dispensing machine and method for identifying MARK point
CN116099725A
Cited By
Image acquisition and analysis method based on five-axis dispensing machine
CN121921380A
