Method and device for determining welding trajectory
By automatically determining the position and attitude of the welding trajectory points, the problem of low generation efficiency of traditional welding trajectory is solved, efficient welding operations are achieved, and technical thresholds are lowered.
Patent Information
- Application Number
- CN202210615237.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-05-31
AI Technical Summary
The traditional robot welding trajectory generation method is inefficient, relies on workers' high skills and teaching methods, and has a high technical threshold for welding complex parts.
By obtaining the corresponding pickup list of welding edges, divide the face into the faces located on the welding parts and the faces that do not belong to the welding parts, determine the reference faces of the welding edges, find the continuous welding edges and the corresponding welding surfaces, and finally according to the welding edges, The position and attitude of the welding track point are determined with the welding surface, and the offline programming method is used to realize the automatic determination of the welding track.
It greatly improves welding production efficiency, reduces the skill requirements for workers, does not require a teaching process, and simplifies the welding operation of complex parts.
Smart Images

Figure CN115122011B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a method and device for determining a welding trajectory. Background Art
[0002] In the field of mechanical manufacturing, especially in the automotive manufacturing industry, welding processes have high requirements on workers' skills and experience. The general welding work environment is dusty and unsafe. Using robots instead of manual labor can not only complete continuous and stable welding operations, but also has low technical barriers for welding complex parts.
[0003] Traditional robot welding generally uses a teaching method to generate welding trajectories. This method has certain requirements on the workers' craftsmanship level and has low efficiency. Summary of the invention
[0004] The main purpose of the present application is to provide a method and device for determining a welding trajectory, so as to solve the problem of low efficiency of the traditional method of generating welding trajectories based on the teaching method.
[0005] In order to achieve the above objective, according to a first aspect of the present application, a method for determining a welding trajectory is provided.
[0006] The method for determining a welding trajectory according to the present application includes: obtaining a pick list corresponding to a first welding edge, wherein the first welding edge is an edge picked up by a user on a welding part and needs to be welded, and the pick list contains all faces passed through when picking the first welding edge; dividing the faces in the pick list into two sets, the first set is the faces located on the welding part, and the second set is the faces not belonging to the welding part; determining a first reference surface and a second reference surface of the first welding edge according to the first set and the second set, the first reference surface and the second reference surface are two welding surfaces corresponding to the first welding edge; determining a welding edge set, a first reference surface set, and a second reference surface set according to the first welding edge, the first reference surface, and the second reference surface, the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets composed of two welding surfaces corresponding to each edge in the welding edge set; determining the position and posture of a welding trajectory point according to the welding edge set, the first reference surface set, and the second reference surface set.
[0007] Optionally, determining the first reference plane and the second reference plane of the first welding edge according to the first set and the second set includes: if the first set is empty and the second set is not empty, determining the second reference plane of the first welding edge according to the second set, and determining the first reference plane of the first welding edge according to an adjacent surface set of the first welding edge; if the first set is not empty and the second set is not empty, determining the first reference plane of the first welding edge according to the first set, and determining the second reference plane of the first welding edge according to the second set; if the first set is not empty and the second set is empty, determining the first reference plane of the first welding edge and the second reference plane of the first welding edge according to the adjacent surface set of the first welding edge.
[0008] Optionally, determining the second reference plane of the first welding edge according to the second set and determining the first reference plane of the first welding edge according to the adjacent plane set of the first welding edge includes: determining the first plane in the second set as the second reference plane of the first welding edge; calculating the normal of the current picking point on the second reference plane of the first welding edge, and the normal of the current picking point on each adjacent plane in the adjacent plane set of the first welding edge, and determining the adjacent plane corresponding to the minimum angle between the two normals as the first reference plane of the first welding edge, and the current picking point is a point on the first welding edge picked by the user.
[0009] Optionally, determining the first reference surface of the first welding edge according to the first set and determining the second reference surface of the first welding edge according to the second set includes: determining the first surface in the first set as the first reference surface of the first welding edge; determining the first surface in the second set as the second reference surface of the first welding edge.
[0010] Optionally, determining the first reference surface of the first welding edge and the second reference surface of the first welding edge according to the adjacent surface set of the first welding edge includes: selecting first two adjacent surfaces in the adjacent surface set of the first welding edge to be determined as the first reference surface of the first welding edge and the second reference surface of the first welding edge, respectively.
[0011] Optionally, determining the welding edge set, the first reference surface set, and the second reference surface set based on the first welding edge, the first reference surface, and the second reference surface includes: determining the welding edge set and the first reference surface set based on the first welding edge and the first reference surface; determining the second reference surface set based on the welding edge set and the second reference surface.
[0012] Optionally, determining the welding edge set and the first reference surface set based on the first welding edge and the first reference surface includes: taking the first welding edge as the first initial seed edge, the direction of the first welding edge as the initial search direction, the initial search direction being positive, and the first reference surface of the first welding edge as the initial first seed surface; starting from the seed point of the first initial seed edge in accordance with the initial search direction, and recursively searching for other seed edges on the welding part according to the topological structure of the welding part, the seed point of the first initial seed edge being the end point of the seed edge; starting from the first initial seed edge, and recursively searching for other first seed surfaces on the welding part according to the first angle between the normal vectors of the seed point of the current seed edge on the first seed surface corresponding to the current seed edge and the adjacent surface of the next seed edge; determining the set consisting of all seed edges as the welding edge set, and determining the set consisting of all first seed surfaces as the first reference surface set.
[0013] Optionally, if the first reference surface of the first welding edge and the second reference surface of the first welding edge are not on the same welding part, determining the second reference surface set based on the welding edge set and the second reference surface includes: taking the next edge of the first welding edge in the welding edge set as the second initial seed edge, and the second reference surface of the first welding edge as the initial second seed surface, starting from the initial second seed surface, and recursively searching for the second seed surface other than the initial second seed surface based on the distance from the midpoint of the seed edge to all adjacent surfaces of the second seed surface; and determining the set consisting of all second seed surfaces as the second reference surface set.
[0014] Optionally, if the first reference surface of the first welding edge and the second reference surface of the first welding edge are on the same welding part, determining the second reference surface set based on the welding edge set and the second reference surface includes: determining a set consisting of another adjacent surface of all seed edges except their first seed surface as the second reference surface set.
[0015] Optionally, the recursive search for other seed edges on the welding part according to the topological structure of the welding part includes: searching for all adjacent edges of the seed point of the current seed edge except the current seed edge according to the topological structure of the welding part, wherein if the current search direction is forward, the starting point of the seed edge is used as the seed point, and if the current search direction is reverse, the end point of the seed edge is used as the seed point; calculating the second angle between the tangent vectors of the seed point of the current seed edge on the current seed edge and each adjacent edge except the current seed edge; determining the adjacent edge corresponding to the second angle equal to 0 degrees or 180 degrees as the next seed edge, wherein if the current seed point is the starting point of the next seed edge, the next search direction is forward, and if the current seed point is the end point of the next seed edge, the next search direction is reverse.
[0016] Optionally, the first angle between the normal vectors of the seed point of the current seed edge on the first seed face corresponding to the current seed edge and the adjacent face of the next seed edge is used to recursively find out other first seed faces on the welding part, including: calculating the first angle between the normal vectors of the seed point of the current seed edge on the first seed face corresponding to the current seed edge and each adjacent face of the next seed edge; determining the adjacent face corresponding to the smallest angle among the first angles as the next first seed face, and the next edge of the current seed edge in the welding edge set as the new seed edge.
[0017] Optionally, the method of recursively finding the second seed surface other than the initial second seed surface based on the distance from the midpoint of the seed edge to all adjacent surfaces of the second seed surface includes: calculating the distance from the midpoint of the current seed edge to each adjacent surface of the current second seed surface; determining the adjacent surface corresponding to the minimum median value of the distance as the next second seed surface, and the next edge of the current seed edge in the welding edge set as the new seed edge.
[0018] Optionally, the first two adjacent faces in the adjacent face set of the first welding edge are selected to be determined as the first reference face of the first welding edge and the second reference face of the first welding edge respectively, and also include: if the adjacent face set contains only one face, outputting a prompt that the first welding edge was picked up incorrectly.
[0019] Optionally, determining the position and posture of the welding trajectory point according to the welding edge set, the first reference surface set, and the second reference surface set includes: traversing the welding edge set, discretizing each edge in the welding edge set according to the step size of the welding trajectory point, and determining the position of the welding trajectory point; determining the x-axis direction of the welding trajectory point according to the tangent direction of the corresponding edge of the welding trajectory point in the welding edge set; determining the z-axis direction of the welding trajectory point according to the normal vector of the welding trajectory point on each surface in the first reference surface set and the second reference surface set; and determining the y-axis direction of the welding trajectory point according to the x-axis direction and the z-axis direction.
[0020] In order to achieve the above-mentioned objective, according to a second aspect of the present application, a device for determining a welding trajectory is provided.
[0021] The device for determining a welding trajectory according to the present application includes: an acquisition unit, used to acquire a pick list corresponding to a first welding edge, wherein the first welding edge is an edge picked up by a user on a welding part and needs to be welded, and the pick list contains all faces that pass through when picking the first welding edge; a grouping unit, used to divide the faces in the pick list into two sets, the first set is the faces located on the welding part, and the second set is the faces that do not belong to the welding part; a first determination unit, used to determine a first reference surface and a second reference surface of the first welding edge according to the first set and the second set, wherein the first reference surface and the second reference surface are two welding surfaces corresponding to the first welding edge; a second determination unit, used to determine a welding edge set, a first reference surface set, and a second reference surface set according to the first welding edge, the first reference surface, and the second reference surface, wherein the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets consisting of two welding surfaces corresponding to each edge in the welding edge set; a third determination unit, used to determine the position and posture of a welding trajectory point according to the welding edge set, the first reference surface set, and the second reference surface set.
[0022] Optionally, the first determination unit includes: a first determination module, used to determine the second reference surface of the first welding edge according to the second set if the first set is empty and the second set is not empty, and determine the first reference surface of the first welding edge according to the adjacent surface set of the first welding edge; a second determination module, used to determine the first reference surface of the first welding edge according to the first set if the first set is not empty and the second set is not empty, and determine the second reference surface of the first welding edge according to the second set; a third determination module, used to determine the first reference surface of the first welding edge and the second reference surface of the first welding edge according to the adjacent surface set of the first welding edge if the first set is not empty and the second set is empty.
[0023] Optionally, the first determination module is also used to: determine the first face in the second set as the second reference face of the first welding edge; calculate the normal of the current picking point on the second reference face of the first welding edge, and the normal of the current picking point on each adjacent face in the adjacent face set of the first welding edge, and determine the adjacent face corresponding to the smallest angle between the two normals as the first reference face of the first welding edge, and the current picking point is the point on the first welding edge picked by the user.
[0024] Optionally, the second determination module is further used to: determine the first surface in the first set as the first reference surface of the first welding edge; determine the first surface in the second set as the second reference surface of the first welding edge.
[0025] Optionally, the third determination module is further used to: select first two adjacent surfaces in the adjacent surface set of the first welding edge and determine them as the first reference surface of the first welding edge and the second reference surface of the first welding edge respectively.
[0026] Optionally, the second determination unit includes: a fourth determination module, used to determine the welding edge set and the first reference surface set based on the first welding edge and the first reference surface; and a fifth determination module, used to determine the second reference surface set based on the welding edge set and the second reference surface.
[0027] Optionally, the fourth determination module is also used to: take the first welding edge as the first initial seed edge, the direction of the first welding edge as the positive direction of the initial search direction, and the first reference plane of the first welding edge as the initial first seed plane; in the positive direction of the initial search direction, starting from the seed point of the first initial seed edge, and according to the topological structure of the welding part, recursively find out other seed edges on the welding part; starting from the first initial seed edge, and according to the first angle between the normal vectors of the seed point of the current seed edge on the first seed plane corresponding to the current seed edge and the adjacent plane of the next seed edge, recursively find out other first seed planes on the welding part; determine the set composed of all seed edges as the welding edge set, and determine the set composed of all first seed planes as the first reference plane set.
[0028] Optionally, the fifth determination module is also used to, if the first reference surface of the first welding edge and the second reference surface of the first welding edge are not on the same welding part, use the next edge of the first welding edge in the welding edge set as the second initial seed edge, and use the second reference surface of the first welding edge as the initial second seed surface, and recursively find the second seed surface other than the initial second seed surface based on the distance from the midpoint of the seed edge to all adjacent surfaces of the second seed surface; and determine the set consisting of all the second seed surfaces as the second reference surface set.
[0029] Optionally, the fifth determination module is further used to determine a set consisting of another adjacent surface of all seed edges except their first seed surface as the second reference surface set if the first reference surface of the first welding edge and the second reference surface of the first welding edge are on the same welding part.
[0030] Optionally, the fourth determination module is also used to: search for all adjacent edges of the seed point of the current seed edge except the current seed edge according to the topological structure of the welding part, wherein if the current search direction is forward, then the end point of the current seed edge is used as the seed point; if the current search direction is reverse, then the starting point of the current seed edge is used as the seed point; calculate the second angle between the tangent vectors of the seed point of the current seed edge on the current seed edge and each adjacent edge except the current seed edge; determine the adjacent edge corresponding to the second angle equal to 0 degrees or 180 degrees as the next seed edge, wherein if the current seed point is the starting point of the next seed edge, then the next search direction is forward; if the current seed point is the end point of the next seed edge, then the next search direction is reverse.
[0031] Optionally, the fourth determination module is also used to: calculate the first angle between the normal vectors of the seed point of the current seed edge on the first seed face corresponding to the current seed edge and each adjacent face of the next seed edge; determine the adjacent face corresponding to the smallest angle among the first angles as the next first seed face, and the next edge of the current seed edge in the welding edge set as the new seed edge.
[0032] Optionally, the fifth determination module is also used to: calculate the distance from the midpoint of the current seed edge to each adjacent face of the current second seed face; determine the adjacent face corresponding to the minimum median value of the distance as the next second seed face, and the next edge of the current seed edge in the welding edge set as the new seed edge.
[0033] Optionally, the third determination module is further used to: if the adjacent face set contains only one face, output a prompt indicating that the first welding edge was picked up incorrectly.
[0034] Optionally, the third determination unit includes: a position determination module, used to traverse the welding edge set, discretize each edge in the welding edge set according to the step size of the welding trajectory point, and determine the position of the welding trajectory point; a posture determination module, used to determine the x-axis direction of the welding trajectory point according to the tangent direction of the corresponding edge of the welding trajectory point in the welding edge set; determine the z-axis direction of the welding trajectory point according to the normal vector of the welding trajectory point on each surface in the first reference surface set and the second reference surface set respectively; determine the y-axis direction of the welding trajectory point according to the x-axis direction and the z-axis direction.
[0035] In order to achieve the above-mentioned purpose, according to the third aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for determining the welding trajectory described in any one of the above-mentioned first aspects.
[0036] In order to achieve the above-mentioned purpose, according to the fourth aspect of the present application, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method for determining the welding trajectory described in any one of the above-mentioned first aspects.
[0037] In the method and device for determining the welding trajectory of the embodiment of the present application, first, a pick list corresponding to the first welding edge is obtained, wherein the first welding edge is an edge picked up by the user on the welding part and needs to be welded, and the pick list contains all faces passed when picking the first welding edge; then the faces in the pick list are divided into two sets, the first set is the faces located on the welding part, and the second set is the faces not belonging to the welding part; then the first reference surface and the second reference surface of the first welding edge are determined according to the first set and the second set, and the first reference surface and the second reference surface are the two welding surfaces corresponding to the first welding edge; then the welding edge set, the first reference surface set, and the second reference surface set are determined according to the first welding edge, the first reference surface, and the second reference surface, the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets consisting of two welding surfaces corresponding to each edge in the welding edge set; finally, the position and posture of the welding trajectory point are determined according to the welding edge set, the first reference surface set, and the second reference surface set. The determination of the welding trajectory in the embodiment of the present application is not a teaching method, but an offline programming method. According to an edge picked up by the user, a group of continuous welding edges and two groups of welding surfaces corresponding to the welding edges can be found. Finally, the welding trajectory is determined based on a group of continuous welding edges and two groups of welding surfaces. Compared with the teaching method, there is no technical threshold, no teaching is required, and production efficiency is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The schematic embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0039] Figure 1 is an application example diagram of a method for determining a welding trajectory in an embodiment of the present application provided according to an embodiment of the present application;
[0040] Figure 2 is a flow chart of a method for determining a welding trajectory provided according to an embodiment of the present application;
[0041] Figure 3 It is a block diagram of a device for determining a welding trajectory provided in an embodiment of the present application;
[0042] Figure 4 It is a block diagram of another device for determining a welding trajectory provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0043] 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.
[0044] 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 sequential order. 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.
[0045] 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.
[0046] First of all, it should be noted that the method for determining the welding trajectory in the embodiment of the present application is an offline programming method. In actual application, according to a welding edge on the part to be welded picked up by the user, two welding surfaces are automatically identified, and a set of connected welding edges to be welded and the corresponding two sets of welding surfaces are automatically found according to the picked welding edge and the two identified welding surfaces, and finally the position and posture of the trajectory point are determined according to the welding edge and the welding surface. This is explained in conjunction with a specific example, such as Figure 1 As shown, it is necessary to weld part P and part P′, where edge e1 is an edge on part P picked up by the user that needs to be welded. The method of the embodiment of the present application is to find edges e1, e2, e3, e4, e5 and two groups of welding surfaces f1, f2, f3, f4, f5 and f′1 corresponding to these five edges based on edge e1. The method for determining the welding trajectory of the embodiment of the present application is specifically described below.
[0047] According to an embodiment of the present application, a method for determining a welding trajectory is provided, such as Figure 2As shown, the method includes the following steps S101-S105: S101. Obtain a pick list corresponding to the first welding edge; wherein the first welding edge is an edge picked up by the user on the welding part and needs to be welded, and the pick list contains all faces that pass through when picking the first welding edge; S102. Divide the faces in the pick list into two sets, the first set is the faces located on the welding part, and the second set is the faces that do not belong to the welding part; S103. Determine the first reference surface and the second reference surface of the first welding edge according to the first set and the second set, wherein the first reference surface and the second reference surface are two welding surfaces corresponding to the first welding edge; S104. Determine the welding edge set, the first reference surface set, and the second reference surface set according to the first welding edge, the first reference surface, and the second reference surface, wherein the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets composed of two welding surfaces corresponding to each edge in the welding edge set; S105. Determine the position and posture of the welding trajectory point according to the welding edge set, the first reference surface set, and the second reference surface set.
[0048] In step S101, the pick list is a complete pick list when obtaining the first welding edge picked by the user. The generation of the pick list is explained. A ray passes through the current viewpoint position and falls on the point selected by the mouse, that is, the process of intersecting a ray with the part model. After the intersection, there is a series of faces, and the pick list is formed in the order of passing through. This is the intersection principle commonly used in 3D environment interaction and is a ray pick process.
[0049] In step S102, the welding part is a specific part, which is the part selected when the first welding edge is selected in step S101. A specific example is given for illustration, such as Figure 1 As shown, the first welding edge is picked on part P, so the welding part is part P, then the first set is the faces on part P, and the second set is the faces not on part P.
[0050] In step S103, the first reference surface and the second reference surface of the first welding edge are determined according to the first set and the second set, which are specifically divided into three cases. In the first case, if the first set is empty and the second set is not empty, the second reference surface of the first welding edge is determined according to the second set, and the first reference surface of the first welding edge is determined according to the adjacent surface set of the first welding edge. Specifically, the first surface in the second set is determined as the second reference surface of the first welding edge; the normal of the current pick-up point on the second reference surface of the first welding edge and the normal of the current pick-up point on each adjacent surface in the adjacent surface set of the first welding edge are calculated, and the adjacent surface corresponding to the minimum angle between the two normals is determined as the first reference surface of the first welding edge. Among them, the current pick-up point is a point on the first welding edge picked by the user, and can be any point on the first welding edge. The adjacent surface set of the first welding edge is the surface adjacent to the first welding edge obtained based on the topological structure of the model of the welding part. The specific meaning of adjacent here is that if an edge is on a surface, then this surface is the adjacent surface of this edge.
[0051] The second case: if the first set is not empty and the second set is not empty, the first reference surface of the first welding edge is determined according to the first set, and the second reference surface of the first welding edge is determined according to the second set. Specifically, the first surface in the first set is determined as the first reference surface of the first welding edge; the first surface in the second set is determined as the second reference surface of the first welding edge.
[0052] The third case: if the first set is not empty, and the second set is empty, the first reference surface of the first welding edge and the second reference surface of the first welding edge are determined according to the adjacent surface set of the first welding edge. Specifically, the first two adjacent surfaces in the adjacent surface set of the first welding edge are selected as the first reference surface of the first welding edge and the second reference surface of the first welding edge, respectively. However, if in actual implementation, the adjacent surface set contains only one surface, a prompt indicating that the first welding edge is incorrectly picked is output, indicating that the first welding edge is not selected correctly and the subsequent steps cannot be continued, and the user needs to reselect.
[0053] The aforementioned steps S101-S103 are processes for determining two welding surfaces corresponding to the picked edge based on the edge picked by the user, and the subsequent step S104 is a process for finding a set of continuous edges and corresponding welding surfaces based on the picked edge and the determined two welding surfaces. It should be noted here that the subsequent process also includes the special case where there is only one welding edge, namely the first welding edge.
[0054] In step S104, the welding edge set, the first reference surface set, and the second reference surface set are determined according to the first welding edge, the first reference surface, and the second reference surface. Specifically, the welding edge set and the first reference surface set are determined according to the first welding edge and the first reference surface; the second reference surface set is determined according to the welding edge set and the second reference surface.
[0055] The specific steps of determining the welding edge set and the first reference surface set according to the first welding edge and the first reference surface are as follows: first, the first welding edge is used as the first initial seed edge, the direction of the first welding edge is used as the initial search direction, the initial search direction is positive, and the first reference surface of the first welding edge is used as the initial first seed surface. Then, according to the initial search direction, starting from the seed point of the first initial seed edge, other seed edges on the welding part are found in a recursive manner according to the topological structure of the welding part, and the seed point of the first initial seed edge is the end point of the seed edge. The initial search direction is the direction of the first initial seed edge, and the direction of any edge refers to the direction from the starting point to the end point. The specific recursive process of finding other seed edges on the welding part is as follows: according to the topological structure of the welding part, all adjacent edges of the seed point of the current seed edge except the current seed edge are found, wherein if the current search direction is positive, the starting point of the seed edge is used as the seed point, and if the current search direction is reverse, the end point of the seed edge is used as the seed point. In fact, both the end point and the starting point are the connection points of adjacent seed edges; the second angle between the tangent vectors of the seed point of the current seed edge on the current seed edge and each adjacent edge except the current seed edge is calculated; the adjacent edge corresponding to the second angle equal to 0 degrees or 180 degrees is determined as the next seed edge. If the current seed point (the seed point of the current seed edge) is the starting point of the next seed edge, the next search direction is forward; if the current seed point is the end point of the next seed edge, the next search direction is reverse. Then, starting from the first initial seed edge, according to the first angle between the normal vectors of the seed point of the current seed edge on the first seed face corresponding to the current seed edge and the adjacent face of the next seed edge, the other first seed faces on the welding part are found recursively. Specifically, the process of finding other first seed faces on the welding part is as follows: calculate the first angle between the normal vectors of the seed point of the current seed edge on the first seed face corresponding to the current seed edge and each adjacent face of the next seed edge; determine the adjacent face corresponding to the smallest angle in the first angle as the next first seed face, and use the next edge of the current seed edge as the new seed edge. According to the above method, find all seed edges (including the first initial seed edge) and all first seed faces (including the initial first seed face), and finally, determine the set composed of all seed edges as the welding edge set, and determine the set composed of all first seed faces as the first reference face set. It should be noted that in the actual recursive process, a variable will be set for the seed edge, the first seed face, and the search direction. Each time a new seed edge, the first seed face, and the new search direction are found, they will be assigned new values as variables, and the recursive process will continue.It should also be noted that in the process of recursion, there needs to be a recursive exit condition, that is, how to determine whether all seed edges and the first seed face have been found. Specifically, the exit condition is that the seed point of the current seed edge has no adjacent edges other than the current seed edge, which means that the current seed edge is already the last welding edge that needs to be found. In addition, if the embodiment of the present application wants to find a set of smoothly connected welding edges, another exit condition that leads to the recursive process can be set, that is, if there is no second angle equal to 0 degrees or 180 degrees, then exit. A set of smoothly connected welding edges refers to lines that are connected by arcs, such as. Figure 1 The edges shown in the figure, e1, e2, e3, e4, and e5, are a set of smoothly connected edges. After jumping out, the step of determining the second reference surface set will continue.
[0056] Wherein, determining the second reference surface set according to the welding edge set and the second reference surface specifically includes two cases. The first case is: if the first reference surface of the first welding edge and the second reference surface of the first welding edge are not on the same welding part, then the next edge of the first welding edge in the welding edge set is used as the second initial seed edge, and the second reference surface of the first welding edge is used as the initial second seed surface. Starting from the initial second seed surface, according to the distance from the midpoint of the seed edge to all adjacent surfaces of the second seed surface, the second seed surface other than the initial second seed surface is found by recursive method; and the set consisting of all second seed surfaces is determined as the second reference surface set. Wherein, finding the second seed surface other than the initial second seed surface by recursive method specifically includes: calculating the distance from the midpoint of the current seed edge to each adjacent surface of the second seed surface corresponding to the current seed edge; determining the adjacent surface corresponding to the minimum median of the distance as the next second seed surface, and the next edge of the current seed edge in the welding edge set is used as the new seed edge. It should be noted that in the actual recursive process, a variable will also be set for the seed edge and the second seed surface. Each time a new seed edge and the second seed surface are found, they will be assigned as new values of the variables and the recursive process will continue. The second case is: if the first reference surface of the first welding edge and the second reference surface of the first welding edge are on the same welding part, then the set consisting of the other adjacent surfaces of all seed edges except the first seed surface is determined as the second reference surface set.
[0057] In addition, it should be noted that the first reference surface set includes the first reference surface corresponding to each seed edge, ie, each welding edge; similarly, the second reference surface set includes the second reference surface corresponding to each seed edge, ie, each welding edge.
[0058] In step S105, the position and posture of the welding trajectory point are determined according to the welding edge set, the first reference surface set, and the second reference surface set. Specifically, the welding edge set is traversed, and each edge in the welding edge set is discretized according to the step size of the welding trajectory point to determine the position of the welding trajectory point; the x-axis direction of the welding trajectory point is determined according to the tangent direction of the corresponding edge of the welding trajectory point in the welding edge set; the z-axis direction of the welding trajectory point is determined according to the normal vector of the welding trajectory point on each surface in the first reference surface set and the second reference surface set, specifically, the angular bisector of the normal vector of the welding trajectory point on the first reference surface in the first reference surface set and the normal vector of the welding trajectory point on the corresponding second reference surface in the second reference surface set is used as the z-axis direction of the welding trajectory point; the y-axis direction of the welding trajectory point is determined according to the x-axis direction and the z-axis direction, that is, the y-axis direction of the welding trajectory point can be obtained by cross-producting the z-direction and the x-direction. The direction of the welding trajectory point in the embodiment of the present application is determined based on the principle that the welding gun is operating along the weld in the middle of the two welding surfaces when the robot is working, which is also a commonly used determination method in the welding process.
[0059] From the above description, it can be seen that in the method for determining the welding trajectory of the embodiment of the present application, first, a pick list corresponding to the first welding edge is obtained, wherein the first welding edge is an edge that needs to be welded and is picked up by the user on the welding part, and the pick list contains all faces that pass through when picking the first welding edge; then the faces in the pick list are divided into two sets, the first set is the faces located on the welding part, and the second set is the faces that do not belong to the welding part; then the first reference surface and the second reference surface of the first welding edge are determined according to the first set and the second set, and the first reference surface and the second reference surface are the two welding surfaces corresponding to the first welding edge; then the welding edge set, the first reference surface set, and the second reference surface set are determined according to the first welding edge, the first reference surface, and the second reference surface, the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets composed of two welding surfaces corresponding to each edge in the welding edge set; finally, the position and posture of the welding trajectory point are determined according to the welding edge set, the first reference surface set, and the second reference surface set. The determination of the welding trajectory in the embodiment of the present application is not a teaching method, but an offline programming method. According to an edge picked up by the user, a group of continuous welding edges and two groups of welding surfaces corresponding to the welding edges can be found. Finally, the welding trajectory is determined based on a group of continuous welding edges and two groups of welding surfaces. Compared with the teaching method, there is no technical threshold, no teaching is required, and production efficiency is greatly improved.
[0060] In order to further illustrate the method for determining the welding trajectory, the present application embodiment provides another process of determining the welding trajectory, specifically in combination with Figure 1The following is an explanation:
[0061] (1) The user picks up edge e1 of part P. Based on the topological structure of the part, the adjacent face set F of e1 can be obtained. adj , where e1 corresponds to the first welding edge in the above embodiment.
[0062] (2) Obtain a complete pick list when the user picks edge e1, and divide the faces in the pick list into two groups, one group G is the faces located on part P (corresponding to the first set in the above embodiment), and the other group G′ is the faces on other parts (corresponding to the second set in the above embodiment).
[0063] (3) If there is no face on part P in the pick list, that is, G is empty, but G′ is not empty, then the first face in G′ will be used as the second reference face f′1. Calculate the normal vector n′ of the current pick point on face f′1. For each adjacent face f of e1 i ∈F adj , calculate the normal n of the current pick point on each adjacent face i , calculate n and each n i The adjacent surface with the smallest angle is selected as the first reference surface f1. This corresponds to the first case in step S103 in the above embodiment.
[0064] (4) If neither G nor G′ is empty, then the first surface in G is used as the first reference surface f1, and the first surface in G′ is used as the second reference surface f′1. This corresponds to the second case in step S103 in the above embodiment.
[0065] (5) If G′ is empty, then select the adjacent face set F of e1 adj The first two adjacent faces in e1 are used as the first reference face f1 and the second reference face f′1 respectively. If e1 has only one adjacent face, two adjacent faces cannot be found, and the algorithm ends. This corresponds to the third case in step S103 in the above embodiment.
[0066] (6) Use edge e1 as the initial seed edge e seed , the direction of edge e1 is used as the initial search direction orient, and the first reference surface f1 of e1 is used as the initial first seed surface f seed , the initial seed edge here corresponds to the first initial seed edge in the above embodiment.
[0067] (7) On part P, find edge e seed Starting point p s and the end point p e , if the current search direction orient and edge e seed The direction is consistent, then pt seed =pe , on the contrary, pt seed =p s Calculate pt seed On the side seed Tangential direction t seed , where pt seed It corresponds to the connection point of two adjacent seed edges in the above embodiment, that is, the seed point.
[0068] (8) According to the topological structure of part P, find pt seed In addition to e seed All adjacent edges of , if pt seed No except e seed The other adjacent edges of indicate that all seed edges have been found, and we directly go to step (14) to determine the second reference surface set.
[0069] (9) If pt seed There is except e seed Then traverse each adjacent edge and calculate the point pt seed The tangent t on each adjacent edge i , calculate t i With t seed The angle α i , where angle α i This corresponds to the second angle in step S104 in the above embodiment.
[0070] (10) If α i ==0||α i ==180, then the adjacent edge at this time will be used as the next seed edge e seed , pt seed If the next seed edge is e seed The new search direction orient is forward, otherwise it is reverse. seed Add to weld edge set E w middle.
[0071] (11) If α i ! =0&&α i =180, indicating that there is no smoothly connected seed edge, then go directly to step (14) to determine the second reference surface set.
[0072] (12) Calculation point pt seed The surface of seed Normal n seed , find the updated e in (10) seed All adjacent faces of , calculate pt seed The normal n on each adjacent face j , calculate nseed and n j The angle of the adjacent surface f is the smallest when the angle is the smallest. j As f seed The first reference surface of , that is, the new first seed surface, is added to the first reference surface set F ref If pt seed There are two adjacent faces, then except for f j Another adjacent face of is added to the set F adj-ref middle.
[0073] (13) Repeat (7)-(12) to find all the welding edges (i.e., all the seed edges) on part P, and the first reference surface of each welding edge (i.e., all the first seed surfaces); that is, the welding edge set E is determined. w , and the first reference surface set F ref .
[0074] (14) If the first reference surface f1 and the second reference surface f′1 are on the same part, then the second reference surface set F′ ref =F adj-ref , that is, a set consisting of another adjacent face of all seed edges except the first seed face is determined as the second reference face set.
[0075] (15) If the first reference surface f1 and the second reference surface f′1 are on different parts, then the second reference surface is used as the initial second seed surface, i.e., f prev =f′1, welding edge set E w The next edge e2 of e1 is used as the initial seed edge (corresponding to the second initial seed edge in the above embodiment), that is, e seed = e1. This corresponds to the second case of determining the second reference surface set in the above step S104.
[0076] (16) Get e seed The midpoint p mid , traverse f prev For each adjacent face of mid The distance to each adjacent face, taking the adjacent face with the smallest distance as e seed The second reference surface f loop , that is, the next second seed surface, and add it to the second reference surface set F′ ref middle.
[0077] (17) so that f prev =f loop , welding edge set E w Zhonge seed The next edge e j ∈E wAs e seed , that is, assign the next second seed face and the next seed edge to the variable f prev and e seed .
[0078] (18) Repeat (16)-(17) to obtain the second reference surface set F′ ref Steps (16)-(18) correspond to the first case of determining the second reference surface set in step S104 of the above embodiment.
[0079] (19) Traverse the welding edge set E w , according to the step size of the solder joint, discrete E w For each edge in the welding trajectory point pt, w If the track direction is consistent with the edge direction, the x direction is the tangent direction of the welding track point on the edge. Otherwise, the x direction is the opposite direction of the tangent direction. Calculate pt w Normal vector n on the first reference surface w , the normal vector n′ on the second reference surface w , calculate n w and n′ w The angle bisector of is used as the z direction of the welding trajectory point, and the y direction of the welding trajectory point can be obtained by cross-product of the z direction and the x direction. This step corresponds to step S105 in the above embodiment.
[0080] 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.
[0081] According to an embodiment of the present application, there is also provided a method for implementing the above Figure 2 The welding trajectory determination device 200 of the method, such as Figure 3As shown, the device includes: an acquisition unit 21, used to acquire a pick list corresponding to a first welding edge, the first welding edge is an edge picked up by a user on a welding part and to be welded, and the pick list contains all faces that pass through when picking the first welding edge; a grouping unit 22, used to divide the faces in the pick list into two sets, the first set is the faces located on the welding part, and the second set is the faces that do not belong to the welding part; a first determination unit 23, used to determine a first reference surface and a second reference surface of the first welding edge according to the first set and the second set, the first reference surface and the second reference surface are two welding surfaces corresponding to the first welding edge; a second determination unit 24, used to determine a welding edge set, a first reference surface set, and a second reference surface set according to the first welding edge, the first reference surface, and the second reference surface, the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets composed of two welding surfaces corresponding to each edge in the welding edge set; a third determination unit 25, used to determine the position and posture of a welding trajectory point according to the welding edge set, the first reference surface set, and the second reference surface set.
[0082] Specifically, the specific process of each unit and module in the device of the embodiment of the present application to realize its function can be found in the relevant description in the method embodiment, which will not be repeated here.
[0083] From the above description, it can be seen that in the device for determining the welding trajectory of the embodiment of the present application, first, a pick list corresponding to the first welding edge is obtained, wherein the first welding edge is an edge that needs to be welded and is picked up by the user on the welding part, and the pick list contains all faces that pass through when picking the first welding edge; then the faces in the pick list are divided into two sets, the first set is the faces located on the welding part, and the second set is the faces that do not belong to the welding part; then the first reference surface and the second reference surface of the first welding edge are determined according to the first set and the second set, and the first reference surface and the second reference surface are the two welding surfaces corresponding to the first welding edge; then the welding edge set, the first reference surface set, and the second reference surface set are determined according to the first welding edge, the first reference surface, and the second reference surface, the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets composed of two welding surfaces corresponding to each edge in the welding edge set; finally, the position and posture of the welding trajectory point are determined according to the welding edge set, the first reference surface set, and the second reference surface set. The determination of the welding trajectory in the embodiment of the present application is not a teaching method, but an offline programming method. According to an edge picked up by the user, a group of continuous welding edges and two groups of welding surfaces corresponding to the welding edges can be found. Finally, the welding trajectory is determined based on a group of continuous welding edges and two groups of welding surfaces. Compared with the teaching method, there is no technical threshold, no teaching is required, and production efficiency is greatly improved.
[0084] Further, such as Figure 4 As shown, the first determination unit 23 includes: a first determination module 231, which is used to determine the second reference surface of the first welding edge according to the second set if the first set is empty and the second set is not empty, and determine the first reference surface of the first welding edge according to the adjacent surface set of the first welding edge; a second determination module 232, which is used to determine the first reference surface of the first welding edge according to the first set if the first set is not empty and the second set is not empty, and determine the second reference surface of the first welding edge according to the second set; a third determination module 233, which is used to determine the first reference surface of the first welding edge and the second reference surface of the first welding edge according to the adjacent surface set of the first welding edge if the first set is not empty and the second set is empty.
[0085] Further, such as Figure 4 As shown, the first determination module 231 is further used to: determine the first surface in the second set as the second reference surface of the first welding edge; calculate the normal of the current picking point on the second reference surface of the first welding edge, and the normal of the current picking point on each adjacent surface in the adjacent surface set of the first welding edge, and determine the adjacent surface corresponding to the minimum angle between the two normals as the first reference surface of the first welding edge, and the current picking point is the point on the first welding edge picked by the user.
[0086] Further, such as Figure 4 As shown, the second determination module 232 is further used to: determine the first surface in the first set as the first reference surface of the first welding edge; determine the first surface in the second set as the second reference surface of the first welding edge.
[0087] Further, such as Figure 4 As shown, the third determination module 233 is further used to: select first two adjacent surfaces in the adjacent surface set of the first welding edge and determine them as the first reference surface of the first welding edge and the second reference surface of the first welding edge respectively.
[0088] Further, such as Figure 4 As shown, the second determination unit 24 includes: a fourth determination module 241, used to determine the welding edge set and the first reference surface set according to the first welding edge and the first reference surface; a fifth determination module 242, used to determine the second reference surface set according to the welding edge set and the second reference surface.
[0089] Further, such as Figure 4As shown, the fourth determination module 241 is also used to: use the first welding edge as the first initial seed edge, the direction of the first welding edge as the initial search direction, the initial search direction is positive, the first reference surface of the first welding edge as the initial first seed surface, the end point of the seed edge as the seed point, according to the initial search direction, starting from the seed point of the first initial seed edge, according to the topological structure of the welding part, recursively find out other seed edges on the welding part, the seed point of the first initial seed edge is the end point of the seed edge; starting from the first initial seed edge, according to the first angle between the normal vectors of the seed point of the current seed edge on the first seed surface corresponding to the current seed edge and the adjacent surface of the next seed edge, recursively find out other first seed surfaces on the welding part; determine the set composed of all seed edges as the welding edge set, and determine the set composed of all first seed surfaces as the first reference surface set.
[0090] Further, such as Figure 4 As shown, the fifth determination module 242 is also used for, if the first reference surface of the first welding edge and the second reference surface of the first welding edge are not on the same welding part, then using the next edge of the first welding edge in the welding edge set as the second initial seed edge, and the second reference surface of the first welding edge as the initial second seed surface, starting from the initial second seed surface, according to the distance from the midpoint of the seed edge to all adjacent surfaces of the second seed surface, recursively searching for the second seed surface other than the initial second seed surface; and determining the set consisting of all the second seed surfaces as the second reference surface set.
[0091] Further, such as Figure 4 As shown, the fifth determination module 242 is also used to determine a set consisting of another adjacent surface of all seed edges except their first seed surface as the second reference surface set if the first reference surface of the first welding edge and the second reference surface of the first welding edge are on the same welding part.
[0092] Further, such as Figure 4As shown, the fourth determination module 241 is also used to: search for all adjacent edges of the seed point of the current seed edge except the current seed edge according to the topological structure of the welding part, wherein if the current search direction is forward, the starting point of the seed edge is used as the seed point, and if the current search direction is reverse, the end point of the seed edge is used as the seed point; calculate the second angle between the tangent vectors of the seed point of the current seed edge on the current seed edge and each adjacent edge except the current seed edge; determine the adjacent edge corresponding to the second angle equal to 0 degrees or 180 degrees as the next seed edge, wherein if the current seed point is the starting point of the next seed edge, the next search direction is forward; if the current seed point is the end point of the next seed edge, the next search direction is reverse.
[0093] Further, such as Figure 4 As shown, the fourth determination module 241 is also used to: calculate the first angle between the normal vectors of the seed point of the current seed edge on the first seed face corresponding to the current seed edge and each adjacent face of the next seed edge; determine the adjacent face corresponding to the smallest angle in the first angle as the next first seed face, and the next edge of the current seed edge in the welding edge set as the new seed edge.
[0094] Further, such as Figure 4 As shown, the fifth determination module 242 is also used to: calculate the distance from the midpoint of the current seed edge to each adjacent face of the current second seed face; determine the adjacent face corresponding to the minimum median value of the distance as the next second seed face, and the next edge of the current seed edge in the welding edge set as the new seed edge.
[0095] Further, such as Figure 4 As shown, the third determination module 233 is further used to: if the adjacent face set contains only one face, output a prompt indicating that the first welding edge is picked up incorrectly.
[0096] Further, such as Figure 4 As shown, the third determination unit 25 includes: a position determination module 251, which is used to traverse the welding edge set, discretize each edge in the welding edge set according to the step size of the welding trajectory point, and determine the position of the welding trajectory point; a posture determination module 252, which is used to determine the x-axis direction of the welding trajectory point according to the tangent direction of the corresponding edge of the welding trajectory point in the welding edge set; determine the z-axis direction of the welding trajectory point according to the normal vector of the welding trajectory point on each surface in the first reference surface set and the second reference surface set respectively; determine the y-axis direction of the welding trajectory point according to the x-axis direction and the z-axis direction.
[0097] Specifically, the specific process of each unit and module in the device of the embodiment of the present application to realize its function can be found in the relevant description in the method embodiment, which will not be repeated here.
[0098] According to an embodiment of the present application, a computer-readable storage medium is further provided, characterized in that the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for determining the welding trajectory in the above method embodiment.
[0099] According to an embodiment of the present application, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method for determining the welding trajectory in the above-mentioned method embodiment.
[0100] Obviously, those skilled in the art should understand that the above modules or steps of the present application 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, and optionally, 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, 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. In this way, the present application is not limited to any specific combination of hardware and software.
[0101] 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 method for determining a welding trajectory, It is characterized in that The method comprises: Obtaining a pick list corresponding to a first welding edge, where the first welding edge is an edge picked by a user on a welding part to be welded, and the pick list includes all faces passed through when picking the first welding edge; Divide the faces in the pick list into two sets, the first set is the faces on the welding part, and the second set is the faces not on the welding part; Determine a first reference surface and a second reference surface of the first welding edge according to the first set and the second set, wherein the first reference surface and the second reference surface are two welding surfaces corresponding to the first welding edge; Determine a welding edge set, a first reference surface set, and a second reference surface set according to the first welding edge, the first reference surface, and the second reference surface, wherein the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets consisting of two welding surfaces corresponding to each edge in the welding edge set; Determine the position and posture of the welding trajectory point according to the welding edge set, the first reference surface set, and the second reference surface set; Determining a welding edge set, a first reference surface set, and a second reference surface set according to the first welding edge, the first reference surface, and the second reference surface comprises: determining the welding edge set and the first reference surface set according to the first welding edge and the first reference surface; determining the second reference surface set according to the welding edge set and the second reference surface; The step of determining the welding edge set and the first reference surface set according to the first welding edge and the first reference surface comprises: taking the first welding edge as the first initial seed edge, the direction of the first welding edge as the initial search direction, the initial search direction being the positive direction, the first reference surface of the first welding edge as the initial first seed surface, and starting from the seed point of the first initial seed edge according to the initial search direction, recursively searching for other seed edges on the welding part according to the topological structure of the welding part, the seed point of the first initial seed edge being the end point of the seed edge; starting from the first initial seed edge, recursively searching for other first seed surfaces on the welding part according to the first angle between the normal vectors of the seed point of the current seed edge on the first seed surface corresponding to the current seed edge and the adjacent surface of the next seed edge; determining a set consisting of all seed edges as the welding edge set, and determining a set consisting of all first seed surfaces as the first reference surface set; If the first reference surface of the first welding edge and the second reference surface of the first welding edge are not on the same welding part, determining the second reference surface set according to the welding edge set and the second reference surface includes: taking the next edge of the first welding edge in the welding edge set as the second initial seed edge, and the second reference surface of the first welding edge as the initial second seed surface, starting from the initial second seed surface, and recursively searching for the second seed surface other than the initial second seed surface according to the distance from the midpoint of the seed edge to all adjacent surfaces of the second seed surface; and determining the set consisting of all the second seed surfaces as the second reference surface set.
2. The method for determining a welding trajectory according to claim 1, It is characterized in that The determining the first reference surface and the second reference surface of the first welding edge according to the first set and the second set comprises: If the first set is empty and the second set is not empty, determining the second reference surface of the first welding edge according to the second set, and determining the first reference surface of the first welding edge according to the adjacent surface set of the first welding edge; If the first set is not empty and the second set is not empty, determining a first reference surface of the first welding edge according to the first set, and determining a second reference surface of the first welding edge according to the second set; If the first set is not empty and the second set is empty, a first reference surface of the first welding edge and a second reference surface of the first welding edge are determined according to the adjacent surface set of the first welding edge.
3. The method for determining a welding trajectory according to claim 1, It is characterized in that The step of recursively finding other seed edges on the welding part according to the topological structure of the welding part comprises: Searching for all adjacent edges of the seed point of the current seed edge except the current seed edge according to the topological structure of the welding part, wherein if the current search direction is forward, the starting point of the seed edge is used as the seed point, and if the current search direction is reverse, the end point of the seed edge is used as the seed point; Calculate the second angle between the tangent vectors of the seed point of the current seed edge on the current seed edge and each adjacent edge except the current seed edge; The adjacent edge corresponding to the second angle equal to 0 degrees or 180 degrees is determined as the next seed edge, wherein if the current seed point is the starting point of the next seed edge, the next search direction is forward; if the current seed point is the end point of the next seed edge, the next search direction is reverse.
4. The method for determining a welding trajectory according to claim 1, It is characterized in that The recursive method of finding other first seed surfaces on the welding part based on the first angle between the normal vectors of the seed point of the current seed edge on the first seed surface corresponding to the current seed edge and the adjacent surface of the next seed edge comprises: Calculate a first angle between normal vectors of a seed point of a current seed edge on a first seed face corresponding to the current seed edge and on each adjacent face of a next seed edge; The adjacent face corresponding to the smallest angle among the first included angles is determined as the next first seed face, and the next edge of the current seed edge in the welding edge set is used as a new seed edge.
5. A device for determining a welding trajectory, It is characterized in that A method for determining a welding trajectory according to any one of claims 1 to 4, the device comprising: An acquisition unit is used to acquire a pick list corresponding to a first welding edge, where the first welding edge is an edge picked up by a user on a welding part and needs to be welded, and the pick list includes all faces passed through when picking the first welding edge; A grouping unit, used for dividing the faces in the pick list into two sets, the first set is the faces located on the welding part, and the second set is the faces not located on the welding part; A first determining unit, configured to determine a first reference plane and a second reference plane of the first welding edge according to the first set and the second set, wherein the first reference plane and the second reference plane are two welding planes corresponding to the first welding edge; a second determining unit, configured to determine a welding edge set, a first reference surface set, and a second reference surface set according to the first welding edge, the first reference surface, and the second reference surface, wherein the welding edge set is a group of continuous edges including the first welding edge, and the first reference surface set and the second reference surface set are sets consisting of two welding surfaces corresponding to each edge in the welding edge set; The third determining unit is used to determine the position and posture of the welding trajectory point according to the welding edge set, the first reference surface set, and the second reference surface set.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for determining a welding trajectory as described in any one of claims 1 to 4.
7. An electronic device, It is characterized in that include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method for determining the welding trajectory described in any one of claims 1 to 4.
