Robot workpiece model reconstruction method and device
The robot obtains the shape and position tolerances and physical properties of the workpiece and adjusts the processing procedures, which solves the problem of low machining accuracy of the workpiece model in the prior art, improves the machining accuracy and reduces the operation complexity.
Patent Information
- Application Number
- CN202411304455.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-11-05
Smart Images

Figure CN118893632A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robots, and in particular to a robot workpiece model reconstruction method, a robot workpiece model reconstruction device, a computer-readable storage medium and a robot digital twin system. Background Art
[0002] There are currently two teaching methods in the use of robots. One is manual teaching, that is, the operator manipulates the physical robot on site to complete the robot's teaching and task program writing. The other is offline teaching, that is, through the robot offline programming simulation system, using computer 3D modeling technology to build a virtual robot workstation, and complete the robot's teaching and task program writing in the virtual workstation. The latter method allows operators to stay away from dangerous workshop sites and does not need to occupy precious robot machine time, which will be the mainstream in the future.
[0003] After the workpiece model is initially imported into the current robot offline programming simulation system, the information between the workpiece model and the workpiece in the virtual and physical ends generally flows in one direction. That is, after obtaining the processing trajectory through the workpiece model, the robot motion command is generated and transmitted to the physical robot. At present, some offline simulation systems adjust the posture of the workpiece model in the virtual space by collecting the workpiece posture information. However, the offline programming simulation system cannot collect enough workpiece information to complete the complete mapping of the actual workpiece in the virtual space. This creates three problems: 1) The workpiece model imported into the offline programming simulation system only has size and posture information, and does not contain form and position tolerances such as straightness, flatness, and roundness, and physical properties such as hardness and toughness. In the process of using robots for welding, cutting, gluing, and grinding, these properties will be required, so these properties need to be measured in advance. For some workpieces with complex structures, this requires the purchase of special equipment, which costs a lot of money. Moreover, these properties cannot be assigned to the workpiece model. In the offline teaching process, these properties cannot be automatically taken into account to modify the robot's task program. The program can only be adjusted manually based on the measurement results, which is costly and cumbersome. 2) In the actual processing, the consistency of the shape and position tolerances and physical properties of the workpieces to be processed often cannot meet the requirements well, especially for some precision processing processes. Moreover, the offline programming simulation system cannot reconstruct the workpiece model based on this inconsistency of the workpiece, so the generated robot processing program cannot adapt to all workpieces well. 3) For the completed workpieces, the offline programming simulation system cannot reconstruct the model in real time based on the processing results. In the next process, if the offline programming simulation system wants to generate a robot task program, it needs to re-import the modified workpiece model, which is cumbersome and time-consuming. Summary of the invention
[0004] The main purpose of the present application is to provide a robot method for reconstructing a workpiece model, a robot device for reconstructing a workpiece model, a computer-readable storage medium and a robot digital twin system, so as to at least solve the problem in the prior art that the geometric tolerances and physical properties of the workpiece are not fully considered, resulting in low processing accuracy of the reconstructed workpiece model.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for reconstructing a workpiece model by a robot is provided, comprising: using a robot to obtain the position coordinates of sampling points on a path to be processed, the path to be processed being the path along which the robot reconstructs the surface of the workpiece to be processed, and the position coordinates of the sampling points being the position coordinates of the sampling points on the path to be processed; calculating form and position tolerances according to the position coordinates of the sampling points, the form and position tolerances including straightness, flatness and roundness; controlling the robot to move along a processing direction on the path to be processed to calculate physical properties in the processing direction, the physical properties at least including the hardness of the workpiece to be processed; adjusting the process parameters in a processing program of the workpiece to be processed based on the form and position tolerances and the physical properties to generate a target processing program, the process parameters at least including welding height, glue gun height and grinding wheel force; controlling the robot to execute the target processing program to process the workpiece to be processed to obtain a processed workpiece, and reconstructing the processed workpiece to obtain a reconstructed workpiece model.
[0006] Optionally, the sampling point position coordinates include straight line sampling position coordinates, plane sampling position coordinates and circumferential sampling position coordinates, the straight line sampling position coordinates are the position coordinates of different sampling points on the same straight line, the plane sampling position coordinates are the position coordinates of different sampling points on the same plane, and the circumferential sampling position coordinates are the position coordinates of different sampling points on the same circumference, and calculating the geometric tolerance according to the sampling point position coordinates includes: fitting a regression line according to all the straight line sampling position coordinates using the least squares method; calculating the absolute value of the distance between each first sampling point and the regression line to obtain the absolute value of the first distance corresponding to each first sampling point, and calculating the average of the absolute values of the first distances of all the first sampling points to obtain the straightness, the first sampling The second sampling point is the sampling point on the straight line; a regression surface is fitted by the least square method according to all the plane sampling position coordinates; the absolute value of the distance between the second sampling point and the regression surface is calculated to obtain the absolute value of the second distance corresponding to each second sampling point, and the average of the absolute values of the second distance of all the second sampling points is calculated to obtain the flatness, and the second sampling point is the sampling point on the plane; a regression curve is fitted by the least square method according to all the circumferential sampling position coordinates; the absolute value of the distance between the third sampling point and the regression curve is calculated to obtain the absolute value of the third distance corresponding to each third sampling point, and the average of the absolute values of the third distance of all the third sampling points is calculated to obtain the roundness, and the third sampling point is the sampling point on the circumference.
[0007] Optionally, controlling the robot to move along the processing direction on the processing path and calculating the physical properties in the processing direction includes: calculating the additional force of the robot according to a first formula, wherein the additional force is the additional force that the robot needs to apply at the i-th joint, and the first formula is: in, i f i is the additional force, is the rotation transformation matrix of the local coordinate system at the i+1th joint relative to the local coordinate system at the i-th joint, i+1 f i+1 is the additional force that needs to be applied to the robot at the i+1th joint; the additional torque of the robot is calculated according to the second formula, and the additional torque is the additional torque that needs to be applied to the robot at the i-th joint. The second formula is in, i n i is the additional torque, i+1 n i+1 is the additional torque that the robot needs to apply at the i+1th joint, i P i+1is the coordinate vector of the origin of the i+1th local coordinate system in the i-th local coordinate system, i f i+1 is the expression of the additional force to be applied at the i+1th joint of the robot in the i-th local coordinate system; when the i-th joint of the robot is a revolute joint, the driving torque required to be output by the i-th joint of the robot in the processing direction is calculated according to the third formula, and the third formula is τ i is the driving torque of the i-th joint, The additional torque i n i The transpose of is the z-axis vector of the local coordinate system corresponding to the i-th joint of the robot; when the i-th joint of the robot is a moving joint, the driving force required to be output by the i-th joint of the robot in the processing direction is calculated according to the fourth formula, and the fourth formula is ω i is the driving force of the i-th joint, i f i T The additional force i f i transpose; applying the driving torque or the driving force to each joint of the robot to obtain the hardness of the workpiece to be processed in the processing direction.
[0008] Optionally, after adjusting the process parameters in the machining program of the workpiece to be machined based on the geometric tolerance and the physical property to generate a target machining program, the method at least includes: parsing the target machining program of the robot to obtain a plurality of starting joint angles and a plurality of ending joint angles, wherein the starting joint angle is a position angle of the current joint before movement, and the ending joint angle is a position angle of the current joint after movement; and calculating according to each of the starting joint angles and the ending joint angles using a fifth formula to obtain a corresponding path point, wherein the fifth formula is X(s)=X start +s(X end -X start ), X(s) is the path point, X start is the starting joint angle, X endis the termination joint angle, s is the time scale; for each of the path points, the joint posture of the robot in the joint space is calculated using forward kinematics to obtain the posture of the end effector of the robot; the robot is controlled to simulate the processing of the workpiece to be processed according to all the postures to obtain the movement distance, which is the distance between the robot and other workpieces during the simulation movement. When the movement distance is greater than the set safety distance, the target processing program is sent to the robot.
[0009] Optionally, after adjusting the process parameters in the machining program of the workpiece to be machined based on the geometric tolerances and the physical properties to generate a target machining program, the method further includes: parsing the target machining program of the robot to obtain a plurality of starting Cartesian coordinates and a plurality of ending Cartesian coordinates, wherein the starting Cartesian coordinates are the Cartesian position coordinates of the robot before the robot moves in the Cartesian space, and the ending Cartesian coordinates are the Cartesian position coordinates of the robot after the robot moves in the Cartesian space; and calculating using the sixth formula according to each of the starting Cartesian coordinates and the ending Cartesian coordinates to obtain a corresponding path point, wherein the sixth formula is X(s)=X′ start +s(X′ end -X′ start ), X(s) is the path point, X′ start is the starting Cartesian coordinate, X′ end is the termination Cartesian coordinate, s is the time scale; the joint angles of the robot at each of the path points are calculated using inverse kinematics to obtain multiple joint angles; for each of the path points, the joint posture of the robot corresponding to the joint angle is calculated using forward kinematics to obtain the position and posture of the end effector of the robot; the robot is controlled to simulate the machining process of the workpiece to be machined according to all the postures to obtain the movement distance, which is the distance between the robot and other workpieces during the simulation movement; when the movement distance is greater than the set safety distance, the target machining program is sent to the robot.
[0010] Optionally, the machined workpiece is reconstructed to obtain the reconstructed workpiece model, including: controlling the robot to reconstruct the shape of the machined workpiece according to all the target machining programs to obtain a preliminary reconstructed workpiece model; controlling the robot to detect the machining quality of the preliminary reconstructed workpiece model, and reconstructing the details of the preliminary reconstructed workpiece model according to the form and position tolerances and the physical properties to obtain the reconstructed workpiece model.
[0011] Optionally, before controlling the robot to execute the target processing program to reconstruct the workpiece to be processed and obtaining the reconstructed workpiece model, the method also includes: acquiring point cloud data, form and position tolerances and physical properties of the complex workpiece to be processed, the point cloud data being the surface feature point position data of the complex workpiece to be processed, and the complex workpiece to be processed is a processing workpiece with a complex structure and no workpiece model; fitting a virtual workpiece model based on the point cloud data, and assigning the form and position tolerances and the physical properties to the virtual workpiece model, to generate a target processing program for the complex workpiece to be processed.
[0012] According to another aspect of the present application, a robot reconstructs a workpiece model device, the device comprising: a first acquisition unit, used to use a robot to acquire the position coordinates of sampling points on a path to be processed, the path to be processed being the path when the robot reconstructs along the surface of the workpiece to be processed, and the sampling point position coordinates being the position coordinates of the sampling points on the path to be processed; a first calculation unit, used to calculate form and position tolerances according to the sampling point position coordinates, the form and position tolerances including straightness, flatness and roundness; a second calculation unit, used to control the robot to move along a processing direction on the path to be processed, and calculate physical properties in the processing direction, the physical properties at least including the hardness of the workpiece to be processed; a first generation unit, used to adjust the process parameters in the processing program of the workpiece to be processed based on the form and position tolerances and the physical properties, and generate a target processing program, the process parameters at least including welding height, glue gun height and grinding wheel force; a first reconstruction unit, used to control the robot to execute the target processing program to process the workpiece to be processed to obtain a processed workpiece, and reconstruct the processed workpiece to obtain a reconstructed workpiece model.
[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.
[0014] According to another aspect of the present application, a robot digital twin system is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the described methods.
[0015] By applying the technical solution of the present application, in a method for reconstructing a workpiece model by a robot, first, the robot is used to obtain the position coordinates of sampling points on a path to be processed, the path to be processed being the path of the robot when reconstructing along the surface of the workpiece to be processed, and the position coordinates of the sampling points are the position coordinates of the sampling points on the path to be processed; then, the form and position tolerances are calculated based on the position coordinates of the sampling points, and the form and position tolerances include straightness, flatness and roundness; thereafter, the robot is controlled to move along a processing direction on the path to be processed to calculate the physical properties in the processing direction, and the physical properties include at least the shape and position tolerances of the workpiece to be processed. The hardness of the workpiece; then, based on the above-mentioned geometric tolerances and the above-mentioned physical properties, the process parameters in the processing program of the above-mentioned workpiece to be processed are adjusted to generate a target processing program, and the above-mentioned process parameters at least include welding height, glue gun height and grinding wheel force; finally, the above-mentioned robot is controlled to execute the above-mentioned target processing program to process the above-mentioned workpiece to be processed, and the processed workpiece is obtained, and the above-mentioned processed workpiece is reconstructed to obtain a reconstructed workpiece model. The above-mentioned robot is controlled to execute the above-mentioned target processing program to process the above-mentioned workpiece to be processed, and the processed workpiece is obtained. The above-mentioned processed workpiece is reconstructed to obtain a reconstructed workpiece model. The present application avoids the problem of purchasing measuring equipment at a high cost by measuring the posture of the workpiece to be processed, the geometric tolerances such as straightness, flatness, and roundness on the path to be processed of the workpiece, and the physical properties such as hardness and toughness. The processing program of the corresponding workpiece is automatically adjusted according to the geometric tolerances and physical properties, thereby improving the processing accuracy and reducing the complexity of operation. Finally, the robot is controlled to reconstruct according to the adjusted processing program to obtain a reconstructed workpiece model. The present application solves the problem that the processing accuracy of the reconstructed workpiece model is low due to the fact that the geometric tolerances and physical properties of the workpiece are not fully considered in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for reconstructing a workpiece model by a robot provided in an embodiment of the present application is shown;
[0017] Figure 2 A physical schematic diagram of a robot digital twin system provided according to an embodiment of the present application is shown;
[0018] Figure 3 A robot digital twin system architecture diagram provided according to an embodiment of the present application is shown;
[0019] Figure 4 A schematic diagram of a process of a robot reconstructing a workpiece model according to an embodiment of the present application is shown;
[0020] Figure 5 A flowchart of the full life cycle reconstruction of a workpiece model provided according to an embodiment of the present application is shown;
[0021] Figure 6 A flowchart of constructing a complex model from a point cloud is shown according to an embodiment of the present application;
[0022] Figure 7 A structural block diagram of a robot workpiece model reconstruction device provided according to an embodiment of the present application is shown.
[0023] The above drawings include the following reference numerals:
[0024] 1. Workpiece; 2. Workbench; 3. Quick-change workstation; 4. Probe; 5. Industrial camera; 6. Robot; 7. Joint displacement and force sensor; 8. Robot controller; 9. Digital twin system; 10. Simulation interface; 11. Program editing interface; 12. Kinematics module; 13. Point cloud model generation module; 14. Dynamics module; 15. Form and position tolerance module; 16. Control instruction process parameter generator; 102. Processor; 104. Memory; 106. Transmission equipment; 108. Input and output devices. DETAILED DESCRIPTION
[0025] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] As introduced in the background technology, the workpiece model imported into the offline programming simulation system in the prior art only has size and posture information, and does not include form and position tolerances such as straightness, flatness, and roundness, and physical properties such as hardness and toughness. In the process of using robots for welding, cutting, gluing, and grinding, there will be requirements for these properties, so these properties need to be measured in advance. For some workpieces with complex structures, this requires the purchase of special equipment, which costs a lot of money. Moreover, it is impossible to assign these properties to the workpiece model. In the offline teaching process, it is impossible to automatically take these properties into account and modify the robot's task program. The program can only be manually adjusted according to the measurement results. In order to solve the problem that the form and position tolerances and physical properties of the workpiece are not fully considered in the prior art, resulting in low processing accuracy of the reconstructed workpiece model, the embodiments of the present application provide a robot reconstruction workpiece model method, a robot reconstruction workpiece model device, a computer-readable storage medium, and a robot digital twin system.
[0029] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0030] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a robot reconstructing a workpiece model method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the robot reconstruction workpiece model method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 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 examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal 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 a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific example of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as 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 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0032] In this embodiment, a robot reconstructing workpiece model method running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] Figure 2 1 is a flow chart of a method for robot reconstructing a workpiece model according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0034] Step S201, using a robot to obtain the position coordinates of sampling points on a path to be processed, the path to be processed is a path along which the robot reconstructs the surface of the workpiece to be processed, and the position coordinates of the sampling points are the position coordinates of the sampling points on the path to be processed.
[0035] Specifically, the overall layout of the robot digital twin system is as follows: Figure 3As shown, the digital twin system 9 is deployed in the host computer and connected to the robot controller 8 and the joint displacement and force sensor 7 of the robot 6, and the industrial camera 5 at the end of the robot through data cables, so as to obtain the information of the rotation angle and torque of each joint of the robot 6, the processing status of the workpiece, and transmit the robot task program generated by offline programming to the robot controller 8. The robot 6 is used to perform the operation task. There is also a workbench 2 in the scene, which is used to place the workpiece 1 to be processed. The quick-change workstation 3 is used to replace tools for the robot 6, such as the probe 4 used for measurement and the welding gun, grinding wheel, glue gun and other tools used for work. The robot 6, the workpiece 1 and the additional equipment models are imported and adjusted to a suitable layout so that the workbench 2 is within the reachable space of the robot 6. According to the layout, the actual robot workstation is built, the material is loaded, and the workpiece 1 is placed in the corresponding position. The robot 6 first works according to the measurement program and moves to the quick-change workstation 3 to install the probe 4. The probe 4 at the end of the robot 6 moves along the path to be processed of the workpiece 1, and uses the joint displacement and force sensor 7 to collect the positions of different sampling points on the same straight line, the positions of different sampling points on the same circle, and the positions of different sampling points on the same plane to obtain the sampling point position coordinates.
[0036] It should also be noted that, for a workpiece with a complex structure, the point cloud model generation module 13 generates the positions of the feature points of the workpiece with a complex structure.
[0037] Step S202, calculating the geometric tolerances according to the sampling point position coordinates, the geometric tolerances including straightness, flatness and roundness.
[0038] Specifically, Figure 3 As shown, the geometric tolerance module 15 in the simulation interface 10 is used to calculate straightness, roundness and flatness. Of course, other geometric tolerances besides straightness, roundness and flatness can also be calculated.
[0039] Step S203, controlling the robot to move along a processing direction on the processing path to be processed, so as to calculate physical properties in the processing direction, wherein the physical properties at least include the hardness of the workpiece to be processed.
[0040] Specifically, Figure 3 As shown, the probe 4 at the end of the robot is at the sampling point on the workpiece 1, and the end of the robot 6 moves along the processing direction (such as grinding is the normal direction of the grinding plane), and the joint displacement and force sensor 7 are used to collect the movement distance of the probe 4 and the torque at each joint. The dynamics module 14 in the simulation interface 10 calculates the force received by the probe 4 at the end of the robot in the processing direction, thereby calculating the hardness, toughness and other physical properties of the workpiece 1 in the processing path and the processing direction.
[0041] Step S204, adjusting the process parameters in the processing program of the workpiece to be processed based on the geometric tolerances and the physical properties to generate a target processing program, wherein the process parameters at least include welding height, glue gun height and grinding wheel force.
[0042] Specifically, for each workpiece to be processed, the calculated geometric tolerances and physical properties are assigned to the workpiece model through robot measurement data, and the process parameters of the corresponding commands in the robot task program are automatically adjusted, specifically as follows: Figure 3 As shown, the process parameters in each process module are adjusted through the control instruction process parameter generator 16 in the program editing interface 11, so as to automatically modify the robot's processing program. For example, when the robot performs a precise gluing task, the height of the glue gun is adjusted according to the gluing plane and the different flatness. If the measured part flatness error is large, the glue gun will be raised to prevent the glue line from being too thin or the glue from being broken. When the robot performs a precise grinding task, the grinding is adjusted according to the different hardness of the workpiece processing plane. If the hardness of the part is measured to be high, the force applied to the normal direction of the grinding plane by the end of the robot will be increased to improve the consistency of the grinding effect. The processing accuracy of workpieces with different properties is improved, and the operation complexity is reduced.
[0043] Step S205 , controlling the robot to execute the target processing program to process the workpiece to be processed to obtain a processed workpiece, and reconstructing the processed workpiece to obtain a reconstructed workpiece model.
[0044] Specifically, Figure 3 As shown, the robot controller 8 will receive the target processing program, control the robot 6 to execute the target processing program to process the workpiece 1, and collect the shape data of the workpiece 1 during the processing, reconstruct the workpiece model in the virtual space in real time, and use the digital twin system 9 to monitor the processing process of the robot 6; finally, the robot 6 is used to measure the processed workpiece, that is, the above-mentioned processed workpiece, to obtain the appearance data, shape and position tolerances and physical properties of the processed workpiece, and to reconstruct the workpiece model in the virtual space in detail to obtain a reconstructed workpiece model, and finally the reconstructed workpiece model is displayed through the image user interface, as shown in FIG. Figure 4 As shown, the graphical user interface includes a simulation interface 10 and a program editing interface 11, and can be used for the processing of the next process. It should also be noted that before the robot controller 8 receives the target processing program, it is also necessary to use the kinematics module 12 to drive the robot 6 and the additional equipment model to move in the simulation interface 10 to ensure that the target processing program is correct.
[0045] In this embodiment, first, a robot is used to obtain the position coordinates of sampling points on a path to be processed, the path to be processed being the path of the robot when reconstructing along the surface of the workpiece to be processed, and the position coordinates of the sampling points are the position coordinates of the sampling points on the path to be processed; then, form and position tolerances are calculated according to the position coordinates of the sampling points, and the form and position tolerances include straightness, flatness and roundness; then, the robot is controlled to move along a processing direction on the path to be processed to calculate physical properties in the processing direction, and the physical properties at least include the hardness of the workpiece to be processed; then, based on the form and position tolerances and the physical properties, the process parameters in the processing program of the workpiece to be processed are adjusted to generate a target processing program, and the process parameters at least include welding height, glue gun height and grinding wheel force; finally, the robot is controlled to execute the target processing program to process the workpiece to be processed to obtain a processed workpiece, and the processed workpiece is reconstructed to obtain a reconstructed workpiece model. This application avoids the problem of purchasing measuring equipment at high cost by measuring the posture of the workpiece to be processed, the form and position tolerances such as straightness, flatness, roundness and physical properties such as hardness and toughness on the workpiece to be processed path, and automatically adjusts the processing program of the corresponding workpiece according to the form and position tolerances and physical properties, thereby improving the processing accuracy and reducing the complexity of operation. Finally, the robot is controlled to reconstruct according to the adjusted processing program to obtain a reconstructed workpiece model. This application solves the problem in the prior art that the form and position tolerances and physical properties of the workpiece are not fully considered, resulting in low processing accuracy of the reconstructed workpiece model.
[0046] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the robot reconstructing workpiece model method of the present application will be described in detail below in combination with specific embodiments.
[0047] In order to avoid the high cost of purchasing measurement equipment and reduce the complexity of operation, in an optional implementation, the above step S202 includes:
[0048] Step S2021, fitting a regression line using the least squares method based on all the above straight line sampling position coordinates;
[0049] Step S2022, calculating the absolute value of the distance between each first sampling point and the regression line to obtain the absolute value of the first distance corresponding to each first sampling point, and calculating the average of the absolute values of the first distances of all the first sampling points to obtain the straightness, wherein the first sampling point is the sampling point on the straight line;
[0050] Step S2023, fitting a regression surface using the least squares method according to all the above plane sampling position coordinates;
[0051] Step S2024, calculating the absolute value of the distance between the second sampling point and the regression surface, obtaining the second distance absolute value corresponding to each of the second sampling points, and calculating the average of the second distance absolute values of all the second sampling points to obtain the flatness, wherein the second sampling point is the sampling point on the plane;
[0052] Step S2025, fitting a regression curve using the least squares method according to all the circumferential sampling position coordinates;
[0053] Step S2026, calculating the absolute value of the distance between the third sampling point and the regression curve, obtaining the absolute value of the third distance corresponding to each of the third sampling points, and calculating the average of the absolute values of the third distances of all the third sampling points to obtain the roundness, wherein the third sampling point is the sampling point on the circumference.
[0054] In the above embodiment, the sampling point position coordinates include straight line sampling position coordinates, plane sampling position coordinates and circular sampling position coordinates. The straight line sampling position coordinates are the position coordinates of different sampling points on the same straight line, and the plane sampling position coordinates are the position coordinates of different sampling points on the same plane. Figure 3 As shown, the robot, workpiece and additional equipment models are imported into the virtual space and adjusted to a suitable layout so that the workbench is within the reachable space of the robot. The actual robot workstation is built according to the layout, and the workpiece is loaded and placed in the corresponding position. The robot first operates according to the measurement program and moves to the quick-change workstation to install the probe. The probe at the end of the robot moves along the processing path of the workpiece to be processed, and uses the joint displacement sensor to collect the positions of different sampling points on the same straight line, the positions of different sampling points on the same circle, and the positions of different sampling points on the same plane. Figure 3 The geometric tolerance module in the calculation of straightness, roundness and flatness, or other errors. The following is a brief description of the calculation steps using straightness as an example: First, the least squares method is used to fit the straight line based on the position data of the sampling points on the straight line obtained above. Suppose the positions of the sampling points are (x1, y1, z1), (x2, y2, z2), (x3, y3, z3)...(x n ,y n , z n ), the linear equation is y = ax + b, the least squares method of fitting a straight line is to find the coefficients a and b in the linear equation y = ax + b so that the sum of squared errors is minimized. The sum of squared errors M is Characterization, the coefficients a and b of the line equation can be obtained by solving a set of linear equations that make the partial derivative of the error sum of squares M zero, and then the average of the absolute values of the distances from each sampling point to the regression line can be solved to obtain the straightness of the path to be processed. When calculating other errors such as flatness and roundness, the line equation is replaced with the corresponding geometric curve or surface equations such as the plane equation and the arc equation, and the regression equation of the corresponding curve or surface is calculated using the least squares method. Then the average of the absolute values of the distances from each sampling point to the regression curve or surface is solved to obtain the corresponding flatness and roundness.
[0055] In order to avoid the high cost of purchasing measurement equipment and reduce the complexity of operation, in an optional implementation, the above step S203 includes:
[0056] Step S2031, calculating the additional force of the robot according to the first formula, the additional force is the additional force that the robot needs to apply at the i-th joint, the first formula is in, i f i is the additional force mentioned above, is the rotation transformation matrix of the local coordinate system at the i+1th joint relative to the local coordinate system at the i-th joint, i+1 f i+1 is the additional force that needs to be applied at the i+1th joint of the above robot;
[0057] Step S2032, calculating the additional torque of the robot according to the second formula, the additional torque is the torque that the robot needs to apply additionally at the i-th joint, the second formula is in, i n i is the above additional torque, i+1 n i+1 is the additional torque that needs to be applied to the i+1th joint of the above robot, i P i+1 is the coordinate vector of the origin of the i+1th local coordinate system in the i-th local coordinate system, i f i+1 is the expression of the additional force that needs to be applied at the i+1th joint of the above robot in the ith local coordinate system;
[0058] Step S2033, when the i-th joint of the robot is a rotary joint, the driving torque required to be output by the i-th joint of the robot in the processing direction is calculated according to the third formula. The third formula is: τ i is the driving torque of the above-mentioned i-th joint, The additional torque i n iThe transpose of is the Z-axis vector of the i-th joint of the robot corresponding to the local coordinate system;
[0059] Step S2034, when the i-th joint of the robot is a moving joint, the driving force required to be output by the i-th joint of the robot in the processing direction is calculated according to the fourth formula. The fourth formula is: ω i is the driving force of the i-th joint, i f i T For the above additional force i f i The transpose of
[0060] Step S2035: applying the driving torque or the driving force to each joint of the robot to obtain the hardness of the workpiece to be processed in the processing direction.
[0061] In the above embodiment, the end probe of the robot is first located at the sampling point on the workpiece, and the end probe of the robot moves along the processing direction (for example, the grinding task is the normal direction of the grinding plane), and the joint displacement sensor and the joint force sensor are used to collect the probe movement distance and the torque at each joint. Figure 3 The dynamics module in the robot calculates the force on the robot's end probe in the processing direction, and uses this to calculate the hardness, toughness and other physical properties of the workpiece along the processing path. The details are as follows: First, the robot moves to the measurement position. Since the robot's movement distance and speed are extremely small when measuring hardness, it can be considered that the robot is in a static equilibrium state at this time. At this time, the force balance of the robot's i-th connecting rod joint is as follows in, Represents the rotation transformation matrix. The subscript represents the transformation matrix of the local coordinate system at the i+1th joint relative to the i-th local coordinate system. The other symbols and subscripts have the same meaning. i P i+1 Represents the coordinates or position vector of the origin of the i+1th local coordinate system in the i-th coordinate system. f and n are the additional forces and torques required at each joint. Since the robot's configuration can be obtained by the displacement sensors at each joint, a fixed force is applied to the end when measuring the hardness of the workpiece. Therefore, the torque n or force f at each joint of the robot can be obtained by recursion from the end of the robot from back to front. If the i-th joint is a revolute joint, then Get the torque τ that each joint motor needs to output i ,in yes i n i The transpose of i n iThe definition of has been given by the above calculation, is the z-axis vector of the ith local coordinate system. If the ith joint is a mobile joint, then Get the driving force ω that each joint motor needs to output i ,in i f i T yes i f i The transpose of i n i The definition of has been given by the above calculation, The definition is the same as above. Here, Rockwell hardness is used to characterize the hardness of the workpiece to be processed. Rockwell hardness is calculated by the indentation depth of the material when a fixed load is applied. When it is necessary to apply a fixed load to the end of the robot for hardness measurement, the additional torque τ that should be applied at each joint can be recursively calculated by the above formula. i or force ω i The joint force sensor can measure the torque currently applied at each joint, so as to adjust the actual calculated driving torque or driving force, so as to apply the fixed load required for hardness measurement to the end probe of the robot. Finally, the joint displacement sensor obtains the displacement of each joint during the hardness measurement process, thereby obtaining the displacement h of the end probe of the robot, according to the Rockwell hardness calculation formula: Where k is a specified constant, h is the indentation depth of the part when a fixed load is applied, which is the robot end displacement h calculated earlier. This can be used to obtain the hardness HR of the workpiece to be processed. Physical properties such as toughness are also measured and calculated.
[0062] In order to accurately execute the processing program, in an optional implementation, after the above step S204, the above method at least includes:
[0063] Step S301, parsing the target machining program of the robot to obtain a plurality of starting joint angles and a plurality of ending joint angles, wherein the starting joint angle is a position angle of the current joint before the movement, and the ending joint angle is a position angle of the current joint after the movement;
[0064] Step S302: Calculate the corresponding path point using the fifth formula according to the starting joint angle and the ending joint angle. The fifth formula is X(s)=X start +s(X end -X start ), X(s) is the path point mentioned above, X start is the starting joint angle, X end is the above-mentioned terminal joint angle, s is the time scale;
[0065] Step S303, calculating the joint posture of the robot in the joint space by using forward kinematics for each of the path points, and obtaining the position and posture of the end effector of the robot;
[0066] Step S304, controlling the robot to simulate the machining process of the workpiece to be machined according to all the postures to obtain a movement distance, where the movement distance is the distance between the robot and other workpieces during the simulated movement process;
[0067] Step S305: When the movement distance is greater than the set safety distance, the target processing program is sent to the robot.
[0068] In the above embodiment, the processing program is compiled and used Figure 2 The kinematics module in the simulation interface drives the robot and additional equipment models to move. The steps are briefly described as follows: The movement of the robot model requires trajectory planning in the joint space or Cartesian space. For example, for the movement in the joint space, the robot motion instructions are parsed to obtain the joint angles of the start and end points, and the trajectory planning in the joint space is X(s) = X start +s(X end -X start ), obtain several path points, and then use forward kinematics to obtain the position and posture of the robot model in space. The forward kinematics formula of the robot is as follows Among them, α i-1 is the connecting rod torsion angle on the i-1th connecting rod, a i-1 is the length of the i-1th connecting rod, θ i is the i-th joint rotation, d i is the connecting rod offset of the ith connecting rod, i-1 T i is the pose transformation matrix of the ith local coordinate system relative to the i-1th local coordinate system, x and z are the x-axis and z-axis of the corresponding local coordinate system, Rot(x, α i-1 ) indicates that the local coordinate system rotates around the x-axis α i-1 Angle, Trans(a i-1 , 0, 0) means moving along the x-axis a i-1 ,Rot(z,θ i ) represents the rotation θ around the z-axis i ,Trans(z,d i ) represents the movement along the Z axis d iAfter obtaining the posture, the robot can be controlled to move in the virtual space according to the posture, and the movement distance can be obtained to observe whether there are any problems with the robot's movement in the virtual space, such as whether it will collide with other workpieces. If the movement distance is greater than the set safety distance, it means that there is no problem with the robot's movement, which further indicates that there is no problem with the target processing program. Then, the target processing program is sent to the robot controller of the robot to control the robot to move in the actual space. Effectively control the movement of the robot in the joint space, complete the processing operation on the workpiece, and achieve precise processing requirements.
[0069] In order to accurately execute the processing program, in an optional implementation, after the above step S204, the above method further includes:
[0070] Step S401, parsing the target machining program of the robot to obtain a plurality of starting Cartesian coordinates and a plurality of ending Cartesian coordinates, wherein the starting Cartesian coordinates are Cartesian position coordinates of the robot before the robot moves in the Cartesian space, and the ending Cartesian coordinates are Cartesian position coordinates of the robot after the robot moves in the Cartesian space;
[0071] Step S402, using the sixth formula to calculate the corresponding path point according to the above starting Cartesian coordinates and the above ending Cartesian coordinates, the above sixth formula is X(s) = X' start +s(X′ end -X′ start ), X(s) is the path point, X′ start is the starting Cartesian coordinate, X′ end is the above-mentioned terminal Cartesian coordinate, s is the time scale;
[0072] Step S403, using inverse kinematics to calculate the joint angles of the robot at each of the path points to obtain a plurality of joint angles;
[0073] Step S404, calculating the joint posture of the robot corresponding to the joint angle using forward kinematics for each of the path points to obtain the position and posture of the end effector of the robot;
[0074] Step S405, controlling the robot to simulate the machining process of the workpiece to be machined according to all the postures to obtain a movement distance, where the movement distance is the distance between the robot and other workpieces during the simulated movement process;
[0075] Step S406: When the movement distance is greater than the set safety distance, the target processing program is sent to the robot.
[0076] In the above embodiment, for the movement in Cartesian space, the Cartesian coordinates of the start and end points are obtained by analyzing the robot movement instructions. According to the above sixth formula X(s)=X′ start +s(X′ end -X′ start ) Perform trajectory planning in Cartesian space, obtain path points, use robot inverse kinematics to obtain joint angles, and then use forward kinematics to obtain the robot model posture. The robot path point posture can be driven to move in the virtual space, and the movement distance can be obtained. Observe whether there are any problems with the robot's movement in the virtual space, such as whether it will collide with other workpieces. If the movement distance is greater than the set safety distance, it means that there is no problem with the robot's movement, which further indicates that there is no problem with the target processing program. Then, the target processing program is sent to the robot controller of the robot to control the robot's movement in the actual space. By compiling the target processing program, the robot's movement is converted from Cartesian space to joint space, effectively controlling the robot's movement in the joint space, and completing the processing operation on the workpiece to achieve precise processing requirements.
[0077] In order to improve the processing accuracy, in an optional implementation manner, the above step S205 includes:
[0078] Step S2051, controlling the robot to reconstruct the shape of the processed workpiece according to all the target processing programs to obtain a preliminary reconstructed workpiece model;
[0079] Step S2052: Control the robot to detect the machining quality of the preliminary reconstructed workpiece model, and reconstruct the preliminary reconstructed workpiece model in detail according to the geometric tolerances and the physical properties to obtain the reconstructed workpiece model.
[0080] In the above embodiment, the target processing program of the robot is sent to the robot controller, and the robot is controlled to complete tool replacement at the quick-change workstation, replace the grinding wheel, welding gun and glue gun, etc., and complete welding, cutting, grinding, gluing and other operations on the workpiece in the actual space. Figure 5 As mentioned above, during workpiece processing, the industrial camera at the end of the robot is used to collect the appearance information of the workpiece processing situation, and the workpiece model is reconstructed in real time in the virtual space to obtain a preliminary reconstructed workpiece model. For example, when the part is being glued, the shape information of the glue line is collected, and the glue line situation during processing is displayed in real time on the part model in the simulation interface. After the workpiece processing is completed, the robot loads the measurement program and controls the robot to replace the tool with a probe at the quick-change workstation. The probe is used to check the processing quality of the workpiece, the shape and position tolerances and physical properties of the workpiece after processing, and the preliminary reconstructed workpiece model is reconstructed in detail in the virtual space. This facilitates offline programming simulation when the workpiece is processed in the next process.
[0081] In order to reduce the difficulty of building a complex workpiece model, in an optional implementation manner, before the above step S205, the method further includes:
[0082] Step S501, obtaining point cloud data, geometric tolerances and physical properties of a complex workpiece to be processed, wherein the point cloud data is surface feature point position data of the complex workpiece to be processed, and the complex workpiece to be processed is a workpiece with a complex structure and without a workpiece model;
[0083] Step S502 , fitting a virtual workpiece model based on the point cloud data, assigning the geometric tolerances and the physical properties to the virtual workpiece model, and generating a target machining program for the complex workpiece to be machined.
[0084] In the above embodiment, combined with Figure 6 , introduces the process of constructing complex models from point clouds, Figure 6 A flowchart of constructing a complex workpiece model from a point cloud is provided according to an embodiment of the present application. For workpieces with complex structures, there is no precise workpiece model. In order to reduce the difficulty of constructing a complex workpiece model, a robot workstation is established in a virtual space, and a corresponding actual workstation is built. The robot loads the measurement program, and the robot automatically measures the positions of a large number of feature points on the surface of the complex workpiece to be processed with the help of a probe, a displacement sensor, and a force sensor. At the same time, the robot automatically measures the form and position tolerances and physical properties of the surface of the complex workpiece to be processed on the processing path with the help of a probe, a displacement sensor, and a force sensor. Point cloud data is constructed based on the position information of all feature points collected, and a workpiece model is fitted, displayed in a virtual space, and given form and position tolerances and physical properties. Offline programming simulation is performed to generate a target processing program to be executed by the robot.
[0085] It should also be noted that feature points refer to points on the surface of the workpiece to be processed, such as the endpoints of lines and points on faces, which can characterize the shape of the workpiece. Virtual space refers to the use of computer graphics technology to establish robot models, workpiece models and other additional equipment models, and to build an overall model of the robot workstation that corresponds one-to-one with the actual robot workstation. The robot model can be dragged in the virtual space for offline teaching.
[0086] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0087] The embodiment of the present application also provides a robot reconstruction workpiece model device. It should be noted that the robot reconstruction workpiece model device of the embodiment of the present application can be used to execute the method for robot reconstruction workpiece model provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0088] The following is an introduction to the robot workpiece model reconstruction device provided in an embodiment of the present application.
[0089] Figure 7 1 is a structural block diagram of a robot-assisted workpiece model reconstruction device according to an embodiment of the present application. Figure 7 As shown, the device comprises:
[0090] The first acquisition unit 10 is used to use a robot to acquire the position coordinates of sampling points on the path to be processed, wherein the path to be processed is the path of the robot when reconstructing along the surface of the workpiece to be processed, and the position coordinates of the sampling points are the position coordinates of the sampling points on the path to be processed.
[0091] Specifically, the overall layout of the robot digital twin system is as follows: Figure 3 As shown, the digital twin system 9 is deployed in the host computer and connected to the robot controller 8 and the joint displacement and force sensor 7 of the robot 6, and the industrial camera 5 at the end of the robot through data cables, so as to obtain the information of the rotation angle and torque of each joint of the robot 6, the processing status of the workpiece, and transmit the robot task program generated by offline programming to the robot controller 8. The robot 6 is used to perform the operation task. There is also a workbench 2 in the scene, which is used to place the workpiece 1 to be processed. The quick-change workstation 3 is used to replace tools for the robot 6, such as the probe 4 used for measurement and the welding gun, grinding wheel, glue gun and other tools used for work. The robot 6, the workpiece 1 and the additional equipment models are imported and adjusted to a suitable layout so that the workbench 2 is within the reachable space of the robot 6. According to the layout, the actual robot workstation is built, the material is loaded, and the workpiece 1 is placed in the corresponding position. The robot 6 first works according to the measurement program and moves to the quick-change workstation 3 to install the probe 4. The probe 4 at the end of the robot 6 moves along the path to be processed of the workpiece 1, and uses the joint displacement and force sensor 7 to collect the positions of different sampling points on the same straight line, the positions of different sampling points on the same circle, and the positions of different sampling points on the same plane to obtain the sampling point position coordinates.
[0092] It should also be noted that, for a workpiece with a complex structure, the point cloud model generation module 13 generates the positions of the feature points of the workpiece with a complex structure.
[0093] The first calculation unit 20 is used to calculate the geometric tolerance according to the position coordinates of the sampling points, and the geometric tolerance includes straightness, flatness and roundness.
[0094] Specifically, Figure 3 As shown, the geometric tolerance module 15 in the simulation interface 10 is used to calculate straightness, roundness and flatness. Of course, other geometric tolerances besides straightness, roundness and flatness can also be calculated.
[0095] The second calculation unit 30 is used to control the robot to move along the processing direction on the processing path to calculate the physical properties in the processing direction, and the physical properties at least include the hardness of the workpiece to be processed.
[0096] Specifically, Figure 3 As shown, the probe 4 at the end of the robot is at the sampling point on the workpiece 1, and the end of the robot 6 moves along the processing direction (such as grinding is the normal direction of the grinding plane), and the joint displacement and force sensor 7 are used to collect the movement distance of the probe 4 and the torque at each joint. The dynamics module 14 in the simulation interface 10 calculates the force received by the probe 4 at the end of the robot in the processing direction, thereby calculating the hardness, toughness and other physical properties of the workpiece 1 in the processing path and the processing direction.
[0097] The first generating unit 40 is used to adjust the process parameters in the processing program of the workpiece to be processed based on the above-mentioned geometric tolerances and the above-mentioned physical properties to generate a target processing program, and the above-mentioned process parameters at least include welding height, glue gun height and grinding wheel force.
[0098] Specifically, for each workpiece to be processed, the calculated geometric tolerances and physical properties are assigned to the workpiece model through robot measurement data, and the process parameters of the corresponding commands in the robot task program are automatically adjusted, specifically as follows: Figure 3 As shown, the process parameters in each process module are adjusted through the control instruction process parameter generator 16 in the program editing interface 11, so as to automatically modify the robot's processing program. For example, when the robot performs a precise gluing task, the height of the glue gun is adjusted according to the gluing plane and the different flatness. If the measured part flatness error is large, the glue gun will be raised to prevent the glue line from being too thin or the glue from being broken. When the robot performs a precise grinding task, the grinding is adjusted according to the different hardness of the workpiece processing plane. If the hardness of the part is measured to be high, the force applied to the normal direction of the grinding plane by the end of the robot will be increased to improve the consistency of the grinding effect. The processing accuracy of workpieces with different properties is improved, and the operation complexity is reduced.
[0099] The first reconstruction unit 50 is used to control the robot to execute the target machining program to machine the workpiece to obtain a machined workpiece, and to reconstruct the machined workpiece to obtain a reconstructed workpiece model.
[0100] Specifically, Figure 3 As shown, the robot controller 8 will receive the target processing program, control the robot 6 to execute the target processing program to process the workpiece 1, and collect the shape data of the workpiece 1 during the processing, reconstruct the workpiece model in the virtual space in real time, and use the digital twin system 9 to monitor the processing process of the robot 6; finally, the robot 9 is used to measure the processed workpiece, that is, the above-mentioned processed workpiece, to obtain the appearance data, shape and position tolerances and physical properties of the processed workpiece, and reconstruct the workpiece model in the virtual space in detail to obtain a reconstructed workpiece model, and finally display the reconstructed workpiece model through a graphic user interface, as shown in FIG. Figure 4 As shown, the graphical user interface includes a simulation interface 10 and a program editing interface 11, and can be used for the processing of the next process. It should also be noted that before the robot controller 8 receives the target processing program, it is also necessary to use the kinematics module 12 to drive the robot 6 and the additional equipment model to move in the simulation interface 10 to ensure that the target processing program is correct.
[0101] In this embodiment, the first acquisition unit is used to acquire the position coordinates of the sampling points on the path to be processed, the path to be processed is the path when the robot reconstructs along the surface of the workpiece to be processed, and the sampling point position coordinates are the position coordinates of the sampling points on the path to be processed; the first calculation unit is used to calculate the form and position tolerances according to the sampling point position coordinates, and the form and position tolerances include straightness, flatness and roundness; the second calculation unit is used to control the robot to move along the processing direction on the path to be processed, and calculate the physical properties in the processing direction, and the physical properties at least include the hardness of the workpiece to be processed; the first generation unit is used to adjust the process parameters in the processing program of the workpiece to be processed based on the form and position tolerances and the physical properties, and generate a target processing program, and the process parameters at least include welding height, glue gun height and grinding wheel force; the first reconstruction unit is used to control the robot to execute the target processing program to process the workpiece to be processed to obtain a processed workpiece, and reconstruct the processed workpiece to obtain a reconstructed workpiece model robot. This application avoids the problem of purchasing measuring equipment at high cost by measuring the posture of the workpiece to be processed, the form and position tolerances such as straightness, flatness, roundness and physical properties such as hardness and toughness on the workpiece to be processed path, and automatically adjusts the processing program of the corresponding workpiece according to the form and position tolerances and physical properties, thereby improving the processing accuracy and reducing the complexity of operation. Finally, the robot is controlled to reconstruct according to the adjusted processing program to obtain a reconstructed workpiece model. This application solves the problem in the prior art that the form and position tolerances and physical properties of the workpiece are not fully considered, resulting in low processing accuracy of the reconstructed workpiece model.
[0102] In order to avoid the high cost of purchasing measurement equipment and reduce the complexity of operation, in an optional implementation, the first calculation unit includes:
[0103] The first fitting module uses the least square method to fit the regression line according to all the above straight line sampling position coordinates;
[0104] A first calculation module calculates the absolute value of the distance between each first sampling point and the regression line to obtain the absolute value of the first distance corresponding to each first sampling point, and calculates the average of the absolute values of the first distances of all the first sampling points to obtain the straightness, wherein the first sampling point is the sampling point on the straight line;
[0105] The second fitting module uses the least square method to fit the regression surface according to all the above plane sampling position coordinates;
[0106] A second calculation module calculates the absolute value of the distance between the second sampling point and the regression surface to obtain the second distance absolute value corresponding to each of the second sampling points, and calculates the average of the second distance absolute values of all the second sampling points to obtain the flatness, wherein the second sampling point is the sampling point on the plane;
[0107] The third fitting module uses the least square method to fit the regression curve according to all the circumferential sampling position coordinates;
[0108] The third calculation module calculates the absolute value of the distance between the third sampling point and the regression curve to obtain the absolute value of the third distance corresponding to each of the third sampling points, and calculates the average of the absolute values of the third distances of all the third sampling points to obtain the roundness, wherein the third sampling point is the sampling point on the circumference.
[0109] In the above embodiment, the sampling point position coordinates include straight line sampling position coordinates, plane sampling position coordinates and circular sampling position coordinates. The straight line sampling position coordinates are the position coordinates of different sampling points on the same straight line, and the plane sampling position coordinates are the position coordinates of different sampling points on the same plane. Figure 3 As shown, the robot, workpiece and additional equipment models are imported into the virtual space and adjusted to a suitable layout so that the workbench is within the reachable space of the robot. The actual robot workstation is built according to the layout, and the workpiece is loaded and placed in the corresponding position. The robot first operates according to the measurement program and moves to the quick-change workstation to install the probe. The probe at the end of the robot moves along the processing path of the workpiece to be processed, and uses the joint displacement sensor to collect the positions of different sampling points on the same straight line, the positions of different sampling points on the same circle, and the positions of different sampling points on the same plane. Figure 3 The geometric tolerance module in the calculation of straightness, roundness and flatness, or other errors. The following is a brief description of the calculation steps using straightness as an example: First, the least squares method is used to fit the straight line based on the position data of the sampling points on the straight line obtained above. Suppose the positions of the sampling points are (x1, y1, z1), (x2, y2, z2), (x3, y3, z3)...(x n ,y n , z n ), the linear equation is y = ax + b, the least squares method of fitting a straight line is to find the coefficients a and b in the linear equation y = ax + b so that the sum of squared errors is minimized. The sum of squared errors M is Characterization, the coefficients a and b of the line equation can be obtained by solving a set of linear equations that make the partial derivative of the error sum of squares M zero, and then the average of the absolute values of the distances from each sampling point to the regression line can be solved to obtain the straightness of the path to be processed. When calculating other errors such as flatness and roundness, the line equation is replaced with the corresponding geometric curve or surface equations such as the plane equation and the arc equation, and the regression equation of the corresponding curve or surface is calculated using the least squares method. Then the average of the absolute values of the distances from each sampling point to the regression curve or surface is solved to obtain the corresponding flatness and roundness.
[0110] In order to avoid the high cost of purchasing measurement equipment and reduce the complexity of operation, in an optional implementation, the second calculation unit includes:
[0111] The fourth calculation module calculates the additional force of the robot according to the first formula. The additional force is the additional force that the robot needs to apply at the i-th joint. The first formula is in, i f i is the additional force mentioned above, is the rotation transformation matrix of the local coordinate system at the i+1th joint relative to the local coordinate system at the i-th joint, i+1 f i+1 is the additional force that needs to be applied at the i+1th joint of the above robot;
[0112] The fifth calculation module calculates the additional torque of the robot according to the second formula. The additional torque is the torque that the robot needs to apply additionally at the i-th joint. The second formula is: in, i n i is the above additional torque, i+1 n i+1 is the additional torque that needs to be applied to the i+1th joint of the above robot, i P i+1 is the coordinate vector of the origin of the i+1th local coordinate system in the i-th local coordinate system, i f i+1 is the expression of the additional force that needs to be applied at the i+1th joint of the above robot in the ith local coordinate system;
[0113] The sixth calculation module calculates the driving torque required to be output by the i-th joint of the robot in the processing direction according to the third formula when the i-th joint of the robot is a rotary joint. The third formula is: τ i is the driving torque of the above-mentioned i-th joint, The additional torque i n i The transpose of is the Z-axis vector of the i-th joint of the robot corresponding to the i-th local coordinate system;
[0114] The seventh calculation module calculates the driving force required to be output by the i-th joint of the robot in the processing direction according to the fourth formula when the i-th joint of the robot is a moving joint. The fourth formula is: ω i is the driving force of the i-th joint, i f i T For the above additional force i f i The transpose of
[0115] The force application module applies the driving torque or the driving force to each joint of the robot to obtain the hardness of the workpiece to be processed in the processing direction.
[0116] In the above embodiment, the end probe of the robot is first located at the sampling point on the workpiece, and the end probe of the robot moves along the processing direction (for example, the grinding task is the normal direction of the grinding plane), and the joint displacement sensor and the joint force sensor are used to collect the probe movement distance and the torque at each joint. Figure 3 The dynamics module in the robot calculates the force on the robot's end probe in the processing direction, and uses this to calculate the hardness, toughness and other physical properties of the workpiece along the processing path. The details are as follows: First, the robot moves to the measurement position. Since the robot's movement distance and speed are extremely small when measuring hardness, it can be considered that the robot is in a static equilibrium state at this time. At this time, the force balance of the robot's i-th connecting rod joint is as follows in, Represents the rotation transformation matrix. The subscript represents the transformation matrix of the local coordinate system at the i+1th joint relative to the i-th local coordinate system. The other symbols and subscripts have the same meaning. i P i+1 Represents the coordinates or position vector of the origin of the i+1th local coordinate system in the i-th coordinate system. f and n are the additional forces and torques required at each joint. Since the robot's configuration can be obtained by the displacement sensors at each joint, a fixed force is applied to the end when measuring the hardness of the workpiece. Therefore, the torque n or force f at each joint of the robot can be obtained by recursion from the end of the robot from back to front. If the i-th joint is a revolute joint, then Get the torque τ that each joint motor needs to output i ,in yes i n i The transpose of i n i The definition of has been given by the above calculation, is the z-axis vector of the ith local coordinate system. If the ith joint is a mobile joint, then Get the driving force ω that each joint motor needs to output i ,in i f i T yes i f i The transpose of i n i The definition of has been given by the above calculation, The definition is the same as above. Here, Rockwell hardness is used to characterize the hardness of the workpiece to be processed. Rockwell hardness is calculated by the indentation depth of the material when a fixed load is applied. When it is necessary to apply a fixed load to the end of the robot for hardness measurement, the additional torque τ that should be applied at each joint can be recursively calculated by the above formula. i or force ω i The joint force sensor can measure the torque currently applied at each joint, so as to adjust the actual calculated driving torque or driving force, so as to apply the fixed load required for hardness measurement to the end probe of the robot. Finally, the joint displacement sensor obtains the displacement of each joint during the hardness measurement process, thereby obtaining the displacement h of the end probe of the robot, according to the Rockwell hardness calculation formula: Where k is a specified constant, h is the indentation depth of the part when a fixed load is applied, which is the robot end displacement h calculated earlier. This can be used to obtain the hardness HR of the workpiece to be processed. Physical properties such as toughness are also measured and calculated.
[0117] In order to accurately execute the processing program, in an optional embodiment, the first reconstruction unit device at least includes:
[0118] A first parsing unit is used for, after adjusting the process parameters in the machining program of the workpiece to be machined based on the geometric tolerance and the physical property to generate a target machining program, parsing the target machining program of the robot to obtain a plurality of starting joint angles and a plurality of ending joint angles, wherein the starting joint angle is a position angle of the current joint before the movement, and the ending joint angle is a position angle of the current joint after the movement;
[0119] The third calculation unit is used to calculate the corresponding path point according to each of the above starting joint angles and the above ending joint angles using the fifth formula, and the above fifth formula is X(s)=X start +s(X end -X start ), X(s) is the path point mentioned above, X start is the starting joint angle, X end is the above-mentioned terminal joint angle, s is the time scale;
[0120] A fourth calculation unit, used for calculating the joint posture of the robot in the joint space by using forward kinematics for each of the path points to obtain the position and posture of the end effector of the robot;
[0121] A second reconstruction unit is used to control the robot to simulate the machining process of the workpiece to be machined according to all the postures to obtain a movement distance, where the movement distance is the distance between the robot and other workpieces during the simulation movement process;
[0122] The first sending unit is used to send the target processing program to the robot when the movement distance is greater than the set safety distance.
[0123] In the above embodiment, the processing program is compiled and used Figure 2 The kinematics module in the simulation interface drives the robot and additional equipment models to move. The steps are briefly described as follows: The movement of the robot model requires trajectory planning in the joint space or Cartesian space. For example, for the movement in the joint space, the robot motion instructions are parsed to obtain the joint angles of the start and end points, and the trajectory planning in the joint space is X(s) = X start +s(X end -X start ), obtain several path points, and then use forward kinematics to obtain the position and posture of the robot model in space. The forward kinematics formula of the robot is as follows Among them, α i-1 is the connecting rod torsion angle on the i-1th connecting rod, a i-1 is the length of the i-1th connecting rod, θ i is the i-th joint rotation, d i is the connecting rod offset of the ith connecting rod, i-1 T i is the pose transformation matrix of the ith local coordinate system relative to the i-1th local coordinate system, x and z are the x-axis and z-axis of the corresponding local coordinate system, Rot(x, α i-1 ) indicates that the local coordinate system rotates around the x-axis α i-1 Angle, Trans(a i-1 , 0, 0) means moving along the x-axis a i-1 ,Rot(z,θ i ) represents the rotation θ around the z-axis i ,Trans(z,d i ) represents the movement along the Z axis d iAfter obtaining the posture, the robot is controlled to move in the virtual space according to the posture, and the movement distance is obtained. It is observed whether there are any problems with the robot's movement in the virtual space, such as whether it will collide with other workpieces. If the movement distance is greater than the set safety distance, it means that there is no problem with the robot's movement, which further indicates that there is no problem with the target processing program. Then, the target processing program is sent to the robot controller of the robot to control the robot to move in the actual space. Effectively control the movement of the robot in the joint space, complete the processing operation of the workpiece, and achieve precise processing requirements.
[0124] In order to accurately execute the processing procedure, in an optional embodiment, the above-mentioned device further includes:
[0125] A second parsing unit is used for, after adjusting the process parameters in the machining program of the workpiece to be machined based on the geometric tolerance and the physical property to generate a target machining program, parsing the target machining program of the robot to obtain a plurality of starting Cartesian coordinates and a plurality of ending Cartesian coordinates, wherein the starting Cartesian coordinates are Cartesian position coordinates of the robot before the robot moves in the Cartesian space, and the ending Cartesian coordinates are Cartesian position coordinates of the robot after the robot moves in the Cartesian space;
[0126] A fifth calculation unit is used to calculate the corresponding path point using the sixth formula according to each of the above starting Cartesian coordinates and the above ending Cartesian coordinates, and the above sixth formula is X(s)=X′ start +s(X′ end -X′ start ), X(s) is the path point, X′ start is the starting Cartesian coordinate, X′ end is the above-mentioned terminal Cartesian coordinate, s is the time scale;
[0127] a sixth calculation unit, configured to calculate the joint angles of the robot at each of the path points using inverse kinematics to obtain a plurality of joint angles;
[0128] a seventh calculation unit, configured to calculate the joint posture of the robot corresponding to the joint angle for each of the path points by using forward kinematics to obtain the position and posture of the end effector of the robot;
[0129] The third reconstruction unit is used to control the robot to simulate the machining process of the workpiece to be machined according to all the postures to obtain a movement distance, where the movement distance is the distance between the robot and other workpieces during the simulation movement process;
[0130] The second sending unit is used to send the target processing program to the robot when the movement distance is greater than the set safety distance.
[0131] In the above embodiment, for the movement in Cartesian space, the Cartesian coordinates of the start and end points are obtained by analyzing the robot movement instructions. According to the above sixth formula X(s)=X′ start +s(X′ end -X′ start ) Perform trajectory planning in Cartesian space, obtain path points, use robot inverse kinematics to obtain joint angles, and then use forward kinematics to obtain the robot model posture. The robot path point posture can be driven to move in this way. The robot path point posture can be driven to move in this way in the virtual space. The movement distance is obtained, and it is observed whether there are any problems with the robot's movement in the virtual space, such as whether it will collide with other workpieces. If the movement distance is greater than the set safety distance, it means that there is no problem with the robot's movement, which further indicates that there is no problem with the target processing program. Then, the target processing program is sent to the robot controller of the robot to control the robot to move in the actual space. By compiling the target processing program, the robot's movement is converted from Cartesian space to joint space, effectively controlling the movement of the robot in the joint space, and completing the processing operation on the workpiece to achieve precise processing requirements.
[0132] In order to improve the processing accuracy, in an optional implementation manner, the first reconstruction unit includes:
[0133] A first reconstruction module controls the robot to reconstruct the shape of the processed workpiece according to all the target processing programs to obtain a preliminary reconstructed workpiece model;
[0134] The second reconstruction module controls the robot to detect the machining quality of the preliminary reconstructed workpiece model, and reconstructs the details of the preliminary reconstructed workpiece model according to the geometric tolerances and the physical properties to obtain the reconstructed workpiece model.
[0135] In the above embodiment, the robot's target processing program is sent to the robot controller, and the robot is controlled to complete tool replacement at the quick-change workstation, replace the grinding wheel, welding gun and glue gun, etc., and complete welding, cutting, grinding, gluing and other operations on the workpiece in the actual space. In the process of performing the task, the industrial camera at the end of the robot is used to collect the appearance information of the workpiece processing situation, and the workpiece model is reconstructed in real time in the virtual space to obtain a preliminary reconstructed workpiece model. For example, when the part is glued, the appearance information of the glue line is collected, and the glue line situation in the process is displayed in real time on the part model in the simulation interface. After the workpiece processing is completed, the robot loads the measurement program, controls the robot to replace the tool with a probe at the quick-change workstation, uses the probe to check the processing quality of the workpiece, the shape and position tolerances and physical properties of the workpiece after processing, and uses this to reconstruct the preliminary reconstructed workpiece model in detail in the virtual space. It is convenient for the workpiece to be processed in the next process for offline programming simulation.
[0136] In order to reduce the difficulty of building a complex workpiece model, in an optional implementation, the device further includes:
[0137] A second acquisition unit is used for acquiring point cloud data, form and position tolerances, and physical properties of a complex workpiece to be processed before controlling the robot to execute the target processing program to reconstruct the workpiece to be processed and obtaining a reconstructed workpiece model, wherein the point cloud data is surface feature point position data of the complex workpiece to be processed, and the complex workpiece to be processed is a workpiece with a complex structure and no workpiece model;
[0138] The second generating unit is used to fit a virtual workpiece model based on the point cloud data, and to assign the geometric tolerances and the physical properties to the virtual workpiece model, so as to generate a target processing program for the complex workpiece to be processed.
[0139] In the above embodiment, combined with Figure 6 , introduces the process of constructing complex models from point clouds, Figure 6 A flowchart of constructing a complex workpiece model from a point cloud is provided according to an embodiment of the present application. For workpieces with complex structures, there is no precise workpiece model. In order to reduce the difficulty of constructing a complex workpiece model, a robot workstation is established in a virtual space, and a corresponding actual workstation is built. The robot loads the measurement program, and the robot automatically measures the positions of a large number of feature points on the surface of the complex workpiece to be processed with the help of a probe, a displacement sensor, and a force sensor. At the same time, the robot automatically measures the form and position tolerances and physical properties of the surface of the complex workpiece to be processed on the processing path with the help of a probe, a displacement sensor, and a force sensor. Point cloud data is constructed based on the position information of all feature points collected, and a workpiece model is fitted, displayed in a virtual space, and given form and position tolerances and physical properties. Offline programming simulation is performed to generate a target processing program to be executed by the robot.
[0140] It should also be noted that feature points refer to points on the surface of the workpiece to be processed, such as the endpoints of lines and points on faces, which can characterize the shape of the workpiece. Virtual space refers to the use of computer graphics technology to establish robot models, workpiece models and other additional equipment models, and to build an overall model of the robot workstation that corresponds one-to-one with the actual robot workstation. The robot model can be dragged in the virtual space for offline teaching.
[0141] The robot reconstructs the workpiece model device including a processor and a memory. The first acquisition unit, the first calculation unit, the second calculation unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0142] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of low machining accuracy of the reconstructed workpiece model caused by insufficient consideration of the shape and position tolerances and physical properties of the workpiece in the prior art can be solved by adjusting the kernel parameters.
[0143] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0144] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the robot workpiece model reconstruction method.
[0145] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the robot reconstructs a workpiece model method when the program is running.
[0146] An embodiment of the present invention provides a robot digital twin system, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:
[0147] Step S201, using a robot to obtain the position coordinates of sampling points on a path to be processed, the path to be processed being the path along which the robot reconstructs the surface of the workpiece to be processed, and the position coordinates of the sampling points being the position coordinates of the sampling points on the path to be processed;
[0148] Step S202, calculating the geometric tolerances according to the sampling point position coordinates, the geometric tolerances including straightness, flatness and roundness;
[0149] Step S203, controlling the robot to move along a processing direction on the processing path to be processed, so as to calculate physical properties in the processing direction, wherein the physical properties at least include the hardness of the workpiece to be processed;
[0150] Step S204, adjusting the process parameters in the processing program of the workpiece to be processed based on the geometric tolerances and the physical properties to generate a target processing program, wherein the process parameters at least include welding height, glue gun height and grinding wheel force;
[0151] Step S205 , controlling the robot to execute the target processing program to process the workpiece to be processed to obtain a processed workpiece, and reconstructing the processed workpiece to obtain a reconstructed workpiece model.
[0152] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0153] Step S201, using a robot to obtain the position coordinates of sampling points on a path to be processed, the path to be processed being the path along which the robot reconstructs the surface of the workpiece to be processed, and the position coordinates of the sampling points being the position coordinates of the sampling points on the path to be processed;
[0154] Step S202, calculating the geometric tolerances according to the sampling point position coordinates, the geometric tolerances including straightness, flatness and roundness;
[0155] Step S203, controlling the robot to move along a processing direction on the processing path to be processed, so as to calculate physical properties in the processing direction, wherein the physical properties at least include the hardness of the workpiece to be processed;
[0156] Step S204, adjusting the process parameters in the processing program of the workpiece to be processed based on the geometric tolerances and the physical properties to generate a target processing program, wherein the process parameters at least include welding height, glue gun height and grinding wheel force;
[0157] Step S205 , controlling the robot to execute the target processing program to process the workpiece to be processed to obtain a processed workpiece, and reconstructing the processed workpiece to obtain a reconstructed workpiece model.
[0158] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0159] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0160] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0163] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0164] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0165] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0166] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0167] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0168] 1) The robot reconstructing workpiece model method of the present application, first, using a robot to obtain the position coordinates of sampling points on the path to be processed, the above-mentioned path to be processed is the path when the above-mentioned robot reconstructs along the surface of the workpiece to be processed, and the above-mentioned sampling point position coordinates are the position coordinates of the sampling points on the above-mentioned path to be processed; then, the form and position tolerances are calculated according to the above-mentioned sampling point position coordinates, and the above-mentioned form and position tolerances include straightness, flatness and roundness; then, the above-mentioned robot is controlled to move along the processing direction on the above-mentioned path to be processed to calculate the physical properties in the above-mentioned processing direction, and the above-mentioned physical properties at least include the hardness of the above-mentioned workpiece to be processed; then, based on the above-mentioned form and position tolerances and the above-mentioned physical properties, the process parameters in the processing program of the above-mentioned workpiece to be processed are adjusted to generate a target processing program, and the above-mentioned process parameters at least include welding height, glue gun height and grinding wheel force; finally, the above-mentioned robot is controlled to execute the above-mentioned target processing program to process the above-mentioned workpiece to be processed to obtain a processed workpiece, and the above-mentioned processed workpiece is reconstructed to obtain a reconstructed workpiece model. This application avoids the problem of purchasing measuring equipment at high cost by measuring the posture of the workpiece to be processed, the form and position tolerances such as straightness, flatness, roundness and physical properties such as hardness and toughness on the workpiece to be processed path, and automatically adjusts the processing program of the corresponding workpiece according to the form and position tolerances and physical properties, thereby improving the processing accuracy and reducing the complexity of operation. Finally, the robot is controlled to reconstruct according to the adjusted processing program to obtain a reconstructed workpiece model. This application solves the problem in the prior art that the form and position tolerances and physical properties of the workpiece are not fully considered, resulting in low processing accuracy of the reconstructed workpiece model.
[0169] 2) The robot reconstructing workpiece model device of the present application comprises a first acquisition unit, which is used to use the robot to acquire the position coordinates of the sampling points on the path to be processed, wherein the path to be processed is the path when the robot reconstructs along the surface of the workpiece to be processed, and the position coordinates of the sampling points are the position coordinates of the sampling points on the path to be processed; a first calculation unit, which is used to calculate the geometric tolerances according to the position coordinates of the sampling points, wherein the geometric tolerances include straightness, flatness and roundness; a second calculation unit, which is used to control the robot to move along the processing direction on the path to be processed, and calculate the physical properties in the processing direction, wherein the physical properties at least include the hardness of the workpiece to be processed; a first generation unit, which is used to adjust the process parameters in the processing program of the workpiece to be processed based on the geometric tolerances and the physical properties, and generate a target processing program, wherein the process parameters at least include the welding height, the glue gun height and the force of the grinding wheel; a first reconstruction unit, which is used to control the robot to execute the target processing program to process the workpiece to be processed, obtain the processed workpiece, and reconstruct the processed workpiece to obtain the reconstructed workpiece model. This application avoids the problem of purchasing measuring equipment at high cost by measuring the posture of the workpiece to be processed, the form and position tolerances such as straightness, flatness, roundness and physical properties such as hardness and toughness on the workpiece to be processed path, and automatically adjusts the processing program of the corresponding workpiece according to the form and position tolerances and physical properties, thereby improving the processing accuracy and reducing the complexity of operation. Finally, the robot is controlled to reconstruct according to the adjusted processing program to obtain a reconstructed workpiece model. This application solves the problem in the prior art that the form and position tolerances and physical properties of the workpiece are not fully considered, resulting in low processing accuracy of the reconstructed workpiece model.
[0170] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A robot reconstructs a workpiece model, characterized in that: include: Using a robot to obtain the position coordinates of sampling points on a path to be processed, the path to be processed is a path when the robot reconstructs along the surface of the workpiece to be processed, and the position coordinates of the sampling points are the position coordinates of the sampling points on the path to be processed; Calculating geometric tolerances according to the sampling point position coordinates, wherein the geometric tolerances include straightness, flatness and roundness; Controlling the robot to move along a processing direction on the path to be processed to calculate physical properties in the processing direction, wherein the physical properties at least include the hardness of the workpiece to be processed; Adjusting the process parameters in the processing program of the workpiece to be processed based on the geometric tolerance and the physical property to generate a target processing program, wherein the process parameters at least include welding height, glue gun height and grinding wheel force; The robot is controlled to execute the target processing program to process the workpiece to be processed to obtain a processed workpiece, and the processed workpiece is reconstructed to obtain a reconstructed workpiece model.
2. The method according to claim 1, characterized in that The sampling point position coordinates include straight line sampling position coordinates, plane sampling position coordinates and circumferential sampling position coordinates, the straight line sampling position coordinates are the position coordinates of different sampling points on the same straight line, the plane sampling position coordinates are the position coordinates of different sampling points on the same plane, and the circumferential sampling position coordinates are the position coordinates of different sampling points on the same circle. Calculating the geometric tolerance according to the sampling point position coordinates includes: A regression line is fitted using the least squares method according to all the linear sampling position coordinates; Calculating the absolute value of the distance between each first sampling point and the regression line to obtain the first distance absolute value corresponding to each first sampling point, and calculating the average of the first distance absolute values of all the first sampling points to obtain the straightness, the first sampling point being the sampling point on the straight line; A regression surface is fitted using the least square method according to all the plane sampling position coordinates; Calculating the absolute value of the distance between the second sampling point and the regression surface to obtain the second distance absolute value corresponding to each second sampling point, and calculating the average of the second distance absolute values of all the second sampling points to obtain the flatness, where the second sampling point is the sampling point on the plane; The regression curve is fitted using the least square method according to all the circumferential sampling position coordinates; The absolute value of the distance between the third sampling point and the regression curve is calculated to obtain the third distance absolute value corresponding to each of the third sampling points, and the average of the third distance absolute values of all the third sampling points is calculated to obtain the roundness, wherein the third sampling point is the sampling point on the circumference.
3. The method according to claim 1, characterized in that Controlling the robot to move along a processing direction on the path to be processed and calculating physical properties in the processing direction, including: The additional force of the robot is calculated according to the first formula, where the additional force is the additional force that the robot needs to apply at the i-th joint. The first formula is: in, i f i is the additional force, is the rotation transformation matrix of the local coordinate system at the i+1th joint relative to the local coordinate system at the i-th joint, i+1 f i+1 is the additional force that needs to be applied by the robot at the i+1th joint; The additional torque of the robot is calculated according to the second formula, where the additional torque is the torque that needs to be additionally applied to the robot at the i-th joint. The second formula is: in, i n i is the additional torque, i+1 n i+1 is the additional torque that the robot needs to apply at the i+1th joint, i P i+1 is the coordinate vector of the origin of the i+1th local coordinate system in the i-th local coordinate system, i f i+1 is the expression of the additional force that needs to be applied at the i+1th joint of the robot in the i-th local coordinate system; In the case where the i-th joint of the robot is a rotary joint, the driving torque required to be output by the i-th joint of the robot in the processing direction is calculated according to the third formula, and the third formula is: τ i is the driving torque of the i-th joint, The additional torque i n i The transpose of is the z-axis vector of the local coordinate system corresponding to the i-th joint of the robot; In the case where the i-th joint of the robot is a moving joint, the driving force required to be output by the i-th joint of the robot in the processing direction is calculated according to the fourth formula, and the fourth formula is: ω i is the driving force of the i-th joint, i f i T The additional force i f i The transpose of The driving torque or the driving force is applied to each joint of the robot to obtain the hardness of the workpiece to be processed in the processing direction.
4. The method according to claim 1, characterized in that: After adjusting the process parameters in the machining program of the workpiece to be machined based on the geometric tolerance and the physical property to generate a target machining program, the method at least comprises: Analyze the target machining program of the robot to obtain a plurality of starting joint angles and a plurality of ending joint angles, wherein the starting joint angle is a position angle of the current joint before the movement, and the ending joint angle is a position angle of the current joint after the movement; The corresponding path point is obtained by calculating the fifth formula according to each of the starting joint angle and the ending joint angle. The fifth formula is X(s)=X start +s(X end -X start ), X(s) is the path point, X start is the starting joint angle, X end is the terminal joint angle, s is the time scale; Calculating the joint posture of the robot in the joint space by using forward kinematics for each of the path points to obtain the position and posture of the end effector of the robot; Controlling the robot to simulate the machining process of the workpiece to be machined according to all the positions and postures to obtain a movement distance, where the movement distance is the distance between the robot and other workpieces during the simulation movement process; When the movement distance is greater than the set safety distance, the target processing program is sent to the robot.
5. The method according to claim 1, characterized in that After adjusting the process parameters in the machining program of the workpiece to be machined based on the geometric tolerance and the physical property to generate a target machining program, the method further includes: Parsing the target machining program of the robot to obtain a plurality of starting Cartesian coordinates and a plurality of ending Cartesian coordinates, wherein the starting Cartesian coordinates are Cartesian position coordinates of the robot before the robot moves in the Cartesian space, and the ending Cartesian coordinates are Cartesian position coordinates of the robot after the robot moves in the Cartesian space; The corresponding path point is obtained by calculating the starting Cartesian coordinates and the ending Cartesian coordinates using the sixth formula, and the sixth formula is X(s)=X' start +s(X' end -X' start ), X(s) is the path point, X' start is the starting Cartesian coordinate, X' end is the terminal Cartesian coordinate, s is the time scale; Calculating the joint angles of the robot at each of the path points using inverse kinematics to obtain a plurality of joint angles; For each of the path points, using forward kinematics to calculate the joint posture of the robot at the corresponding joint angle, to obtain the position and posture of the end effector of the robot; Controlling the robot to simulate the machining process of the workpiece to be machined according to all the positions and postures to obtain a movement distance, where the movement distance is the distance between the robot and other workpieces during the simulation movement process; When the movement distance is greater than the set safety distance, the target processing program is sent to the robot.
6. The method according to claim 1, characterized in that Reconstructing the processed workpiece to obtain the reconstructed workpiece model includes: Controlling the robot to reconstruct the shape of the processed workpiece according to all the target processing programs to obtain a preliminary reconstructed workpiece model; The robot is controlled to detect the machining quality of the preliminary reconstructed workpiece model, and the preliminary reconstructed workpiece model is reconstructed in detail according to the geometric tolerance and the physical property to obtain the reconstructed workpiece model.
7. The method according to claim 1, characterized in that Before controlling the robot to execute the target processing program to reconstruct the workpiece to be processed to obtain a reconstructed workpiece model, the method further includes: Acquire point cloud data, geometric tolerances, and physical properties of a complex workpiece to be processed, wherein the point cloud data is surface feature point position data of the complex workpiece to be processed, and the complex workpiece to be processed is a workpiece having a complex structure and having no workpiece model; A virtual workpiece model is fitted based on the point cloud data, and the shape and position tolerances and the physical properties are assigned to the virtual workpiece model to generate a target machining program for the complex workpiece to be machined.
8. A robot device for reconstructing a workpiece model, characterized in that: The device comprises: A first acquisition unit is used to acquire the position coordinates of the sampling points on the path to be processed by using the robot, wherein the path to be processed is the path along which the robot reconstructs the surface of the workpiece to be processed, and the position coordinates of the sampling points are the position coordinates of the sampling points on the path to be processed; A first calculation unit, used for calculating the geometric tolerance according to the position coordinates of the sampling points, wherein the geometric tolerance includes straightness, flatness and roundness; a second calculation unit, configured to control the robot to move along a processing direction on the path to be processed, and calculate physical properties in the processing direction, wherein the physical properties at least include a hardness of the workpiece to be processed; A first generating unit, configured to adjust the process parameters in the processing program of the workpiece to be processed based on the geometric tolerance and the physical property to generate a target processing program, wherein the process parameters at least include welding height, glue gun height and grinding wheel force; The first reconstruction unit is used to control the robot to execute the target processing program to process the workpiece to obtain a processed workpiece, and reconstruct the processed workpiece to obtain a reconstructed workpiece model.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A robot digital twin system, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of claims 1 to 7.
Citation Information
Cited By
Method for detecting form and location tolerance of product based on welding robot
CN120269553A
