Tool compensation track generation method and device, computer equipment and storage medium
By generating a tool compensation trajectory method that combines tool radius, trajectory, and tool axis vector information, the debugging steps for five-axis CNC machining are simplified, the problem of traditional tool radius compensation being unapplicable is solved, and the generation efficiency is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2026-03-17
AI Technical Summary
Traditional three-axis machining is difficult to meet the machining requirements of streamlined products. In five-axis CNC machining, traditional tool radius compensation is not applicable, which leads to frequent modification of the cutting trajectory, complicated process debugging steps, long debugging cycle, and low efficiency in tool compensation trajectory generation.
By determining the compensation vector information based on the tool radius information, current trajectory, tool axis vector information, and tool compensation mode information, the tool compensation trajectory is generated. Combining the transition point plane and the intersection point of the intersection line simplifies the debugging process and improves the generation efficiency.
It eliminates the need for frequent modifications to the cutting trajectory, simplifies the debugging process, improves the efficiency of tool compensation trajectory generation, and achieves efficient tool compensation in five-axis CNC machining.
Smart Images

Figure CN120386282B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of numerical control technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for generating tool compensation trajectories. Background Technology
[0002] As people have increasingly higher requirements for the appearance of consumer products, a large number of products adopt streamlined designs, which brings great challenges to product processing and manufacturing. Traditional three-axis machining is difficult to meet the needs, while five-axis CNC machining, because it has two more rotary axes than three-axis, can realize changes in cutting posture, and is therefore widely used for processing complex spatial curved surfaces.
[0003] When machining spatial curved surfaces on five axes, the cutting posture changes with the trajectory. However, traditional tool radius compensation can only be performed within a specified plane, which is not suitable for five-axis CNC machining. At the same time, in order to ensure that the dimensions of the cut products are compliant, traditional technology requires frequent modification of the cutting trajectory and regeneration of the machining code file, resulting in cumbersome process debugging steps and long debugging cycles, which is not conducive to improving the efficiency of tool compensation trajectory generation. Summary of the Invention
[0004] Therefore, it is necessary to provide a tool compensation trajectory generation method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the generation efficiency of tool compensation trajectories, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for generating tool compensation trajectories, including:
[0006] Based on the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory, the compensation vector information corresponding to the current trajectory is determined. Based on the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool compensation mode information of the next trajectory, the compensation vector information corresponding to the next trajectory is determined. The tool compensation mode information represents the direction of tool radius compensation.
[0007] Based on the compensation vector information corresponding to the current trajectory and the current trajectory, determine the compensated trajectory corresponding to the current trajectory; based on the compensation vector information corresponding to the next trajectory and the next trajectory, determine the compensated trajectory corresponding to the next trajectory.
[0008] Based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, the transition point plane corresponding to the current trajectory is determined. Based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory, the transition point plane corresponding to the next trajectory is determined.
[0009] Determine the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and determine the target point based on the intersection point between the current trajectory and the intersection line and the intersection point between the next trajectory and the intersection line;
[0010] A tool compensation trajectory is generated based on the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory.
[0011] In one embodiment, determining the compensation vector information corresponding to the current trajectory based on the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory includes:
[0012] Based on the starting point and ending point of the current trajectory, determine the first vector information;
[0013] The compensation vector information corresponding to the current trajectory is determined based on the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory.
[0014] In one embodiment, determining the compensation vector information corresponding to the current trajectory based on the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory includes:
[0015] Obtain the ratio between the vector product and the magnitude of the vector product;
[0016] Obtain the product of the ratio and the tool radius information;
[0017] Based on the product and the tool compensation mode information of the current trajectory, the compensation vector information corresponding to the current trajectory is determined.
[0018] In one embodiment, the method further includes:
[0019] Based on the starting point and ending point of the current trajectory, determine the first vector information;
[0020] The intersection point between the current trajectory and the intersection line is determined based on the endpoint of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information.
[0021] In one embodiment, determining the intersection point between the current trajectory and the intersection line based on the endpoint of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information includes:
[0022] The vector product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory is obtained as the first vector product;
[0023] The ratio between the first vector information and the magnitude of the first vector information is obtained as the unit vector information of the current trajectory;
[0024] Obtain the difference between the tool radius information and the first vector product;
[0025] The vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory is obtained as the second vector product;
[0026] Obtain the ratio between the unit vector information of the current trajectory and the product of the second vector, and obtain the product between the ratio and the difference;
[0027] The intersection point between the current trajectory and the intersection line is determined based on the endpoint of the current trajectory, the compensation vector information corresponding to the current trajectory, and the product.
[0028] In one embodiment, the method further includes:
[0029] Obtain the position information of the rotary axis from the machine tool control commands;
[0030] The tool axis vector information is determined based on the rotation axis position information and the machine tool structure information.
[0031] Secondly, this application also provides a tool compensation trajectory generation device, comprising:
[0032] The compensation vector determination module is used to determine the compensation vector information corresponding to the current trajectory based on the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory; and to determine the compensation vector information corresponding to the next trajectory based on the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool compensation mode information of the next trajectory; the tool compensation mode information represents the direction of tool radius compensation;
[0033] The trajectory compensation module is used to determine the compensated trajectory corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the current trajectory, and to determine the compensated trajectory corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the next trajectory.
[0034] The plane determination module is used to determine the transition point plane corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and to determine the transition point plane corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory.
[0035] The target point determination module is used to determine the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and to determine the target point based on the intersection point between the current trajectory and the intersection line and the intersection point between the next trajectory and the intersection line;
[0036] The trajectory generation module is used to generate a tool compensation trajectory based on the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory.
[0037] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, implements the steps of the method described above.
[0038] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0039] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described method.
[0040] The aforementioned tool compensation trajectory generation method, apparatus, computer equipment, computer-readable storage medium, and computer program product accurately obtain the compensation vector information corresponding to the current trajectory based on tool radius information, the current trajectory, tool axis vector information, and the tool compensation mode information of the current trajectory. They then accurately obtain the compensation vector information corresponding to the next trajectory based on the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool compensation mode information of the next trajectory. Finally, based on the compensation vector information corresponding to the current trajectory and the current trajectory, they accurately obtain the compensated trajectory corresponding to the current trajectory. Similarly, based on the compensation vector information corresponding to the next trajectory and the next trajectory, they accurately obtain the compensated trajectory corresponding to the next trajectory. Finally, based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, they accurately analyze... The transition point plane corresponding to the current trajectory is accurately analyzed based on the compensation vector information and the compensated trajectory corresponding to the next trajectory. The target point is determined based on the intersection of the transition point planes corresponding to the current and next trajectories with the lines between the current and next trajectories. The tool compensation trajectory is accurately generated based on the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory. This method combines tool radius, trajectory, tool axis vector, and tool compensation mode to first determine the trajectory after tool radius compensation. Then, from a planar perspective, it analyzes the target point used to connect the compensated trajectory, thereby generating the tool compensation trajectory. This eliminates the need for frequent modifications to the cutting trajectory, simplifies the debugging process, and improves the efficiency of tool compensation trajectory generation. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating a tool compensation trajectory generation method in one embodiment;
[0043] Figure 2 This is a schematic diagram of a tool compensation mode transition in one embodiment;
[0044] Figure 3 This is a schematic diagram of one tool compensation state in one embodiment;
[0045] Figure 4 This is a schematic diagram of a tool radius compensation model in one embodiment;
[0046] Figure 5This is a structural block diagram of a tool compensation trajectory generation device in one embodiment;
[0047] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] In one embodiment, such as Figure 1 As shown, a tool compensation trajectory generation method is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0050] Step S102: Based on the tool radius information, current trajectory, tool axis vector information, and tool compensation mode information of the current trajectory, determine the compensation vector information corresponding to the current trajectory; based on the tool radius information, the next trajectory corresponding to the current trajectory, tool axis vector information, and tool compensation mode information of the next trajectory, determine the compensation vector information corresponding to the next trajectory; the tool compensation mode information represents the direction of tool radius compensation.
[0051] The tool radius information can refer to the radius of the circular part of the tool. In practical applications, the tool radius can include the distance from the center of rotation of the tool to its cutting edge.
[0052] The current trajectory can refer to the path that the tool is about to cut. In practical applications, the current trajectory can include at least two trajectory points (such as the start point and the end point).
[0053] The next trajectory corresponding to the current trajectory can refer to the path that the tool needs to cut after completing the cutting on the current trajectory. For example, if edge a is the current trajectory, then edge b / edge c can be used as the next trajectory corresponding to the current trajectory.
[0054] Among them, the tool axis vector information can refer to information that characterizes the direction of the tool's rotation axis.
[0055] Tool compensation modal information refers to information representing the direction of tool radius compensation. In practical applications, tool compensation modal information can be obtained from machine tool control commands. Tool compensation modal information can include cancel tool compensation, left tool compensation, and right tool compensation. Canceling tool compensation can indicate that tool radius compensation is not performed, left tool compensation can indicate that tool radius compensation is performed on the left side of the trajectory direction, and right tool compensation can indicate that tool radius compensation is performed on the right side of the trajectory direction.
[0056] The compensation vector information corresponding to the current trajectory can refer to the information that characterizes the degree of difference between the current trajectory after tool radius compensation and the current trajectory. Similarly, the compensation vector information corresponding to the next trajectory can refer to the information that characterizes the degree of difference between the next trajectory after tool radius compensation and the next trajectory.
[0057] As an example, the terminal can first acquire tool radius information, the path the tool needs to cut, tool axis vector information, and tool compensation mode information for each path. Then, for each path (such as the current path), the terminal can determine the compensation vector information corresponding to the current path based on the tool radius information, the current path, the tool axis vector information, and the tool compensation mode information of the current path. Similarly, the terminal can determine the compensation vector information corresponding to the next path based on the tool radius information, the next path corresponding to the current path, the tool axis vector information, and the tool compensation mode information of the next path.
[0058] Step S104: Based on the compensation vector information corresponding to the current trajectory and the current trajectory, determine the compensated trajectory corresponding to the current trajectory; based on the compensation vector information corresponding to the next trajectory and the next trajectory, determine the compensated trajectory corresponding to the next trajectory.
[0059] The compensated trajectory corresponding to the current trajectory can refer to the trajectory obtained after compensating the tool radius of the current trajectory according to the compensation vector information corresponding to the current trajectory. In practical applications, the compensated trajectory corresponding to the current trajectory can include at least two trajectory points (such as the start point and the end point). Similarly, the compensated trajectory corresponding to the next trajectory can refer to the trajectory obtained after compensating the tool radius of the next trajectory according to the compensation vector information corresponding to the next trajectory. In practical applications, the compensated trajectory corresponding to the next trajectory can include at least two trajectory points (such as the start point and the end point).
[0060] As an example, since compensation vector information can characterize the degree of difference between the trajectory after tool radius compensation and the original trajectory, for each trajectory (such as the current trajectory), the terminal can determine the compensated trajectory corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the current trajectory itself. Similarly, the terminal can determine the compensated trajectory corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the next trajectory itself. For example, by shifting the current trajectory along the direction of the compensation vector information corresponding to the current trajectory by the length of the modulus of the compensation vector information corresponding to the current trajectory, the compensated trajectory corresponding to the current trajectory can be obtained.
[0061] Step S106: Based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, determine the transition point plane corresponding to the current trajectory; based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory, determine the transition point plane corresponding to the next trajectory.
[0062] The transition point plane can be a plane used to determine the connection point between the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory. In practical applications, the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory are straight lines in skew space. A point in the transition point plane can be used to connect the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory.
[0063] As an example, since the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory are straight lines in skew space, it is necessary to find a point as a transition point to connect the compensated trajectories. In order to determine the transition point, the terminal can first determine the transition point plane corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory. Then, based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory, the terminal can determine the transition point in the transition point plane corresponding to each trajectory (or compensated trajectory).
[0064] Step S108: Determine the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and determine the target point based on the intersection point between the current trajectory and the intersection line and the intersection point between the next trajectory and the intersection line.
[0065] The target point can be a point in the transition point plane used to connect the compensated trajectory corresponding to the current trajectory with the compensated trajectory corresponding to the next trajectory. In practical applications, the target point can be used as a transition point.
[0066] As an example, to determine transition points, the terminal can first analyze the transition point planes corresponding to the current trajectory and the next trajectory, determining the intersection line between them. Then, the terminal can determine the target point based on the intersection points between the current trajectory and this intersection line, and the intersection points between the next trajectory and this intersection line. In practical applications, the terminal can determine a line segment based on the intersection points between the current trajectory and this intersection line, and the intersection points between the next trajectory and this intersection line, and use a point on this line segment (such as the midpoint) as the target point.
[0067] Step S110: Generate the tool compensation trajectory based on the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory.
[0068] The tool compensation path can refer to the path obtained after compensating the tool radius for the cutting path.
[0069] As an example, the terminal can generate a tool compensation trajectory based on the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory. For instance, the terminal can connect the end point of the compensated trajectory corresponding to the current trajectory to the target point, and connect the target point to the start point of the compensated trajectory corresponding to the next trajectory to obtain the tool compensation trajectory. It can be understood that the terminal can first determine the target point corresponding to each trajectory, and then determine the tool compensation trajectory based on the start point of the compensated trajectory corresponding to the first segment of the tool trajectory and the target points corresponding to each segment. For example, the terminal can start from the start point of the compensated trajectory corresponding to the first segment of the tool trajectory and sequentially connect the target points corresponding to each segment to obtain the tool compensation trajectory.
[0070] In the aforementioned tool compensation trajectory generation method, the compensation vector information corresponding to the current trajectory is accurately obtained based on the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory. The compensation vector information corresponding to the next trajectory is also accurately obtained based on the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool compensation mode information of the next trajectory. Then, the compensated trajectory corresponding to the current trajectory is accurately obtained based on the compensation vector information and the current trajectory. Finally, the transition point plane corresponding to the current trajectory is accurately analyzed based on the compensation vector information and the compensated trajectory corresponding to the current trajectory. Based on the compensation vector information and the compensated trajectory corresponding to the next trajectory, the transition point plane corresponding to the next trajectory is accurately analyzed. Based on the intersection of the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory with the intersection points of the current trajectory and the next trajectory, the target point is determined. Based on the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory, the tool compensation trajectory is accurately generated. It can combine the tool radius, trajectory, tool axis vector, and tool compensation mode to first determine the trajectory after tool radius compensation. Then, from the perspective of the plane, the target point used to connect the compensated trajectory is analyzed to generate the tool compensation trajectory. There is no need to frequently modify the cutting trajectory, simplifying the debugging process and thus improving the generation efficiency of tool compensation trajectory.
[0071] In an exemplary embodiment, the compensation vector information corresponding to the current trajectory is determined based on the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory. This includes: determining first vector information based on the start and end points of the current trajectory; and determining the compensation vector information corresponding to the current trajectory based on the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory.
[0072] The direction of the first vector information can be from the starting point of the current trajectory to the ending point of the current trajectory, and the magnitude of the first vector information can include the length from the starting point of the current trajectory to the ending point of the current trajectory.
[0073] As an example, the terminal can determine the first vector information (such as vector P1P2) based on the starting point P1 and ending point P2 of the current trajectory. Then, according to a preset calculation expression, the terminal can calculate the magnitude of the compensation vector information corresponding to the current trajectory and determine the direction of the compensation vector information corresponding to the current trajectory based on the vector product between the first vector information and the tool axis vector information (such as vector v), the tool radius information R, and the tool compensation mode information of the current trajectory. Similarly, the terminal can determine the vector P2P3 based on the starting point P2 and ending point P3 of the next trajectory. Then, according to a preset calculation expression, the terminal can calculate the magnitude of the compensation vector information corresponding to the next trajectory based on the vector product between vector P2P3 and the tool axis vector information (such as vector v), the tool radius information R, and the tool compensation mode information of the next trajectory and determine the direction of the compensation vector information corresponding to the next trajectory.
[0074] In this embodiment, the first vector information is determined based on the start and end points of the current trajectory; the compensation vector information corresponding to the current trajectory is determined based on the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory. This allows for accurate calculation of the compensation vector corresponding to the trajectory, enabling the compensation vector to be used to quickly and accurately determine the compensated trajectory, providing a data basis for generating the tool compensation trajectory, thereby improving the efficiency of tool compensation trajectory generation.
[0075] In some embodiments, determining the compensation vector information corresponding to the current trajectory based on the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory includes: obtaining the ratio between the vector product and the magnitude of the vector product; obtaining the product of the ratio and the tool radius information; and determining the compensation vector information corresponding to the current trajectory based on the product and the tool compensation mode information of the current trajectory.
[0076] As an example, let's take the current trajectory's starting point as P1, ending point as P2, tool axis vector information as vector v, and tool radius information as R as an example. The terminal can first calculate the vector product between vector PIP2 and vector v, and the magnitude of this vector product. Then, the terminal can calculate the ratio between this vector product and its magnitude (this ratio can be used as the unit vector of the vector product between vector PIP2 and vector v), and calculate the product (a type of vector information) between this ratio and the tool radius information R. Since the tool compensation mode information can characterize the direction of tool radius compensation, the terminal can determine the direction of the above product (a type of vector information) based on the tool compensation mode information of the current trajectory, thus obtaining the compensation vector information corresponding to the current trajectory. For example, when the tool compensation mode information of the current trajectory is right tool compensation, the compensation vector information (such as vector w) corresponding to the current trajectory can be represented as:
[0077] .
[0078] When the tool compensation mode information of the current trajectory is left tool compensation, the compensation vector information (such as vector w) corresponding to the current trajectory can be represented as:
[0079] .
[0080] Similarly, taking the following trajectory as an example, where the starting point is represented by P2, the ending point by P3, the tool axis vector information by vector v, and the tool radius information by R, when the tool compensation mode information of the next trajectory is right tool compensation, the compensation vector information (such as vector u) corresponding to the next trajectory can be represented as:
[0081] .
[0082] When the tool compensation mode information of the next trajectory is left tool compensation, the compensation vector information (such as vector u) corresponding to the next trajectory can be represented as:
[0083] .
[0084] In this embodiment, by obtaining the ratio between the vector product and the magnitude of the vector product; obtaining the product of the ratio and the tool radius information; and determining the compensation vector information corresponding to the current trajectory based on the product and the tool compensation mode information of the current trajectory, the magnitude and length of the compensation vector can be accurately calculated, thereby improving the accuracy of the compensation vector information and thus improving the accuracy of the tool compensation trajectory.
[0085] In some embodiments, the method further includes: determining first vector information based on the start and end points of the current trajectory; and determining the intersection point between the current trajectory and the intersection line based on the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information.
[0086] As an example, to determine the intersection point of a trajectory (such as the current trajectory) with the line of intersection between two transition point planes, the terminal can determine the first vector information based on the start and end points of the current trajectory. Then, based on the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information, the position / coordinates of the intersection point between the current trajectory and the line of intersection are determined. Similarly, to determine the intersection point of the next trajectory with the line of intersection between two transition point planes, the terminal can determine the second vector information based on the start and end points of the next trajectory. Then, based on the end point of the next trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the second vector information, the position / coordinates of the intersection point between the next trajectory and the line of intersection are determined.
[0087] In this embodiment, the first vector information is determined based on the start and end points of the current trajectory; the intersection point between the current trajectory and the intersection line is determined based on the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information. This allows for accurate analysis of the intersection point between the trajectory and the intersection line between two transition point planes, so as to quickly determine the accurate target point / transition point, thereby improving the accuracy and generation efficiency of the tool compensation trajectory.
[0088] In some embodiments, determining the intersection point between the current trajectory and the intersection line based on the endpoint of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information includes: obtaining the vector product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory as a first vector product; obtaining the ratio between the magnitudes of the first vector information and the first vector information as the unit vector information of the current trajectory; obtaining the difference between the tool radius information and the first vector product; obtaining the vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory as a second vector product; obtaining the ratio between the unit vector information of the current trajectory and the second vector product, and obtaining the product between the ratio and the difference; and determining the intersection point between the current trajectory and the intersection line based on the endpoint of the current trajectory, the compensation vector information corresponding to the current trajectory, and the product.
[0089] The direction of the first vector information can be from the starting point of the current trajectory to the ending point of the current trajectory, and the magnitude of the first vector information can include the length from the starting point of the current trajectory to the ending point of the current trajectory.
[0090] As an example, let's take the current trajectory's starting point as P1, ending point as P2, tool radius information as R, compensation vector information corresponding to the current trajectory as vector w, and compensation vector information corresponding to the next trajectory as vector u. The terminal can calculate the vector product between the compensation vector information corresponding to the current trajectory (e.g., vector w) and the compensation vector information corresponding to the next trajectory (e.g., vector u) as the first vector product. Then, the terminal can calculate the ratio between the first vector information (e.g., vector P1P2) and the magnitude of the first vector information as the unit vector information of the current trajectory (e.g., vector l1). Next, the terminal can calculate the difference between the tool radius information R and the first vector product, and calculate the vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory (e.g., vector u) as the second vector product. Then, the terminal can calculate the ratio between the unit vector information of the current trajectory (e.g., vector l1) and the second vector product, and obtain the product between the ratio and the difference. Finally, the terminal can determine the position / coordinates of the intersection point between the current trajectory and the intersection line based on the current trajectory's ending point, the compensation vector information corresponding to the current trajectory, and the product. For example, the position / coordinates of the intersection point A between the current trajectory and the intersection line can be represented as:
[0091] ,
[0092] .
[0093] Similarly, taking the following trajectory as an example, with the starting point represented by P2, the ending point by P3, the tool radius information as R, the compensation vector information corresponding to the current trajectory as vector w, and the compensation vector information corresponding to the next trajectory as vector u, the position / coordinates of the intersection point B between the next trajectory and the intersection line can be represented as:
[0094] ,
[0095] .
[0096] In this embodiment, the first vector product is obtained by acquiring the vector product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory; the ratio between the magnitudes of the first vector information and the first vector information is obtained as the unit vector information of the current trajectory; the difference between the tool radius information and the first vector product is obtained; the second vector product is obtained by acquiring the vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory; the ratio between the unit vector information of the current trajectory and the second vector product is obtained, and the product between the ratio and the difference is obtained; based on the endpoint of the current trajectory, the compensation vector information corresponding to the current trajectory, and the product, the intersection point between the current trajectory and the intersection line is determined. This can accurately determine the intersection point between the trajectory and the intersection line between the two transition point planes, so as to quickly determine the accurate target point / transition point, thereby improving the accuracy and generation efficiency of the tool compensation trajectory.
[0097] In some embodiments, the method further includes: obtaining rotary axis position information from machine tool control commands; and determining tool axis vector information based on the rotary axis position information and machine tool structure information.
[0098] Among them, machine tool control instructions can refer to instructions used to control machine tools to process raw materials and generate workpieces.
[0099] The rotary axis position information refers to the position of the tool's rotary axis. In practical applications, the rotary axis position is given in the machine tool control commands and is part of the command position information. For example, the command position information can be represented as G01X100.0 Y100.0 Z200.0 A15.0 C30.0, where X represents the position of the tool's center point on the machine tool's X-axis, Y represents the position of the tool's center point on the machine tool's Y-axis, Z represents the position of the tool's center point on the machine tool's Z-axis, A represents the angle of rotation around the X-axis, and C represents the angle of rotation around the Z-axis. A / C can describe the spatial posture of the tool. The X-axis can represent the direction of lateral movement along the machine tool's worktable, i.e., from left to right. The Y-axis can represent the direction of back-and-forth movement perpendicular to the X-axis along the worktable, i.e., from front to back. The Z-axis can represent the direction of vertical movement perpendicular to the X and Y axes, controlling the tool's height relative to the workpiece to adjust the focus point and cutting depth. Through the combined movement of these three axes, the laser cutting machine can move freely in two-dimensional (XY plane) or three-dimensional space to achieve the cutting of complex patterns.
[0100] Among them, machine tool structure information can refer to information that characterizes the model, structure, etc. of the machine tool.
[0101] As an example, in order to determine the tool axis vector, the terminal can obtain the rotary axis position information from the machine tool control command. Since the calculation process of the tool axis vector is related to the machine tool structure, the terminal can obtain the machine tool structure information and determine the tool axis vector information based on the rotary axis position information and the machine tool structure information. In practical applications, the tool axis vector information can be obtained using any one or more methods in the existing technology, which will not be elaborated here.
[0102] In this embodiment, by obtaining the rotary axis position information from the machine tool control commands, and determining the tool axis vector information based on the rotary axis position information and the machine tool structure information, the tool axis vector can be accurately calculated by combining the rotary axis position in the machine tool control commands and the machine tool structure. This allows for the rapid and accurate acquisition of the tool compensation trajectory using the tool axis vector, thereby improving the accuracy and generation efficiency of the tool compensation trajectory.
[0103] In some embodiments, to avoid the tool radius affecting the workpiece machining effect, tool radius compensation is required. First, the terminal (such as a controller) can read instructions from machine tool control commands, such as Numerical Control Programming Code, and obtain instruction position information (such as the position information of each point on the current trajectory and the next trajectory) and tool compensation mode information. The terminal can also calculate the tool axis vector based on the rotary axis position and the machine tool structure. In practical applications, the terminal can update the current state of the machine tool's tool compensation (tool radius compensation) process based on the tool radius compensation mode information (such as tool compensation mode information) in the machine tool control commands. Figure 2 The diagram illustrates a tool compensation mode transition. The tool compensation process can include four states: TRC_OFF: Tool compensation is off, which is the system default; TRC_SETUP: Tool compensation is established, transitioning to this state when encountering the G41 / G42 command in the TRC_OFF state; TRC_RUN: Tool compensation is running; TRC_CANCEL: Tool compensation is canceled, transitioning to this state when encountering the G40 command in the TRC_RUN state. The tool compensation mode can include three types: G40: Tool compensation is canceled; G41: Left tool compensation, i.e., compensation is performed along the left side of the trajectory direction; G42: Right tool compensation, i.e., compensation is performed along the right side of the trajectory direction. When changing from G40 to G41 / G42, the tool compensation state changes from TRC_OFF to TRC_SETUP, indicating that the first interpolation command of the machine tool needs to be executed to establish tool compensation. After tool compensation is established, it will return to TRC_RUN.
[0104] In practical applications, such as Figure 3As shown, a schematic diagram of a tool compensation state is provided. Initially, the tool compensation module is in TRC_OFF state. After encountering the first motion command with tool compensation mode G41 / G42, it changes to TRC_SETUP. From this point onwards, the tool compensation function is activated. After tool compensation is established, it enters the TRC_RUN state and remains in this state until the motion command G40 is encountered. At this time, the tool compensation state changes to TRC_CANCEL, and tool compensation is canceled. After tool compensation is canceled, the tool compensation module enters the TRC_OFF state again.
[0105] like Figure 4 As shown, a schematic diagram of a tool radius compensation model is provided. (P1, P2) represents the first trajectory segment (such as the current trajectory), and (P2, P3) represents the second trajectory segment (such as the next trajectory corresponding to the current trajectory). The vector v at point P2 can be the tool axis vector at the end of the first trajectory segment. The compensation vector for the first trajectory segment is vector w, and the compensation vector for the first trajectory segment is vector u. In specific implementation, when the tool compensation mode is G42, vector w can be expressed as:
[0106] .
[0107] When the tool offset mode is G41, the vector w can be expressed as:
[0108] .
[0109] When the tool compensation mode is G42, the vector u can be expressed as:
[0110] .
[0111] When the tool compensation mode is G41, the vector u can be expressed as:
[0112] .
[0113] (Q1, C1) can be the compensated trajectory of the first segment (P1, P2), and (C2, Q3) can be the compensated trajectory of the second segment (P2, P3), where:
[0114] .
[0115] The trajectories (Q1, C1) and (C2, Q3) are skew lines that do not intersect at a single point. This causes the two originally continuous spatial trajectories to become discontinuous after the tool-compensation process. To solve this problem, an intermediate transition point D needs to be added between the two trajectories (Q1, C1) and (C2, Q3). The transition point D is calculated as follows: Taking vector w as the normal vector, the plane passing through point C1 is S1, and taking vector u as the normal vector, the plane passing through point C2 is S2. The intersection of planes S1 and S2 is L. The trajectory (Q1, C1) intersects L at point A, and the trajectory (C2, Q3) intersects L at point B. Therefore, the transition point D can include the midpoint of line segment AB. The relationship between the position of point A and point P2 can be expressed as:
[0116]
[0117] .
[0118] The relationship between the position of point B and point P2 can be expressed as:
[0119]
[0120] .
[0121] At this point, the compensated trajectory (Q1, D) can be obtained from (P1, P2). Similarly, for the next segment of the trajectory (the second segment of the trajectory), the transition point E corresponding to the next segment of the trajectory can be determined according to the above process. Then, the compensated trajectory of the second segment of the trajectory can be represented as (D, E).
[0122] In this embodiment, the plane spanned by the trajectory and the tool axis vector is regarded as the machining surface. Then, tool radius compensation is performed along the direction perpendicular to the machining surface. After compensation, two non-planar spatial lines are calculated. Then, based on the angle between the trajectories, different radius compensation transition models are selected to calculate the intermediate transition point of the two non-planar spatial lines. This determines the endpoint of the first segment. The endpoint of the second segment is calculated using the same method for the second and third segments. By repeating this operation, the radius-compensated trajectories of all trajectories are obtained. This allows for the rapid and accurate acquisition of the tool radius-compensated trajectory, thereby improving the accuracy and generation efficiency of the tool compensation trajectory.
[0123] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0124] Based on the same inventive concept, this application also provides a tool compensation trajectory generation device for implementing the tool compensation trajectory generation method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more tool compensation trajectory generation device embodiments provided below can be found in the limitations of the tool compensation trajectory generation method described above, and will not be repeated here.
[0125] In one exemplary embodiment, such as Figure 5 As shown, a tool compensation trajectory generation device is provided, including: a compensation vector determination module 502, a trajectory compensation module 504, a plane determination module 506, a target point determination module 508, and a trajectory generation module 510, wherein:
[0126] The compensation vector determination module 502 is used to determine the compensation vector information corresponding to the current trajectory based on the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory; and to determine the compensation vector information corresponding to the next trajectory based on the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool compensation mode information of the next trajectory; the tool compensation mode information represents the direction of tool radius compensation.
[0127] The trajectory compensation module 504 is used to determine the compensated trajectory corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the current trajectory, and to determine the compensated trajectory corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the next trajectory.
[0128] The plane determination module 506 is used to determine the transition point plane corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and to determine the transition point plane corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory.
[0129] The target point determination module 508 is used to determine the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and to determine the target point based on the intersection point between the current trajectory and the intersection line and the intersection point between the next trajectory and the intersection line;
[0130] The trajectory generation module 510 is used to generate a tool compensation trajectory based on the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory.
[0131] In one exemplary embodiment, the compensation vector determination module 502 is further configured to determine first vector information based on the start and end points of the current trajectory; and to determine compensation vector information corresponding to the current trajectory based on the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory.
[0132] In one exemplary embodiment, the compensation vector determination module 502 is further configured to obtain the ratio between the vector product and the magnitude of the vector product; obtain the product of the ratio and the tool radius information; and determine the compensation vector information corresponding to the current trajectory based on the product and the tool compensation mode information of the current trajectory.
[0133] In one exemplary embodiment, the apparatus further includes an intersection point determination module, which is specifically configured to determine first vector information based on the start and end points of the current trajectory; and determine the intersection point between the current trajectory and the intersection line based on the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information.
[0134] In one exemplary embodiment, the intersection point determination module is further configured to: obtain the vector product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory as a first vector product; obtain the ratio between the first vector information and the magnitude of the first vector information as the unit vector information of the current trajectory; obtain the difference between the tool radius information and the first vector product; obtain the vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory as a second vector product; obtain the ratio between the unit vector information of the current trajectory and the second vector product, and obtain the product between the ratio and the difference; and determine the intersection point between the current trajectory and the intersection line based on the endpoint of the current trajectory, the compensation vector information corresponding to the current trajectory, and the product.
[0135] In one exemplary embodiment, the device further includes a tool axis vector determination module, which is specifically used to obtain rotary axis position information from machine tool control commands; and determine the tool axis vector information based on the rotary axis position information and machine tool structure information.
[0136] Each module in the aforementioned tool compensation trajectory generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0137] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a tool compensation trajectory generation method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0138] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0139] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0140] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0141] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0143] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0144] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0145] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for generating tool compensation trajectories, characterized in that, The method comprises: determining compensation vector information corresponding to the current trajectory according to tool radius information, the current trajectory, tool axis vector information and tool compensation mode information of the current trajectory, and determining compensation vector information corresponding to a next trajectory of the current trajectory according to the tool radius information, the next trajectory of the current trajectory, the tool axis vector information and tool compensation mode information of the next trajectory; the tool compensation mode information represents the direction of tool radius compensation; determining a compensated trajectory corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the current trajectory, and determining a compensated trajectory corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the next trajectory; determining an overpass point plane corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and determining an overpass point plane corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory; the overpass point plane is a plane in which a connecting point between the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory is located; comprising: taking a plane that passes through the end point of the compensated trajectory corresponding to the current trajectory and takes the compensation vector information corresponding to the current trajectory as a normal vector as the overpass point plane corresponding to the current trajectory, and taking a plane that passes through the start point of the compensated trajectory corresponding to the next trajectory and takes the compensation vector information corresponding to the next trajectory as a normal vector as the overpass point plane corresponding to the next trajectory; determining an intersection line between the overpass point plane corresponding to the current trajectory and the overpass point plane corresponding to the next trajectory, and determining a target point according to an intersection point between the current trajectory and the intersection line and an intersection point between the next trajectory and the intersection line; generating a tool compensation trajectory according to the target point, the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory.
2. The method of claim 1, wherein, The method further comprises: determining first vector information according to the start point and the end point of the current trajectory; determining the compensation vector information corresponding to the current trajectory according to the vector product between the first vector information and the tool axis vector information, the tool radius information and the tool compensation mode information of the current trajectory.
3. The method of claim 2, wherein, The method further comprises: obtaining a ratio between the vector product and a module of the vector product; obtaining a product of the ratio and the tool radius information; determining the compensation vector information corresponding to the current trajectory according to the product and the tool compensation mode information of the current trajectory.
4. The method of claim 1, wherein, The method further comprises: determining first vector information according to the start point and the end point of the current trajectory; The intersection point between the current trajectory and the intersection line is determined according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory and the first vector information.
5. The method of claim 4, wherein, The intersection point between the current trajectory and the intersection line is determined according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory and the first vector information, and the method comprises the following steps of: The vector product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory is obtained as a first vector product; The ratio between the first vector information and the modulus of the first vector information is obtained as unit vector information of the current trajectory; The difference between the tool radius information and the first vector product is obtained; The vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory is obtained as a second vector product; The ratio between the unit vector information of the current trajectory and the second vector product is obtained, and the product between the ratio and the difference is obtained; The intersection point between the current trajectory and the intersection line is determined according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory and the product.
6. The method of claim 1, wherein, The method further comprises the following steps of: Obtaining rotary shaft position information from machine tool control instructions; Determining the tool shaft vector information according to the rotary shaft position information and machine tool structure information.
7. A tool compensation trajectory generation apparatus characterized by comprising: The device comprises: A compensation vector determination module is configured to determine compensation vector information corresponding to a current trajectory according to tool radius information, the current trajectory, tool shaft vector information and tool compensation mode information of the current trajectory, and to determine compensation vector information corresponding to a next trajectory according to the tool radius information, the next trajectory, the tool shaft vector information and tool compensation mode information of the next trajectory; the tool compensation mode information represents the direction of tool radius compensation; A trajectory compensation module is configured to determine a compensated trajectory corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the current trajectory, and to determine a compensated trajectory corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the next trajectory. The plane determining module is configured to determine a transition point plane corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and determine a transition point plane corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory; the transition point plane is a plane on which a connection point between the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory is located; the determination includes: taking the compensation vector information corresponding to the current trajectory as a normal vector and a plane passing through an end point of the compensated trajectory corresponding to the current trajectory as the transition point plane corresponding to the current trajectory, and taking the compensation vector information corresponding to the next trajectory as a normal vector and a plane passing through a start point of the compensated trajectory corresponding to the next trajectory as the transition point plane corresponding to the next trajectory; The target point determining module is configured to determine an intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and determine a target point according to an intersection point between the current trajectory and the intersection line and an intersection point between the next trajectory and the intersection line. The trajectory generating module is configured to generate a tool compensation trajectory according to the target point, the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory. 8.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-7. The processor implements the steps of the method in any one of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method in any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method in any one of claims 1 to 6. The computer program, when executed by the processor, implements the steps of the method in any one of claims 1 to 6.
Citation Information
Patent Citations
Detection method for offline programming track of industrial robot
CN109571479A
Five-axis linkage synchronous tool path interpolation method and system
US11994838B1