Method, device, electronic device and readable storage medium for automatically generating spiral trajectory
By calibrating points on the center line of the spiral trajectory and generating spiral trajectory in combination with spiral parameters, the problem that the center line of the spiral trajectory in the prior art is difficult to meet the actual process needs, and simplified debugging and efficient generation of spiral trajectory are achieved.
Patent Information
- Application Number
- CN202210768630.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-06-30
AI Technical Summary
When generating spiral trajectories in the prior art, the center line of the spiral trajectory is difficult to meet the actual process needs, and requires multiple calibration and debugging, which makes the operation complex.
By calibrating the point on the planned spiral trajectory center line and obtaining the position information of the calibration point, and determining the offset information between the calibration point and the starting point of the planned trajectory based on the spiral parameters, the spiral trajectory is then generated.
The generated spiral trajectory centerline meets actual needs, avoids a lot of debugging work, and simplifies the operation process.
Smart Images

Figure CN115922689B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics, and in particular to a method, device, electronic device and readable storage medium for automatically generating a spiral trajectory. Background Art
[0002] With the development of control technology, robots are widely used in various fields, such as retail, logistics, and workpiece processing. In some of these application fields, robots need to be able to control spiral trajectories, such as for workpiece grinding and spiral discharge.
[0003] Therefore, it is necessary to generate a spiral trajectory that can be used to drive the robot to perform spiral trajectory motion. The spiral trajectory includes important parameters such as the spiral trajectory starting point, the number of spiral turns, and the spiral trajectory centerline. The current spiral trajectory generation method generally calibrates the spiral trajectory starting point and sets other parameters to finally generate the spiral trajectory. The spiral trajectory centerline in the spiral trajectory is very important for the actual process. With the current method, if you want to obtain the spiral trajectory centerline that meets the actual process requirements, you may need to calibrate and set it multiple times, and the actual operation process is relatively complicated. Summary of the Invention
[0004] The objects of the present invention include, for example, providing a method, device, electronic device and readable storage medium for automatically generating a spiral trajectory, which can avoid a lot of debugging work on the basis of automatically generating a spiral trajectory with a center line that meets actual requirements.
[0005] The embodiments of the present invention can be implemented as follows:
[0006] In a first aspect, the present invention provides a method for automatically generating a spiral trajectory, the method comprising:
[0007] Obtaining the calibration points on the centerline of the planned spiral trajectory and obtaining the position and pose information of the calibration points;
[0008] Obtaining set spiral parameters, and determining offset information between the calibration point and the planned spiral trajectory starting point according to the spiral parameters;
[0009] Determining the position and posture information of the starting point of the spiral trajectory according to the position and posture information of the calibration point and the offset information;
[0010] A spiral trajectory is generated based on the posture information of the starting point of the spiral trajectory and the spiral parameters.
[0011] In an optional embodiment, the spiral parameters include an initial radius and a spiral inclination angle;
[0012] The step of determining the offset information between the calibration point and the starting point of the planned spiral trajectory according to the spiral parameter includes:
[0013] In the constructed tool coordinate system, the initial radius is mapped to the position component in the tool coordinate system to obtain position deviation information, wherein the tool coordinate system is the coordinate system where the tool loaded at the end of the robot is located;
[0014] Mapping the helical inclination angle to the attitude component in the tool coordinate system to obtain attitude deviation information;
[0015] The offset information between the calibration point and the planned spiral trajectory starting point is obtained according to the position deviation information and the attitude deviation information.
[0016] In an optional embodiment, the position component includes an X-direction position component, a Y-direction position component, and a Z-direction position component;
[0017] The step of mapping the initial radius to the position component in the tool coordinate system to obtain position deviation information includes:
[0018] The initial radius is mapped to any one or any combination of the X-direction position component, the Y-direction position component, and the Z-direction position component in the tool coordinate system to obtain position deviation information.
[0019] In an optional embodiment, the posture component includes an X-axis posture component, a Y-axis posture component, and a Z-axis posture component;
[0020] The step of mapping the spiral inclination angle to the posture component in the tool coordinates to obtain posture deviation information includes:
[0021] The spiral inclination angle is mapped to any one or any combination of the X-axis attitude component, the Y-axis attitude component and the Z-axis attitude component in the tool coordinate system to obtain attitude deviation information.
[0022] In an optional embodiment, the step of determining the posture information of the starting point of the spiral trajectory according to the posture information of the calibration point and the offset information includes:
[0023] Converting the pose information of the calibration points and the offset information into a first matrix and a second matrix respectively through Euler angles;
[0024] Based on the first matrix and the second matrix, a pose matrix of the starting point of the spiral trajectory is calculated.
[0025] In an optional embodiment, the method further comprises:
[0026] When it is detected that the generated spiral trajectory does not meet the preset requirements, the set spiral parameters are adjusted until the regenerated spiral trajectory meets the preset requirements.
[0027] In an optional embodiment, the method further comprises:
[0028] A control signal carrying the spiral trajectory is sent to the robot, so that the robot carries the loaded tool and operates according to the spiral trajectory.
[0029] In a second aspect, the present invention provides a device for automatically generating a spiral trajectory, the device comprising:
[0030] An acquisition module is used to acquire the calibration points on the center line of the planned spiral trajectory and obtain the position and posture information of the calibration points;
[0031] a first determining module, configured to obtain set spiral parameters and determine offset information between the calibration point and the starting point of the planned spiral trajectory according to the spiral parameters;
[0032] A second determining module is used to determine the posture information of the starting point of the spiral trajectory according to the posture information of the calibration point and the offset information;
[0033] A generation module is used to generate a spiral trajectory based on the posture information of the starting point of the spiral trajectory and the spiral parameters.
[0034] In a third aspect, the present invention provides an electronic device comprising one or more storage media and one or more processors communicating with the storage media, wherein the one or more storage media store machine-executable instructions executable by the processor. When the electronic device is running, the processor executes the machine-executable instructions to perform the method steps described in any one of the aforementioned embodiments.
[0035] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed, the method steps described in any one of the aforementioned embodiments are implemented.
[0036] The beneficial effects of the embodiments of the present invention include, for example:
[0037] The present application provides a method, device, electronic device and readable storage medium for automatically generating a spiral trajectory, which calibrates the calibration points on the center line of the planned spiral trajectory and obtains the posture information of the calibration points. After obtaining the set spiral parameters, the offset information between the calibration points and the planned spiral trajectory starting point is determined according to the spiral parameters. According to the posture information and offset information of the calibration points, the posture information of the starting point of the spiral trajectory is determined, and then the spiral trajectory is generated based on the posture information and spiral parameters of the starting point of the spiral trajectory. This solution adopts the method of calibration on the center line of the spiral trajectory, and combines the spiral parameters to determine the starting point of the spiral trajectory, thereby automatically generating the spiral trajectory. The center line of the generated spiral trajectory can meet the actual needs, avoiding a lot of debugging work. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 A schematic diagram of a starting point for teaching in the prior art;
[0040] Figure 2 A flowchart of a method for automatically generating a spiral trajectory provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of calibration points calibrated in an embodiment of the present application;
[0042] Figure 4 for Figure 1 Flowchart of the sub-steps included in step S102;
[0043] Figure 5 for Figure 1 Flowchart of the sub-steps included in step S103;
[0044] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application;
[0045] Figure 7 This is a functional module block diagram of the spiral trajectory automatic generation device provided in an embodiment of the present application.
[0046] Icons: 110 - storage medium; 120 - processor; 130 - spiral trajectory automatic generation device; 131 - acquisition module; 132 - first determination module; 133 - second determination module; 134 - generation module; 140 - communication interface. DETAILED DESCRIPTION
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0048] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.
[0049] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0050] The terms "first", "second", etc., if used, are merely used to distinguish and describe, and should not be understood as indicating or implying relative importance.
[0051] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0052] In the existing spiral trajectory generation method, the starting point of the spiral trajectory is generally manually taught, and then the spiral trajectory is generated by combining other parameters. Figure 1 As shown in the figure, the black dot indicates the starting point of the manually taught spiral track. Then, the entire spiral track is determined by setting the initial radius of the spiral track (the radius of the top circle of the track), the axial increment (the increment between two adjacent circles in the axial direction or the total increment), and the radial increment (the increment between the radius between two adjacent circles in the radial direction or the total increment). The center line of the spiral track determined in this way (such as Figure 1 The position of the centerline (shown by the dashed line) is determined by the starting point and initial radius, and there's usually no guarantee that the centerline will be exactly where you want it to be. However, centerline location is crucial for actual processing, and meeting these requirements requires extensive debugging, making the process complex in practical applications.
[0053] Based on the above research findings, this application provides a solution for automatically generating spiral trajectories. This solution automatically generates spiral trajectories by calibrating the centerline of the planned spiral trajectory to obtain a calibration point, and then determining the starting point of the spiral trajectory based on the set spiral parameters. This solution can ensure that the centerline of the generated spiral trajectory meets actual requirements, avoiding a lot of debugging work.
[0054] See also Figure 2 , is a flow chart of the method for automatically generating a spiral trajectory provided by an embodiment of the present application. The method steps defined in the process related to the method for automatically generating a spiral trajectory can be implemented by an electronic device, such as a personal computer, a server, a processor in a robot, etc. Figure 2 The specific process is described in detail.
[0055] S101, obtaining calibration points on the center line of the planned spiral trajectory, and obtaining position and posture information of the calibration points.
[0056] S102: Acquire set spiral parameters, and determine offset information between the calibration point and the planned spiral trajectory starting point according to the spiral parameters.
[0057] S103: Determine the posture information of the starting point of the spiral trajectory according to the posture information of the calibration point and the offset information.
[0058] S104: Generate a spiral trajectory based on the posture information of the starting point of the spiral trajectory and the spiral parameters.
[0059] In this embodiment, the planned spiral trajectory centerline is the actual desired spiral trajectory centerline. For example, in an ice cream machine in the retail field, the ice cream discharged from the machine often has a spiral shape. Therefore, it is necessary to control the ice cream to be discharged in a spiral shape within the ice cream machine. The planned spiral trajectory centerline can be the vertical line where the ice cream machine outlet is located.
[0060] A calibration point can be marked on the center line of the planned spiral trajectory. The calibration point can be any point on the center line of the spiral trajectory, such as Figure 3 The position and posture information of the calibration point is obtained. The position and posture information of the calibration point includes position information and posture information. The position information and posture information can be information in the constructed tool coordinate system. The tool coordinate system can be the coordinate system where the tool loaded on the end of the robot is located.
[0061] On this basis, the spiral parameters can be set on an electronic device, for example, on a computer's web interface, or on a PLC, or on a teaching pendant, etc., and this embodiment does not impose any specific restrictions.
[0062] After determining the calibration point on the centerline of the spiral trajectory and the desired spiral parameters of the spiral trajectory, the offset information between the calibration point and the planned spiral trajectory starting point can be determined based on the spiral parameters. In other words, the calibration point can be offset based on the spiral parameters, such as by moving or rotating the calibration point, thereby determining the spiral trajectory starting point by offsetting the calibration point.
[0063] In this embodiment, the obtained offset information is the difference information between the calibration point and the planned spiral trajectory starting point. Therefore, the position information of the spiral trajectory starting point can be obtained based on the position information of the calibration point and the offset information.
[0064] After determining the position information of the starting point of the spiral trajectory, the spiral trajectory can be generated by planning in combination with the set spiral parameters.
[0065] The spiral trajectory generated by the above method has the desired spiral trajectory centerline, which can meet the needs of practical applications. In addition, compared with the prior art method of generating a spiral trajectory by teaching the spiral trajectory starting point, there may be a defect that the obtained spiral trajectory centerline does not meet the actual needs, and therefore multiple teaching and debugging are required. This solution is to calibrate the calibration points on the planned spiral trajectory centerline, and then determine the spiral trajectory starting point based on the calibration points, thereby generating a spiral trajectory. This solution can ensure that the generated spiral trajectory centerline meets the actual needs without the need for multiple calibrations, greatly reducing complexity.
[0066] In this embodiment, the spiral parameters are primarily used to control the shape of the spiral trajectory, while the starting point and centerline of the spiral trajectory are primarily used to control the position of the spiral trajectory. In this embodiment, the spiral parameters include the initial radius and spiral inclination angle. Furthermore, the spiral parameters also include the number of spiral turns, axial increment, radial increment, and spiral direction.
[0067] In this embodiment, the horizontal plane where the calibration point is located is generally used as the plane where the spiral trajectory starts. Of course, the plane where the calibration point is located with a certain inclination angle can also be used as the plane where the spiral trajectory starts. If the spiral trajectory has an initial radius and a spiral inclination angle, if the calibration point is to be offset to the planned spiral trajectory starting point, an offset in position and an offset in attitude are required.
[0068] Therefore, see Figure 4 In this embodiment, in the above step S102, when determining the offset information between the calibration point and the starting point of the planned spiral trajectory according to the spiral parameters, it can be achieved by the following methods:
[0069] S1021 , in the constructed tool coordinate system, mapping the initial radius to the position component in the tool coordinate system to obtain position deviation information.
[0070] S1022: Map the helical inclination angle to the posture component in the tool coordinate system to obtain posture deviation information.
[0071] S1023: Obtain offset information between the calibration point and the planned spiral trajectory starting point according to the position deviation information and the attitude deviation information.
[0072] In this embodiment, since the calibration point and the planned spiral trajectory starting point are on the same plane, the position difference between the two can be determined by the set initial radius. Therefore, the initial radius can be mapped to the position component in the tool coordinate system to obtain position deviation information.
[0073] In this embodiment, the position components in the tool coordinate system include an X-direction position component, a Y-direction position component, and a Z-direction position component.
[0074] When mapping the initial radius to the position component, the initial radius can be mapped to any one or any combination of the X-direction position component, the Y-direction position component, and the Z-direction position component in the tool coordinate system to obtain position deviation information.
[0075] For example, the initial radius can be mapped only to the X-direction position component, such as in the negative direction of the X-direction position component. Alternatively, the initial radius can be mapped only to the Y-direction position component, such as in the negative direction of the Y-direction position component. Alternatively, the initial radius can be mapped only to the Z-direction position component, such as in the negative direction of the Z-direction position component.
[0076] Alternatively, the initial radius may be mapped to two or three of the X, Y, and Z position components. The resulting position deviation information is the offset in two or three of the X, Y, and Z directions.
[0077] Furthermore, because a spiral trajectory has a spiral inclination, the planned spiral trajectory starting point not only has a positional offset relative to the calibration point, but also a difference in attitude. This difference in attitude is determined by the spiral inclination. Therefore, the spiral inclination can be mapped to the attitude component of the tool coordinate system to obtain attitude deviation information.
[0078] In this embodiment, the posture component includes an X-axis posture component, a Y-axis posture component, and a Z-axis posture component, that is, the angles of rotation around the X-axis, the Y-axis, and the Z-axis, respectively.
[0079] When mapping the spiral inclination angle to the attitude component, the spiral inclination angle can be mapped to any one or any combination of the X-axis attitude component, the Y-axis attitude component and the Z-axis attitude component in the tool coordinate system to obtain attitude deviation information.
[0080] That is, the spiral inclination angle can be mapped to one of the X-axis attitude component, the Y-axis attitude component, and the Z-axis attitude component alone, or can be mapped to two or three axes.
[0081] For example, the helical inclination angle can be mapped only to the X-axis attitude component, such as being mapped to the negative direction of the Z-axis attitude component. The helical inclination angle can also be mapped only to the Y-axis attitude component, such as being mapped to the negative direction of the Y-axis attitude component. The helical inclination angle can also be mapped only to the Z-axis attitude component, such as being mapped to the negative direction of the Z-axis attitude component.
[0082] In this embodiment, the initial radius is mapped to the position component to obtain position deviation information, and the spiral inclination is mapped to the attitude component to obtain attitude deviation information. Combining the position deviation information and attitude deviation information can obtain offset information. This offset information can be understood as the offset of the calibration point in the tool coordinate system and can be recorded as (dx, dy, dz, drx, dry, drz), where dx, dy, and dz represent the position deviation information in three directions, respectively, and drx, dry, and drz represent the attitude deviation information on three axes, respectively.
[0083] By using the above mapping methods of the initial radius and various mapping methods of the spiral inclination, the starting point of the spiral trajectory can be flexibly adjusted.
[0084] In this embodiment, the position information of the calibration point can be recorded as (x, y, z, rx, ry, rz), where x, y, and z represent the position information in three directions, and rx, ry, and rz represent the posture information around the three axes.
[0085] Based on the above, the pose information of the starting point of the spiral trajectory can be determined according to the pose information of the calibration point and the obtained offset information. Figure 5 In this embodiment, the above step S103 can be implemented in the following manner:
[0086] S1031, converting the pose information of the calibration point and the offset information into a first matrix and a second matrix respectively through Euler angles.
[0087] S1032: Calculate the pose matrix of the starting point of the spiral trajectory based on the first matrix and the second matrix.
[0088] In this embodiment, the position information of the calibration points can be converted into a matrix form. The first matrix can be expressed as In addition, the offset information is also converted into matrix form through Euler angles, and the second matrix can be recorded as
[0089] Based on the obtained first matrix and second matrix, the pose matrix of the starting point of the spiral trajectory can be calculated according to the following formula:
[0090]
[0091] Based on the determined pose matrix of the starting point of the spiral trajectory and the set spiral parameters, the required spiral trajectory can be planned and generated.
[0092] The process of generating a spiral trajectory is implemented in a computer or robot processor. Based on this, a control signal carrying the spiral trajectory can be sent to the robot, so that the robot can carry the tool and operate along the spiral trajectory. For example, in the scenario of polishing a workpiece, the control signal can be sent to a robot equipped with a polishing tool, so that the robot can carry the polishing tool and polish the workpiece according to the generated spiral trajectory. For another example, in the scenario of applying to an ice cream machine, the control signal can be sent to the robot in the ice cream machine, and the end of the robot can be equipped with a tool for controlling the discharge of ice cream, so that the tool can control the discharge of ice cream along the generated spiral trajectory.
[0093] In this embodiment, the generated spiral trajectory may not meet the requirements. For example, in an ice cream machine, the ice cream dispensed using the generated spiral trajectory may be rotated too tightly or too loosely, resulting in an unsightly shape. In the prior art, if the spiral trajectory does not meet the requirements, the teaching points must be re-taught and then re-adjusted. This method of the prior art results in a complex application process.
[0094] Based on the above considerations, the spiral trajectory generation method provided in this embodiment may further include the following steps:
[0095] When it is detected that the generated spiral trajectory does not meet the preset requirements, the set spiral parameters are adjusted until the regenerated spiral trajectory meets the preset requirements.
[0096] In this embodiment, the preset requirements may include, for example, whether the interval between rotations of the spiral trajectory meets the requirements, whether the number of rotations of the spiral trajectory meets the preset requirements, etc. If the generated spiral trajectory does not meet the preset requirements, this embodiment can adjust the set spiral parameters. For example, the number of rotations, axial increment, radial increment, etc. of the spiral parameters can be adjusted.
[0097] In this embodiment, since the calibration point is on the centerline of the spiral trajectory, the spiral trajectory generated by determining the starting point of the spiral trajectory based on the calibration point and the set spiral parameters can meet actual needs. Moreover, if the spiral trajectory is not suitable, there is no need to recalibrate. The spiral trajectory can be flexibly adjusted by adjusting the spiral parameters, which provides greater flexibility.
[0098] See also Figure 6 , is a schematic diagram of exemplary components of an electronic device provided in an embodiment of the present application, and the electronic device may be a processor in a personal computer, a laptop computer, a server, or a robot, etc. The electronic device may include a storage medium 110, a processor 120, a spiral trajectory automatic generation device 130, and a communication interface 140. In this embodiment, the storage medium 110 and the processor 120 are both located in the electronic device and the two are separately arranged. However, it should be understood that the storage medium 110 may also be independent of the electronic device and can be accessed by the processor 120 through a bus interface. Alternatively, the storage medium 110 may also be integrated into the processor 120, for example, it may be a cache and / or a general register.
[0099] The spiral trajectory automatic generation device 130 can be understood as the above-mentioned electronic device, or the processor 120 of the electronic device, or can be understood as a software function module independent of the above-mentioned electronic device or processor 120 that implements the above-mentioned spiral trajectory automatic generation method under the control of the electronic device.
[0100] like Figure 7 As shown, the spiral trajectory automatic generation device 130 may include an acquisition module 131, a first determination module 132, a second determination module 133, and a generation module 134. The functions of each functional module of the spiral trajectory automatic generation device 130 are described in detail below.
[0101] An acquisition module 131 is used to acquire a calibration point on the center line of the planned spiral trajectory and obtain the position and pose information of the calibration point;
[0102] It can be understood that the acquisition module 131 can be used to execute the above step S101. For the detailed implementation of the acquisition module 131, reference can be made to the above content related to step S101.
[0103] A first determining module 132 is configured to obtain set spiral parameters and determine offset information between the calibration point and the starting point of the planned spiral trajectory according to the spiral parameters;
[0104] It can be understood that the first determining module 132 can be used to execute the above step S102. For the detailed implementation of the first determining module 132, reference can be made to the above content related to step S102.
[0105] A second determining module 133 is configured to determine the pose information of the starting point of the spiral trajectory according to the pose information of the calibration point and the offset information;
[0106] It can be understood that the second determining module 133 can be used to execute the above step S103. For the detailed implementation of the second determining module 133, reference can be made to the above content related to step S103.
[0107] The generating module 134 is configured to generate a spiral trajectory based on the posture information of the starting point of the spiral trajectory and the spiral parameters.
[0108] It can be understood that the generation module 134 can be used to execute the above step S104. For the detailed implementation of the generation module 134, reference can be made to the above content related to step S104.
[0109] In a possible implementation, the spiral parameters include an initial radius and a spiral inclination angle. The first determining module 132 may be configured to:
[0110] In the constructed tool coordinate system, the initial radius is mapped to the position component in the tool coordinate system to obtain position deviation information, wherein the tool coordinate system is the coordinate system where the tool loaded at the end of the robot is located;
[0111] Mapping the helical inclination angle to the attitude component in the tool coordinate system to obtain attitude deviation information;
[0112] The offset information between the calibration point and the planned spiral trajectory starting point is obtained according to the position deviation information and the attitude deviation information.
[0113] In a possible implementation, the position component includes an X-direction position component, a Y-direction position component, and a Z-direction position component. The first determining module 132 may be configured to:
[0114] The initial radius is mapped to any one or any combination of the X-direction position component, the Y-direction position component, and the Z-direction position component in the tool coordinate system to obtain position deviation information.
[0115] In a possible implementation, the posture component includes an X-axis posture component, a Y-axis posture component, and a Z-axis posture component. The first determining module 132 may be configured to:
[0116] The spiral inclination angle is mapped to any one or any combination of the X-axis attitude component, the Y-axis attitude component and the Z-axis attitude component in the tool coordinate system to obtain attitude deviation information.
[0117] In a possible implementation, the second determining module 133 may be configured to:
[0118] Converting the pose information of the calibration points and the offset information into a first matrix and a second matrix respectively through Euler angles;
[0119] Based on the first matrix and the second matrix, a pose matrix of the starting point of the spiral trajectory is calculated.
[0120] In a possible implementation, the spiral trajectory generating device 130 further includes an adjustment module, which can be used to:
[0121] When it is detected that the generated spiral trajectory does not meet the preset requirements, the set spiral parameters are adjusted until the regenerated spiral trajectory meets the preset requirements.
[0122] In a possible implementation, the spiral trajectory automatic generation device 130 further includes a sending module, which can be used to:
[0123] A control signal carrying the spiral trajectory is sent to the robot, so that the robot carries the loaded tool and operates according to the spiral trajectory.
[0124] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference can be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0125] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are executed, the method for automatically generating a spiral trajectory provided in the above embodiment is implemented.
[0126] Specifically, the computer-readable storage medium can be a general-purpose storage medium, such as a removable disk or hard disk. When the computer program on the computer-readable storage medium is executed, the aforementioned method for automatically generating a spiral trajectory can be executed. Regarding the processes involved when the computer-readable storage medium and its executable instructions are executed, reference can be made to the relevant descriptions in the aforementioned method embodiments and will not be further described here.
[0127] In summary, the spiral trajectory automatic generation method, device, electronic device and readable storage medium provided in the embodiments of the present application calibrate the calibration points on the planned spiral trajectory center line and obtain the posture information of the calibration points. After obtaining the set spiral parameters, the offset information between the calibration point and the planned spiral trajectory starting point is determined according to the spiral parameters. According to the posture information and offset information of the calibration point, the posture information of the spiral trajectory starting point is determined, and then the spiral trajectory is generated based on the posture information and spiral parameters of the spiral trajectory starting point. This solution adopts the method of calibration on the spiral trajectory center line, and combines the spiral parameters to determine the spiral trajectory starting point, thereby automatically generating the spiral trajectory. The center line of the generated spiral trajectory can meet the actual needs, avoiding a lot of debugging work.
[0128] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for automatically generating a spiral trajectory, characterized in that: The method comprises: Obtaining the calibration points on the centerline of the planned spiral trajectory and obtaining the position and pose information of the calibration points; Obtaining set spiral parameters, and determining offset information between the calibration point and the planned spiral trajectory starting point according to the spiral parameters; Determining the position and posture information of the starting point of the spiral trajectory according to the position and posture information of the calibration point and the offset information; Generate a spiral trajectory based on the posture information of the starting point of the spiral trajectory and the spiral parameters; The spiral parameters include an initial radius and a spiral inclination angle. The step of determining the offset information between the calibration point and the starting point of the planned spiral trajectory according to the spiral parameters includes: In the constructed tool coordinate system, the initial radius is mapped to the position component in the tool coordinate system to obtain position deviation information, wherein the tool coordinate system is the coordinate system where the tool loaded at the end of the robot is located; Mapping the helical inclination angle to the attitude component in the tool coordinate system to obtain attitude deviation information; The offset information between the calibration point and the planned spiral trajectory starting point is obtained according to the position deviation information and the attitude deviation information.
2. The method for automatically generating a spiral trajectory according to claim 1, wherein: The position components include an X-direction position component, a Y-direction position component, and a Z-direction position component; The step of mapping the initial radius to the position component in the tool coordinate system to obtain position deviation information includes: The initial radius is mapped to any one or any combination of the X-direction position component, the Y-direction position component, and the Z-direction position component in the tool coordinate system to obtain position deviation information.
3. The method for automatically generating a spiral trajectory according to claim 1, wherein: The posture components include an X-axis posture component, a Y-axis posture component and a Z-axis posture component; The step of mapping the spiral inclination angle to the posture component in the tool coordinates to obtain posture deviation information includes: The spiral inclination angle is mapped to any one or any combination of the X-axis attitude component, the Y-axis attitude component and the Z-axis attitude component in the tool coordinate system to obtain attitude deviation information.
4. The method for automatically generating a spiral trajectory according to claim 1, wherein: The step of determining the posture information of the starting point of the spiral trajectory according to the posture information of the calibration point and the offset information includes: Converting the pose information of the calibration points and the offset information into a first matrix and a second matrix respectively through Euler angles; Based on the first matrix and the second matrix, a pose matrix of the starting point of the spiral trajectory is calculated.
5. The method for automatically generating a spiral trajectory according to any one of claims 1 to 4, characterized in that: The method further comprises: When it is detected that the generated spiral trajectory does not meet the preset requirements, the set spiral parameters are adjusted until the regenerated spiral trajectory meets the preset requirements.
6. The method for automatically generating a spiral trajectory according to any one of claims 1 to 4, characterized in that: The method further comprises: A control signal carrying the spiral trajectory is sent to the robot, so that the robot carries the loaded tool and operates according to the spiral trajectory.
7. A device for automatically generating a spiral trajectory, characterized in that: The device is used to implement the method for automatically generating a spiral trajectory according to any one of claims 1 to 6, comprising: An acquisition module is used to acquire the calibration points on the center line of the planned spiral trajectory and obtain the position and posture information of the calibration points; a first determining module, configured to obtain set spiral parameters and determine offset information between the calibration point and the starting point of the planned spiral trajectory according to the spiral parameters; A second determining module is used to determine the posture information of the starting point of the spiral trajectory according to the posture information of the calibration point and the offset information; A generation module is used to generate a spiral trajectory based on the posture information of the starting point of the spiral trajectory and the spiral parameters.
8. An electronic device, characterized in that: The electronic device comprises one or more storage media and one or more processors communicating with the storage media, wherein the one or more storage media store machine-executable instructions executable by the processors. When the electronic device is running, the processor executes the machine-executable instructions to perform the method steps described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed, the method steps described in any one of claims 1 to 6 are implemented.