A robot movement path reproduction method and system based on digital simulation
By using the RRT algorithm and obstacle distribution analysis in multi-axis robot path planning, the deflection angle and growth step of the path tree node taking into account obstacles are generated, which solves the problem of the influence of complex obstacles in multi-axis robot path planning and achieves a better Reasonable and safe path reproduction.
Patent Information
- Application Number
- CN202410925802.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-07-11
AI Technical Summary
In the current multi-axis robot path planning, when there are complex obstacles between the starting point and the target point, it is difficult to find a feasible path, which affects the efficiency and accuracy of path reproduction on the multi-axis robot.
The robot movement path reproduction method based on digital simulation is used to randomly generate sampling points in the work space through the RRT algorithm, calculate the deflection angle of the nodes on the path tree, generate new nodes, consider the distribution of obstacles, and adjust the growth step and path. Smoothing to ensure the feasibility and safety of the path.
The generated path is more reasonable, referring to the obstacle information in the work space, improving the usability and efficiency of path reproduction on the multi-axis robot, shortening the path length, and enhancing the feasibility and safety of the path.
Smart Images

Figure CN118444686B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot technology, and more specifically, to a method and system for reproducing a robot moving path based on digital simulation. Background Art
[0002] With the advancement of industrialization, the development of multi-axis robots has become more and more mature. They are widely used because they can replace manual labor for heavy work. In order to improve design efficiency, reduce costs, optimize performance, and ensure safety, digital simulation systems are usually used to plan the path of multi-axis robots, and then the planned path is reproduced on the real multi-axis robot.
[0003] Motion planning can be divided into path planning and trajectory planning. Path planning focuses on the generated path, while trajectory planning is to give the path time information. For the robot arm, its end effector is a technical object. The main technology in path planning is the path point tracking problem, while in trajectory planning, according to the requirements of the task, the practical application of kinematic inverse solution (posture inverse solution, velocity and acceleration inverse solution) is realized. Therefore, a systematic motion planning is of great significance for solving practical problems.
[0004] In the related technology, for example, the Chinese patent document with authorization announcement number CN110962130B discloses a heuristic RRT robot arm motion planning method based on target bias optimization. This method combines heuristic probability with an algorithm to perform path planning using a target bias factor. The search path length is also significantly reduced, while avoiding falling into a local optimum or oscillating near obstacles.
[0005] Although the above document controls the direction and distance of random point generation by the target bias factor, which can increase the chance of growing a path toward the target point and accelerate the growth of the path toward the target point to a certain extent, it ignores the situation where there are complex obstacles between the starting point and the target point. At this time, the target bias factor will not be sufficient to find a feasible path, which in turn affects the problem of reproducing the moving path on a real multi-axis robot. Summary of the invention
[0006] The present invention provides a robot movement path reproduction method and system based on digital simulation, aiming to solve the problem in the related technology that there are complex obstacles between the starting point and the target point, and no feasible path can be found, which in turn affects the movement path reproduction on a real multi-axis robot.
[0007] In a first aspect, the present invention provides a method for reproducing a robot movement path based on digital simulation, comprising: determining a robot workspace, wherein the workspace is a two-dimensional plane space; calculating the difficulty of a path between a starting point and a target point of the robot, wherein the difficulty is positively correlated with the distance of the path between the starting point and the target point, the number of obstacles on the path, and the length of the path occupied by the obstacles; randomly generating sampling points in the workspace using an RRT algorithm, and calculating the number of sampling points in the path tree. The deflection angle of the node , and then generate new nodes according to the deflection angle. The calculation formula is: ; In the formula, is the difficulty from the starting point to the target point, is the initial growth step of the path tree, is the angle between the line between the nearest node and the sampling point and the line between the nearest node and the target point, For the The minimum distance between an obstacle on the path between a sampling point and the nearest node and the nearest node; repeat the above path tree growth process to obtain the movement path of the robot.
[0008] According to the difficulty from the starting point to the target point, the distance between the path tree and the random sampling point, and the obstacles on the path corresponding to the distance, the deflection angle when generating a new node on the path tree is calculated, so that when generating a new node on the path tree, it is not simply determined by the position of the sampling point and the target point, but also refers to the local obstacle distribution. The deflection angle when generating a new node on the path tree is determined, so that when determining the position of the new node generated on the path tree, the obstacle distribution in the global range of the workspace is referred to, making the path generated in the digital simulation system more reasonable. Further, the robot movement path reproduced on the real multi-axis robot is more referenced to the obstacle information in the real workspace, making the reproduced path more reasonable and usable.
[0009] In one embodiment, the method further includes: adjusting the generated The growth step size used when the number of nodes , the growth step length is calculated as follows:
[0010] ; In the formula, is the initial growth step of the path tree, , are the length and width of the workspace, respectively. To generate the When there are nodes, the area of the region enclosed by the sampling point, the nearest node, and the target point connected in sequence is To generate the When there are nodes, the area of obstacles in the area enclosed by the sampling point, the nearest node, and the target point connected in sequence is To generate the When there are nodes, the number of obstacles in the area enclosed by the sampling point, the nearest node, and the target point connected in sequence is is the area occupied by the obstacle in the workspace, and exp() is an exponential function with the natural constant e as the base.
[0011] The step size used when generating new nodes is determined based on the obstacles in the area surrounded by the line between the nearest node in the tree, the target point and the sampling point. The size of the step size can be changed to adapt to the surrounding environment and improve the speed of generating paths.
[0012] In one embodiment, it also includes: repeating the growth process of the above-mentioned path tree to obtain the moving path of the robot, including: in response to the distance between the generated new node and the target point being less than or equal to the growth step of the path tree, stopping the growth of the path tree, and determining the path from the starting point to the target point, thereby obtaining the moving path of the robot.
[0013] In one embodiment, obtaining the moving path of the robot further includes: smoothing the moving path of the robot to obtain a final path of the robot.
[0014] Smoothing the robot's path improves the feasibility and safety of the path and removes unnecessary twists and detours in the path, effectively shortening the total path length.
[0015] In one embodiment, the difficulty of calculating the path between the robot's starting point and the target point is ,include: ; In the formula, is the length of the working space, is the width of the workspace, is the Euclidean distance between the starting point and the target point, is the Manhattan distance between the starting point and the target point, is the Euclidean distance The length of the path occupied by the obstacle on the corresponding path, Manhattan distance The length of the path occupied by the obstacle on the lateral path corresponding to the connecting line, Manhattan distance The length of the longitudinal path corresponding to the connecting line occupied by the obstacle on the path, and exp() is an exponential function with the natural constant e as the base.
[0016] According to the distance and obstacles between the starting point and the target point, the difficulty of the route from the starting point to the target point is calculated, and a specific calculation formula is given, so that when new nodes are generated subsequently, the difficulty is combined with the difficulty, which improves the accuracy of the generated new nodes and the speed of generating paths.
[0017] In one embodiment, the method further includes: in response to the new node causing the expanded path to pass through an obstacle, the node is discarded.
[0018] In one embodiment, smoothing the moving path of the robot to obtain the final path of the robot includes: smoothing the moving path of the robot using a B-spline smoothing method.
[0019] Using the B-spline smoothing method to smooth it can effectively eliminate sharp turns and discontinuities in the path, making the path smoother and more natural. This is very important for many robotic applications because abrupt turns may cause the robot to move unsteadily or be difficult to control.
[0020] In one embodiment, smoothing the moving path of the robot to obtain the final path of the robot includes: smoothing the moving path of the robot using a cubic spline interpolation method.
[0021] In a second aspect of the present invention, a robot movement path reproduction system based on digital simulation is also provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the above-mentioned robot movement path reproduction methods based on digital simulation.
[0022] Beneficial effect: When generating a new node on the path tree, it is not simply determined by relying on the positions of the sampling points and the target points, but also refers to the local obstacle distribution and difficulty level to determine the deflection angle when generating a new node on the path tree. When determining the position of generating a new node on the path tree, the obstacle distribution in the global range of the workspace is referred to, making the path generated in the digital simulation system more reasonable. Furthermore, the robot movement path reproduced on the real multi-axis robot is more based on the obstacle information in the real workspace, making the reproduced path more reasonable and usable. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0024] Figure 1 is a schematic diagram schematically illustrating the distance from the starting point to the sampling point according to an embodiment of the present invention;
[0025] Figure 2 is a schematic diagram schematically illustrating the deflection angle of a node according to an embodiment of the present invention;
[0026] Figure 3 is a flowchart schematically illustrating a planning movement path according to an embodiment of the present invention;
[0027] Figure 4 FIG. 1 is a schematic diagram schematically showing a system structure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0029] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0030] like Figure 3 As shown, the robot movement path reproduction method based on digital simulation includes steps S101 to S104.
[0031] S101: Determine the working space of the robot.
[0032] In one embodiment, since the path generated in the digital simulation system is to be reproduced on a real multi-axis robot, it is necessary to set the starting point and target point of the multi-axis robot according to the actual scene in which the multi-axis robot is located, and set the working space and obstacle information of the multi-axis robot. In the present invention, since the multi-axis robot is mostly used to work in a plane, the working space is a two-dimensional plane space.
[0033] S102: Calculate the difficulty of the path between the robot's starting point and the target point.
[0034] Specifically, the difficulty level is positively correlated with the distance of the path from the starting point to the target point, the number of obstacles on the path, and the length of the path occupied by the obstacles.
[0035] In one embodiment, in a limited workspace, the distance between the starting point and the target point affects the difficulty of constructing a path from the starting point to the target point, and the obstacles between the starting point and the target point also affect the difficulty of constructing the path. Therefore, the present invention calculates the difficulty of the path from the starting point to the target point according to the distance between the starting point and the target point and the number of obstacles.
[0036] In one embodiment, the Euclidean distance and the Manhattan distance between the starting point and the target point are calculated, and the Euclidean distance corresponding path between the starting point and the target point (the line between the starting point and the target point, such as Figure 1 The number of obstacles that appear on the path and the length of the path occupied by the obstacle, and the two paths corresponding to the Manhattan distance (the vertical path between the starting point and the target point, such as Figure 1 The number of obstacles that appear on the path and the length of the path occupied by the obstacles are calculated, and the difficulty from the starting point to the target point is calculated based on the above characteristics. The calculation formula is: ; In the formula, is the length of the working space, is the width of the workspace, is the Euclidean distance between the starting point and the target point, is the Manhattan distance between the starting point and the target point, is the Euclidean distance The length of the path occupied by the obstacle on the corresponding path, Manhattan distance The length of the path occupied by the obstacle on the lateral path corresponding to the connecting line, Manhattan distance The length of the longitudinal path corresponding to the connecting line occupied by the obstacle on the path, and exp() is an exponential function with the natural constant e as the base.
[0037] Among them, due to is the Euclidean distance between the starting point and the target point. For ease of calculation, the maximum Euclidean distance in the workspace is used. right Normalize it and get The larger the value, the greater the distance between the starting point and the target point, which means it is more difficult to plan a path from the starting point to the target point, and the greater the difficulty of the path from the starting point to the target point. The smaller the value, the smaller the distance between the starting point and the target point, which means it is easier to plan a path from the starting point to the target point, and the less difficult the path from the starting point to the target point. At the same time, obstacles on the path also affect the path planning from the starting point to the target point. When the proportion of the path occupied by obstacles is The larger the value, the more difficult it is to plan a path from the starting point to the target point. The greater the difficulty of getting from the starting point to the target point, the greater the proportion of obstacles on the path. The smaller it is, the easier it is to plan a path from the starting point to the target point, and the smaller the difficulty of getting from the starting point to the target point. right Make corrections when The bigger the The smaller the right The greater the expansion, the greater the difficulty of getting from the starting point to the target point. The more hours, The larger the value, the more difficult it is to get from the starting point to the target point. In order to cope with the diverse application scenarios in the workspace, the present invention uses the Manhattan distance and the corresponding path to calculate the difficulty of the starting point to the target point while using the Euclidean distance and the corresponding path. is the Manhattan distance between the starting point and the target point. For ease of calculation, the maximum Manhattan distance in the workspace is used. right Normalize it and get For the proportion of obstacles on the path corresponding to the Manhattan distance The influence of the Euclidean distance on the path corresponding to the proportion of obstacles The influence of is similar, so I will not elaborate on it here. It should be noted that in this example, there are two paths corresponding to the Manhattan distance, so the average of the proportion of obstacles on these two paths is Come to Make adjustments.
[0038] S103: Calculate the deflection angle of the path tree node, and then generate a new node according to the deflection angle.
[0039] In one embodiment, since each node in the path generated by the RRT algorithm (Rapidly-exploring Random Trees) is constructed by random sampling points, the RRT algorithm uses the same method to construct the path for sampling points at different positions, so that when the sampling point appears at a position that is not conducive to building the path, a node that is not conducive to reaching the target point is generated in the path tree. In order to alleviate the impact of this situation on the generated path, the present invention calculates the node bias according to the difficulty of the starting point to the target point, the distance between the path tree and the random sampling point, and the obstacles on the path corresponding to the distance.
[0040] Specifically, determine the growth step length of the path tree (a concept in the prior art of the RRT algorithm), which can be determined according to actual needs, randomly generate sampling points in the workspace, take the node closest to the sampling point in the path tree as the nearest node in the tree, calculate the distance between the obstacle on the path corresponding to the line between the sampling point and the nearest node in the tree and the nearest node in the tree, and calculate the angle between the line between the nearest node in the tree and the sampling point and the line between the nearest node in the tree and the target point. Calculate the deflection angle when generating a new node on the path tree based on the difficulty from the starting point to the target point, the distance between the path tree and the random sampling point, and the obstacle on the path corresponding to the distance.
[0041] In one embodiment, the calculation of the path tree The deflection angle of the node , the calculation formula is: In the formula, is the difficulty from the starting point to the target point, is the initial growth step of the path tree, is the angle between the line between the nearest node and the sampling point and the line between the nearest node and the target point, , For the The minimum distance between an obstacle on the path between a sampling point and the nearest node and the nearest node, where if there is no obstacle between the two points, then Can be a large value to make the deflection angle The value of becomes smaller.
[0042] in, The path tree is based on the step size The possibility of encountering obstacles when generating new nodes in the direction of the sampling point. The larger it is, the more likely it is that the path generated by the nearest node in the tree directly toward the sampling point to generate a new node will encounter obstacles, and the generated new node should deviate from the line between the nearest node in the tree and the sampling point. The smaller it is, the less likely it is that the path generated by the nearest node in the tree directly toward the sampling point will encounter obstacles, and the generated new node should be more inclined to the line between the nearest node in the tree and the sampling point. Normalize it and get ,when The larger the value is, the greater the deviation of the sampling point from the target point is, and the more the generated new node should be deviated from the line between the nearest node in the tree and the sampling point. The smaller the value, the smaller the deviation of the sampling point from the target point. Therefore, the generated new node should be biased towards the line between the nearest node in the tree and the sampling point. However, since the nearest node in the tree is generated by expanding the starting point, and there are usually obstacles between the starting point and the target point, there may also be obstacles between the nearest node in the tree and the target point. This may cause the new node to be too close to the target point and affect the generation of the path. The more obstacles there are between the starting point and the target point, the more obstacles there are between the nearest node in the tree and the target point. Therefore, the difficulty of getting from the starting point to the target point is The larger the value is, the smaller the deflection angle of the new node should be. The fewer obstacles there are between the starting point and the target point, the fewer obstacles there are between the nearest node in the tree and the target point. The fewer obstacles there are between the starting point and the target point, the more difficult it is to get from the starting point to the target point. The smaller it is, the greater the deflection angle of the new node should be, so the difficulty level right Make corrections when the difficulty The more hours, right The greater the expansion, the greater the deflection angle of the new node. When the value is larger, the deflection angle of the new node is Decide.
[0043] It should be noted that the deflection angle when generating a new node on the path tree is the angle at which the new node to be generated rotates toward the line between the nearest node in the tree and the target point, with the nearest node in the tree as the rotation center, taking the line between the nearest node in the tree and the sampling point as the initial angle.
[0044] like Figure 2 As shown, illustratively, the path is expanded from the nearest node in the figure to the sampling points to obtain the original node, and then the deflection angle of the original node is calculated according to the above steps. After the original node is deflected by the angle, the node after the deflection angle is obtained, and the node after the deflection angle is used as the new node for expansion.
[0045] S104: Repeat the above path tree growth process to obtain the movement path of the robot.
[0046] Specifically, the above steps of determining a new node are repeated until the distance between the generated new node and the target point is less than or equal to the growth step of the path tree, then the growth of the path tree is stopped, and then the parent nodes on the path tree are continuously traced back from the target point until the starting point is traced back, thereby determining the path from the starting point to the target point, and using the path as the robot's moving path.
[0047] In one embodiment, the method further includes: smoothing the movement path of the robot, wherein the smoothing method includes a B-spline smoothing method or a cubic spline interpolation method. The movement path of the robot after the smoothing process is used as the final path of the robot. The final path is reproduced on a real multi-axis robot, so that the path reproduced on the real multi-axis robot can better move according to obstacles in the workspace.
[0048] The reasons for smoothing the robot's moving path are: Improving the feasibility and safety of the path: For example, the path generated by RRT may contain many sharp turns and irregular segments, which may not be ideal for actual robot movement. Sharp turns not only increase the difficulty of robot control, but may also cause the robot to lose balance or hit obstacles. A smooth path can avoid these sharp turns, allowing the robot to travel more smoothly and safely. Reduce path length: For example, the initially generated RRT path is often not the shortest path due to its random nature. Through smoothing, unnecessary twists and turns in the path can be removed, effectively shortening the total path length. A short path means that the robot can reach the target point faster, saving time and energy.
[0049] In another embodiment, when there are complexly distributed obstacles in the workspace, the size of the growth step will affect whether a good path can be generated. Therefore, the present invention adjusts the growth step used when generating new nodes based on the obstacles in the area surrounded by the lines between the nearest node, the target point and the sampling point in the tree.
[0050] In one embodiment, the adjustment generates the The growth step size used when the number of nodes , the growth step length is calculated as follows: In the formula, is the initial growth step of the path tree, , are the length and width of the workspace, respectively. To generate the When there are nodes, the area of the region enclosed by the sampling point, the nearest node, and the target point connected in sequence is To generate the When there are nodes, the area of obstacles in the area enclosed by the sampling point, the nearest node, and the target point connected in sequence is To generate the When there are nodes, the number of obstacles in the area enclosed by the sampling point, the nearest node, and the target point connected in sequence is is the area occupied by the obstacle in the workspace, and exp() is an exponential function with the natural constant e as the base.
[0051] in, for The proportion of obstacle area in the corresponding area. The larger the value, The smaller the value, the easier it is for the path tree to encounter obstacles when generating new nodes in the area. Therefore, when the value is larger, the step size used to generate new nodes should be smaller, so that the path formed by the new nodes is easier to find a path to the target point along the obstacles. The smaller the value, The larger the value, the less likely it is that the path tree will encounter obstacles when generating new nodes in the area. Therefore, when the value is smaller, the step size used to generate new nodes should be larger. However, sometimes there are multiple small obstacles in the area. The area occupied by multiple small obstacles is relatively large, but the path can be constructed from the gaps between the obstacles. Therefore, right Make corrections, The bigger the The smaller the right The greater the expansion, the larger the step size used to generate new nodes should be. The more hours, The larger the value, the larger the step size used to generate new nodes. Decision. For workspace The area occupied by obstacles in the area outside the corresponding area, In the workspace The area outside the corresponding region, This means that in the workspace The proportion of obstacles in the area outside the corresponding area. The smaller the value, the sparser the obstacles in the global scope of the workspace, and a larger step size should be used to increase the speed of generating the path (the increase in speed here refers to the speed of generating the path relative to the speed of generating the path when a small step size is used in the present invention). The larger the value, the denser the obstacles in the global scope of the workspace, and a smaller step size should be used to reduce the collision between the newly generated nodes and the obstacles.
[0052] In addition, when the method for adjusting the step length in this embodiment is used, the growth of the path tree is stopped until the distance between the generated new node and the target point is less than or equal to the step length of the node.
[0053] For example, if a new node is generated, the growth step length of the new node is calculated to be P, and if the distance between the new node and the target point is less than or equal to P, the growth of the path tree is stopped. Then, the moving path of the robot is obtained according to the above method.
[0054] The present invention also provides a robot movement path reproduction system based on digital simulation. Figure 4As shown, the system includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a robot movement path reproduction method based on digital simulation according to the first aspect of the present invention is implemented.
[0055] In one embodiment, the present invention provides a computer device whose internal structure can be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities, and various varieties such as CPU, single-chip microcomputer, DSP or FPGA can be selected. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. When the computer program is executed, the steps described in the above method embodiment can be completed, such as S101-S104. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for reproducing a robot movement path based on digital simulation is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0056] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present invention, and does not constitute a limitation on the computer device of the present invention. The specific computer device may include more or less components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0057] The system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, whose configuration and functions are known in the art and thus will not be described in detail here.
[0058] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.
[0059] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0060] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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 specification.
[0061] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent application. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for reproducing a robot's moving path based on digital simulation, characterized in that: include: Determine a working space of the robot, wherein the working space is a two-dimensional plane space; Calculating the difficulty of the path between the starting point and the target point of the robot, wherein the difficulty is positively correlated with the distance of the path between the starting point and the target point, the number of obstacles on the path, and the length of the path occupied by the obstacles; The RRT algorithm is used to randomly generate sampling points in the workspace and calculate the first The deflection angle of the node , and then generate new nodes according to the deflection angle. The calculation formula is: ; In the formula, is the difficulty from the starting point to the target point, is the initial growth step of the path tree, is the angle between the line between the nearest node and the sampling point and the line between the nearest node and the target point, For the The minimum distance between an obstacle on the path between a sampling point and the nearest node and the nearest node; The above path tree growth process is repeated to obtain the movement path of the robot.
2. The method for reproducing the robot movement path based on digital simulation according to claim 1, characterized in that: Also includes: Adjust the generated The growth step size used when the number of nodes , the growth step length is calculated as follows: ; In the formula, is the initial growth step of the path tree, , are the length and width of the workspace, respectively. To generate the When there are nodes, the area of the region enclosed by the sampling point, the nearest node, and the target point connected in sequence is To generate the When there are nodes, the area of obstacles in the area enclosed by the sampling point, the nearest node, and the target point connected in sequence is To generate the When there are nodes, the number of obstacles in the area enclosed by the sampling point, the nearest node, and the target point connected in sequence is is the area occupied by the obstacle in the workspace, and exp() is an exponential function with the natural constant e as the base.
3. The method for reproducing the robot movement path based on digital simulation according to claim 1, characterized in that: Repeat the above path tree growth process to obtain the movement path of the robot, including: In response to the distance between the generated new node and the target point being less than or equal to the growth step of the path tree, the growth of the path tree is stopped, and a path from the starting point to the target point is determined, thereby obtaining the moving path of the robot.
4. The method for reproducing the robot movement path based on digital simulation according to claim 1, characterized in that: Obtaining the moving path of the robot further includes: The moving path of the robot is smoothed to obtain a final path of the robot.
5. The method for reproducing the robot movement path based on digital simulation according to any one of claims 1 to 4, characterized in that: Calculate the difficulty of the path from the robot's starting point to the target point ,include: ; In the formula, is the length of the working space, is the width of the workspace, is the Euclidean distance between the starting point and the target point, is the Manhattan distance between the starting point and the target point, is the Euclidean distance The length of the path occupied by the obstacle on the corresponding path, Manhattan distance The length of the path occupied by the obstacle on the lateral path corresponding to the connecting line, Manhattan distance The length of the longitudinal path corresponding to the connecting line occupied by the obstacle on the path, and exp() is an exponential function with the natural constant e as the base.
6. The method for reproducing the robot movement path based on digital simulation according to claim 1, characterized in that: Also includes: In response to the new node causing the expanded path to pass through an obstacle, the node is discarded.
7. The method for reproducing the robot movement path based on digital simulation according to claim 4, characterized in that: Smoothing the moving path of the robot to obtain a final path of the robot includes: The moving path of the robot is smoothed by using a B-spline smoothing method.
8. The method for reproducing the robot movement path based on digital simulation according to claim 4, characterized in that: Smoothing the moving path of the robot to obtain a final path of the robot includes: The moving path of the robot is smoothed by using a cubic spline interpolation method.
9. A robot movement path reproduction system based on digital simulation, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the robot movement path reproduction method based on digital simulation as described in any one of claims 1 to 8.
