Robot path planning method, device and equipment based on Hammersi sequence algorithm and storage medium
By introducing the Hammersley sequence algorithm into the RRT algorithm and dynamically adjusting the expansion step size and sampling area, the problem of poor applicable capabilities of the RRT algorithm in path planning and uneven distribution of sampling points is solved, and the effect of quickly finding feasible paths in a small range is achieved, which improves the overall efficiency and robustness of path planning.
Patent Information
- Application Number
- CN202411944247.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Due to the fixed expansion step length during the path planning process, the robot has poor application capabilities in different regions, which is easy to fall into local optimal solutions, and the sampling points are unevenly distributed, which affects the exploration of effective areas. Moreover, it is impossible to centrally sample highly effective areas when searching within a large range, increasing the path planning time and length.
The robot path planning method based on Hammersley sequence algorithm is adopted. By obtaining the position point coordinates of the area where the robot is located, mapping it to the elliptical area, calculating the angle between the target vector and the obstacle vector, determining the number of effective obstacle vectors, calculating the target probability, dynamically adjusting the expansion step size and sampling area, and performing collision tests to ensure the effectiveness of the path.
Quickly find feasible paths in small-scale and highly effective areas, solving the problem of path planning bypassing, improving the overall efficiency of path planning, adapting to changes in complexity of different environments, reducing invalid sampling points, and improving the guiding ability and robustness of path planning.
Smart Images

Figure CN119690086A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of robot path planning based on a Hamersley sequence algorithm, and in particular to a robot path planning method, device, equipment and storage medium based on a Hamersley sequence algorithm. Background Art
[0002] As a key technology for autonomous driving, robot path planning can promote the process of industrial automation and intelligence, improve work efficiency, and replace humans in some simple, repetitive or even dangerous work. Robot path planning is mainly divided into two categories: global path planning and local path planning. Local path planning is to adjust the global path according to the real-time changes of the environment to achieve dynamic obstacle avoidance. Commonly used methods include artificial potential field method, quintic polynomial method, dynamic window method and time elastic band algorithm. Global path planning is committed to generating a globally static and collision-free path. Common algorithms include RRT (rapidly-exploring random tree), A* algorithm, Dijkstra algorithm and ant colony algorithm. Among them, RRT algorithm is widely used in path planning in service robots, industrial robots, drones and other aspects. It has the advantages of simple principle, complete probability, strong search ability and wide application.
[0003] However, the RRT algorithm supports the robot's movement by fixing the expansion step size during the path planning process, which makes the robot's applicability in different areas poor and easily falls into the local optimal solution. In addition, the sampling points are unevenly distributed, which affects the exploration of the effective area and has low sampling efficiency. In addition, when searching in a large area, it is impossible to concentrate on sampling the high effective area because the exploration area is too large, which increases the path planning time and length.
[0004] Therefore, the use of a fixed step size in the expansion process of the RRT algorithm has poor adaptability to different local environments, as well as the uniform distribution of sampling points and the establishment of a high effective sampling area, which are issues that need to be addressed. Summary of the invention
[0005] In view of this, the purpose of the present application is to provide a robot path planning method, device, equipment and storage medium based on the Hammersley sequence algorithm to solve the above problems and improve the overall efficiency of the robot's travel path planning.
[0006] In a first aspect, an embodiment of the present application provides a robot path planning method based on a Hammersley sequence algorithm, which is applied to a robot processor, and the method includes: The robot processor obtains the coordinates of each position point in the rectangular area where the robot is located; The robot processor maps the position point of the rectangular area where the robot is located to the elliptical area of the nth round to obtain the coordinates of each position point of the elliptical area of the nth round; The robot processor determines the vector from the coordinates of the neighboring position point of the nth round to the coordinates of the target position point of the nth round as the target vector of the nth round; The robot processor determines a vector from the coordinates of the adjacent position point of the nth wheel to the coordinates of the position point of the nth wheel that coincides with the obstacle as the obstacle vector of the nth wheel; The robot processor calculates the angle between the target vector of the nth round and the obstacle vector of the nth round; The robot processor determines the number of effective obstacle vectors of the nth round according to the angle between the target vector of the nth round and the obstacle vector of the nth round; wherein the effective obstacle vector is an obstacle vector corresponding to the angle between the target vector of the nth round and the obstacle vector of the nth round within a preset angle range; The robot processor calculates the target probability of the nth round according to the number of valid obstacle vectors of the nth round; wherein the target probability is the probability of selecting an extension point in the direction of the target vector, and the extension point is a position point in the direction of movement of the robot; The robot processor determines the coordinates of the expansion point of the nth round according to the target probability of the nth round; The robot processor determines the position point closest to the coordinates of the extension point of the nth round as the adjacent position point of the (n+1)th round; The robot processor creates a circular area of the n+1th round based on the adjacent position point of the n+1th round as the center of the circle and the first preset distance as the radius; The robot processor calculates the resolution of the extended step length of the n+1th round according to the radius of the circular area of the n+1th round and the number of position points in the circular area of the n+1th round; The robot processor calculates the extended step length of the n+1th round according to the resolution of the extended step length of the n+1th round; wherein the extended step length of the n+1th round is the distance traveled by the robot along the vector from the adjacent position point of the n+1th round to the extended point of the n+1th round; The robot processor calculates the tree expansion evaluation parameter of the n+1th round according to the number of invalid sampling points of the n+1th round in the expansion points of the n+1th round; wherein the invalid sampling point of the n+1th round is the expansion point corresponding to the vector from the adjacent position point of the n+1th round passing through the obstacle to the expansion point of the n+1th round; If the tree expansion evaluation parameter of the (n+1)th round does not meet the ellipse expansion condition threshold, the robot processor performs a collision test to obtain a test result; If the test result indicates that the robot will not intersect with an obstacle when moving according to the expansion step length of the (n+1)th round and the iteration number of the expansion point reaches the iteration number threshold, the robot processor controls the robot to stop moving.
[0007] Preferably, the method further comprises: If the tree expansion evaluation parameter of the n+1th round meets the ellipse expansion condition threshold, the robot processor expands the ellipse area of the nth round according to the sampling area expansion formula to obtain the ellipse area of the n+1th round.
[0008] Preferably, the method further comprises: If the detection result indicates that the robot will not intersect with obstacles when traveling according to the extended step length of the n+1th round and the number of iterations of the extension point does not reach the threshold, the robot processor obtains the distance between the travel point of the n+1th round and the target position point; wherein the travel point of the n+1th round is the position point reached by the robot traveling along the vector from the adjacent position point of the n+1th round to the extension point of the n+1th round; If the distance between the traveling point of the (n+1)th wheel and the target position point is less than or equal to the second preset distance, the robot processor controls the robot to stop traveling.
[0009] Preferably, the method further comprises: If the distance between the traveling point of the n+1th round and the target position point is greater than the second preset distance, the robot processor determines the coordinates of the extension point of the n+1th round according to the target probability of the n+1th round.
[0010] Preferably, the method further comprises: If the detection result indicates that the robot intersects the obstacle when traveling according to the extended step length of the n+1th round, the robot processor determines the coordinates of the extended point of the n+1th round according to the target probability of the n+1th round.
[0011] Preferably, the expansion step size of the n+1th round is calculated according to the following formula:
[0012] in, is the expansion step length of the n+1th round, is the number of collision points in the circular area in the n+1th round, is the number of position points in the circular area of the n+1th round, is the radius of the circular area of the n+1th round, is the resolution of the expansion step in the n+1th round.
[0013] Preferably, the sampling area expansion formula includes:
[0014]
[0015] in, is the expansion increment of the minor semi-axis, is the expansion increment of the major semi-axis, is the maximum expansion factor of the minor semi-axis of the elliptical region of the n+1th round, is the maximum expansion factor of the major semi-axis of the elliptical region of the n+1th round, is the expansion factor of the major semi-axis of the elliptical area of the nth round, is the expansion factor of the minor semi-axis of the n-th round ellipse area, To preset the expansion threshold, Evaluate the parameters for the tree expansion of round n+1, is the major semi-axis expansion factor of the elliptical area of the n+1th round, is the expansion factor of the minor semi-axis of the elliptical area of the n+1th round.
[0016] The robot path planning method based on the Hammersley sequence algorithm provided in this application brings the following beneficial effects: The present application provides a robot path planning method based on the Hammersley sequence algorithm, in which the robot processor calculates the expansion step length of the n+1th round according to the resolution of the expansion step length of the n+1th round, calculates the tree expansion evaluation parameter of the n+1th round according to the number of invalid sampling points of the n+1th round in the expansion points of the n+1th round, and determines whether the tree expansion evaluation parameter of the n+1th round meets the ellipse expansion condition threshold. If so, the ellipse size is expanded. If not, a collision test is performed to determine whether the robot will intersect with an obstacle when traveling according to the expansion step length of the n+1th round and the distance between the travel point and the target position point is less than or equal to the second preset distance. If so, the robot is controlled to stop traveling. The method can plan the robot's travel path through the Hammersley sequence algorithm in a small range and high effective area, solve the detour problem of path planning, and quickly find a feasible path in a smaller area through gradual exploration and expansion. The method can fully take into account the environmental complexity of different positions on the travel path, and the size of the expansion step length obtained by each round of iteration can change dynamically with the surrounding environment.
[0017] In a second aspect, the present application further provides a robot path planning device based on the Hammersley sequence algorithm, the device comprising: An acquisition module is used to obtain the coordinates of each position point in the rectangular area where the robot is located; A data processing module, used for mapping the position points of the rectangular area where the robot is located into the elliptical area of the nth round to obtain the coordinates of each position point of the elliptical area of the nth round; The data processing module is further used to determine the vector from the coordinates of the adjacent position point of the nth round to the coordinates of the target position point of the nth round as the target vector of the nth round; determine the vector from the coordinates of the adjacent position point of the nth round to the coordinates of the position point of the nth round that coincides with the obstacle as the obstacle vector of the nth round; calculate the angle between the target vector of the nth round and the obstacle vector of the nth round; determine the number of effective obstacle vectors of the nth round according to the angle between the target vector of the nth round and the obstacle vector of the nth round; wherein the effective obstacle vector is an obstacle vector corresponding to the angle between the target vector of the nth round and the obstacle vector of the nth round that is within a preset angle range; calculate the target probability of the nth round according to the number of effective obstacle vectors of the nth round; wherein the target probability is the probability of selecting an extension point in the direction of the target vector, and the extension point is a position point in the direction of travel of the robot; determine the coordinates of the extension point of the nth round according to the target probability of the nth round; determine the position point closest to the coordinates of the extension point of the nth round as the adjacent position point of the n+1th round; according to the adjacent position point of the n+1th round The n+1th round circular area is created with the first preset distance as the center and the first preset distance as the radius; the resolution of the extended step length of the n+1th round is calculated according to the radius of the circular area of the n+1th round and the number of position points in the circular area of the n+1th round; the extended step length of the n+1th round is calculated according to the resolution of the extended step length of the n+1th round; wherein the extended step length of the n+1th round is the distance traveled by the robot along the vector from the adjacent position point of the n+1th round to the extended point of the n+1th round; according to the invalid sampling of the n+1th round in the extended point of the n+1th round The number of points is calculated to obtain the tree expansion evaluation parameters of the n+1th round; wherein the invalid sampling point of the n+1th round is the expansion point corresponding to the vector from the adjacent position point of the n+1th round passing through the obstacle to the expansion point of the n+1th round; if the tree expansion evaluation parameter of the n+1th round does not meet the ellipse expansion condition threshold, a collision test is performed to obtain a test result; if the test result indicates that the robot will not intersect with the obstacle when moving according to the expansion step of the n+1th round and the number of iterations of the expansion point reaches the iteration number threshold, the robot is controlled to stop moving.
[0018] The robot path planning device based on the Hammersley sequence algorithm provided in the embodiment of the present application has the same technical features as the robot path planning method based on the Hammersley sequence algorithm provided in the above-mentioned embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0019] In a third aspect, the present application provides a computing device, including a memory and a processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as described in any one of the first aspects.
[0020] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method as described in any one of the first aspects.
[0021] In a fifth aspect, the present application provides a computer program product, wherein the computer program product comprises one or more computer instructions, and when the computer instructions are executed by a computer, the computer executes the method as described in any one of the first aspects.
[0022] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0023] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A schematic diagram of a robot path planning method based on the Hammersley sequence algorithm provided in an embodiment of the present application; Figure 2 A schematic diagram of a rectangular area provided in an embodiment of the present application; Figure 3 A schematic diagram of the elliptical area of the nth wheel provided in an embodiment of the present application; Figure 4 A schematic diagram of a local area exploration model provided in an embodiment of the present application; Figure 5 A schematic diagram of valid obstacle vectors and invalid obstacle vectors provided in an embodiment of the present application; Figure 6 A robot path planning diagram when the robot provided in this application stops moving; Figure 7A schematic diagram of an elliptical area expansion provided in an embodiment of the present application; Figure 8 A schematic diagram of the structure of a robot path planning device based on the Hammersley sequence algorithm provided in an embodiment of the present application; Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0027] To facilitate understanding of this embodiment, the embodiments of the present application are described in detail below.
[0028] The present application embodiment provides a robot path planning method based on the Hammersley sequence algorithm, which is applied to a robot processor, such as Figure 1 As shown, Figure 1 A schematic flow chart of a robot path planning method based on the Hammersley sequence algorithm provided in an embodiment of the present application. The method comprises the following steps: S101, the robot processor obtains the coordinates of each position point in the rectangular area where the robot is located.
[0029] Specifically, Figure 2 As shown, Figure 2 A schematic diagram of a rectangular area provided in an embodiment of the present application. The position of each of the above position points in the rectangular area conforms to a uniform distribution, and the coordinates of each position point in the rectangular area are calculated according to the following Hammersley sequence formula:
[0030] in, is the horizontal coordinate of the jth position point in the rectangular area, is the ordinate of the jth position point in the rectangular area, is the number of van der Koppiet sequence items at the jth position in the rectangular area, is the van der Koppiet sequence coefficient of the i-th position in the rectangular area, is the cardinality of the van der Koppiet sequence of the i-th position in the rectangular area, is the number of van der Koppiet sequence coefficients at the i-th position in the rectangular area, i=j.
[0031] S102, the robot processor maps the position point of the rectangular area where the robot is located to the elliptical area of the nth round, and obtains the coordinates of each position point of the elliptical area of the nth round.
[0032] Specifically, Figure 3 As shown, Figure 3 A schematic diagram of an elliptical area of the nth round provided in an embodiment of the present application. The coordinates of each position point of the elliptical area of the nth round are calculated according to the following formula:
[0033] in, is the horizontal coordinate of the jth position point in the elliptical area of the nth round, is the ordinate of the jth position point in the elliptical area of the nth round, is the length of the major semi-axis of the elliptical area of the nth round, is the length of the minor semi-axis of the elliptical area of the nth round, is the inclination angle of the elliptical area of the nth round relative to the horizontal axis of the rectangular area, is the offset of the center of the elliptical area of the nth round in the horizontal direction, is the offset of the center of the elliptical area of the nth wheel in the longitudinal direction.
[0034] The lateral offset of the center of the elliptical area of the nth wheel is obtained according to the following formula:
[0035] in, is the horizontal coordinate of the starting point of the nth round, is the horizontal coordinate of the target position.
[0036] The longitudinal offset of the center of the elliptical area of the nth wheel is obtained according to the following formula:
[0037] in, is the ordinate of the starting point of the nth round, is the vertical coordinate of the target position.
[0038] The length of the major semi-axis of the elliptical area of the nth wheel is calculated according to the following formula:
[0039] in, is the length of the major semi-axis of the elliptical area of the nth round, is the expansion factor of the major semi-axis of the elliptical area in the nth round, that is, the length of the major semi-axis increased in each round of iteration, The base expansion step.
[0040] The length of the minor semi-axis of the elliptical area of the nth wheel is calculated according to the following formula:
[0041] in, is the length of the minor semi-axis of the elliptical area of the nth round, It is the expansion factor of the minor semi-axis of the elliptical area in the nth round, that is, the length of the minor semi-axis increased in each round of iteration.
[0042] With this setting, the elliptical area of the nth round is the sampling area during the robot's movement. The robot performs the Hammersley sequence algorithm expansion in a small range and high effective area, which improves the overall efficiency of path planning and solves the problem of path planning detours. Moreover, through gradual exploration and expansion, the robot can quickly find a feasible path in a smaller area.
[0043] S103, the robot processor determines the vector from the coordinates of the adjacent position point of the nth round to the coordinates of the target position point of the nth round as the target vector of the nth round, and determines the vector from the coordinates of the adjacent position point of the nth round to the coordinates of the position point of the nth round that coincides with the obstacle as the obstacle vector of the nth round.
[0044] Specifically, Figure 4 As shown, Figure 4 Schematic diagram of the local area exploration model provided for this application example. is the coordinates of the adjacent position point of the nth round 411, is the coordinates of the target position point of the nth round 412, is the coordinate 413 of the position point (collision point) that coincides with the obstacle in the nth round, each position point in the ellipse area is a point within the solid line of the ellipse, and the dotted circle line is the local exploration model.
[0045] S104, the robot processor calculates the angle between the target vector of the nth round and the obstacle vector of the nth round.
[0046] Specifically, the angle between the target vector of the nth round and the obstacle vector of the nth round is calculated according to the following formula:
[0047] in, is the angle between the target vector of the nth round and the obstacle vector of the nth round, is the coordinate of the adjacent position point in the nth round, is the coordinate of the target position point in the nth round, is the coordinate of the point that coincides with the obstacle in the nth round, is the target vector, is the obstacle vector of the nth round.
[0048] S105, the robot processor determines the number of valid obstacle vectors of the nth round according to the angle between the target vector of the nth round and the obstacle vector of the nth round.
[0049] The effective obstacle vector is an obstacle vector corresponding to the angle between the target vector of the nth round and the obstacle vector of the nth round within a preset angle range.
[0050] Specifically, Figure 5 As shown, Figure 5 A schematic diagram of valid obstacle vectors and invalid obstacle vectors provided in an embodiment of the present application. and are obstacle vectors. When the obstacle is closer to the adjacent position point and the target location point When there is a straight path between is the effective obstacle vector, is an invalid obstacle vector. The above preset angle range is When the angle between the target vector of the nth round and the obstacle vector of the nth round is within the preset angle range, it means that the obstacle is close to the adjacent position point. and the target location point Therefore, the obstacle vector of the nth round is recorded as the effective obstacle vector of the nth round.
[0051] S106, the robot processor calculates the target probability of the nth round according to the number of valid obstacle vectors of the nth round.
[0052] Among them, the target probability is the probability of selecting an extension point in the direction of the target vector, and the extension point is the position point in the direction of the robot's movement.
[0053] Specifically, the target probability of the nth round is calculated according to the following formula:
[0054] in, is the target probability of the nth round, is the maximum target probability, is the number of valid obstacle vectors in round n, is the number of position points in the circular area of the nth round.
[0055] S107, the robot processor determines the coordinates of the expansion point of the nth round according to the target probability of the nth round.
[0056] Specifically, the coordinates of the expansion point of the nth round are calculated according to the following formula:
[0057] in, is the coordinate of the expansion point of the nth round, is a random position point in the elliptical area of the nth round, is the probability of selecting a position point within the elliptical area in the nth round.
[0058] The number of effective obstacle vectors in the nth round can be used as an adjustment parameter for the target probability of the nth round. When there are many collision points in the elliptical area, a higher target probability will expand the guidance tree (the robot's travel path) toward the obstacle (select the expansion point of the nth round). Therefore, the target probability of the nth round can be dynamically adjusted according to the number of effective obstacle vectors in the nth round.
[0059] S108, the robot processor determines the position point that is closest to the coordinates of the extension point of the nth round as the adjacent position point of the (n+1)th round.
[0060] Specifically, the adjacent position point of the n+1th round is the traveling position point of the robot in the n+1th round, and the robot continues to travel from the adjacent position point in the n+1th round.
[0061] S109, the robot processor creates a circular area of the n+1th round based on the adjacent position point of the n+1th round as the center of the circle and the first preset distance as the radius.
[0062] Specifically, by creating a circular area (local exploration area) for the n+1th round, it can be ensured that the robot can adapt to the environmental complexity of different locations when planning the travel path. S110: The robot processor calculates the resolution of the extended step length of the n+1th round according to the radius of the circular area of the n+1th round and the number of position points in the circular area of the n+1th round.
[0063] Specifically, the resolution of the expansion step length of the n+1th round is calculated according to the following formula:
[0064] in, is the resolution of the expansion step size of the n+1th round, is the radius of the circular area of the n+1th round, is the number of position points in the circular area of the n+1th round.
[0065] It should be noted that the radius of the circular area in each round is the same, the number of position points in the circular area in each round is also the same, but the number of collision points in the circular area in each round is different.
[0066] S111, the robot processor calculates the extended step length of the (n+1)th round according to the resolution of the extended step length of the (n+1)th round.
[0067] The extended step length of the n+1th round is the distance traveled by the robot along the vector from the adjacent position point of the n+1th round to the extended point of the n+1th round.
[0068] Specifically, the expansion step length of the n+1th round is calculated according to the following formula:
[0069] in, is the number of collision points in the circular area of the n+1th round.
[0070] With this configuration, the size of the expansion step can change dynamically with the surrounding environment. The more times the robot collides in the circular area, the denser the obstacles in the circular area. In this case, the expansion step should be reduced to enhance the ability to explore complex environments. On the contrary, the fewer the number of collisions, the sparser the obstacles in the circular area. In this case, the expansion step can be increased to speed up the update of the robot's path. S112, the robot processor calculates the tree expansion evaluation parameters for the n+1th round based on the number of invalid sampling points in the n+1th round of expansion points.
[0071] The invalid sampling point of the n+1th round is an extension point corresponding to a vector from the adjacent position point of the n+1th round passing through the obstacle to the extension point of the n+1th round.
[0072] Specifically, the tree expansion evaluation parameter of the n+1th round is calculated according to the following formula:
[0073] in, Evaluate the parameters for the tree expansion of round n+1, is the number of invalid sampling points in the n+1th round, is the number of samplings, which is the same as the number of iterations.
[0074] Since the expansion of the elliptical area requires a threshold to control, when the guide tree (the robot's travel path) stops effectively expanding toward the target position, the number of invalid sampling points will increase significantly. Therefore, the ratio of invalid sampling points to the number of sampling times is used as the threshold, that is, the tree expansion evaluation parameter.
[0075] S113, if the tree expansion evaluation parameter of the (n+1)th round does not meet the ellipse expansion condition threshold, the robot processor performs a collision test to obtain a test result.
[0076] Specifically, the above ellipse expansion condition threshold is , if the tree expansion evaluation parameter of the n+1th round is greater than the ellipse expansion condition threshold If the value is large, it means that the guidance tree (the robot's path) stops expanding effectively toward the target position, and the robot processor needs to expand the exploration range (elliptical area) of the path. Otherwise, the robot processor continues to explore the path within the current exploration range, that is, it moves (expands) according to the expansion step of the n+1th round. During the movement, a collision test is required to determine whether the robot will intersect with an obstacle when moving according to the expansion step of the n+1th round and whether the iteration number of the expansion point reaches the iteration number threshold.
[0077] S114, if the test result indicates that the robot will not intersect with obstacles when moving according to the extended step length of the (n+1)th round and the iteration number of the extension point reaches the iteration number threshold, the robot processor controls the robot to stop moving.
[0078] Specifically, Figure 6 As shown, Figure 6 The robot path planning diagram provided in the present application when the robot stops moving. The robot processor determines whether to control the robot to stop moving by judging whether the robot will intersect with any boundary of the obstacle when it moves in the direction of the vector from the adjacent position point of the n+1th round to the extension point of the n+1th round according to the extended step length of the n+1th round. The robot will not intersect with the obstacle when it moves in the extended step length of the n+1th round, which can be understood as the line segment with a length equal to the extended step length of the n+1th round in the direction of the vector from the adjacent position point of the n+1th round to the extension point of the n+1th round does not intersect with any boundary of the obstacle, which indicates that there is no obstacle between the robot and the target position point, that is, the robot has reached the target position point, and the robot processor will stop controlling the robot to move.
[0079] The embodiment of the present application provides a robot path planning method based on the Hammersley sequence algorithm, in which the robot processor calculates the expansion step length of the n+1th round according to the resolution of the expansion step length of the n+1th round, calculates the tree expansion evaluation parameter of the n+1th round according to the number of invalid sampling points of the n+1th round in the expansion points of the n+1th round, and determines whether the tree expansion evaluation parameter of the n+1th round meets the ellipse expansion condition threshold. If so, the ellipse size is expanded. If not, a collision test is performed to determine whether the robot will intersect with an obstacle when traveling according to the expansion step length of the n+1th round and the number of iterations of the expansion point reaches the iteration number threshold. If so, the robot is controlled to stop traveling. The method can plan the robot's travel path through the Hammersley sequence algorithm in a small range and high effective area, solves the detour problem of path planning, and quickly finds a feasible path in a smaller area through gradual exploration and expansion. Compared with the existing technology that uses a fixed step size in the expansion process of the RRT algorithm, this method can fully consider the environmental complexity of different positions on the travel path. The size of the expansion step obtained in each round of iteration can change dynamically with the surrounding environment. When the surrounding obstacles are dense, too many invalid sampling points will not be generated due to the long expansion step size, thereby reducing the sampling time; when the surrounding obstacles are sparse, the expansion ability of the tree robot will not be limited due to the short expansion step size.
[0080] In addition, this method performs multi-strategy optimization based on the Hamersley sequence, which significantly improves the overall planning efficiency of the RRT algorithm in the robot path planning process. Based on the uniform distribution of the position points generated by the Hamersley sequence, this method maps the position points in the rectangular area to an elliptical area of controllable size for sampling instead of global sampling, so as to concentrate the sampling of high-effective areas. At the same time, by randomly selecting sampling points from the position points generated by the Hamersley sequence for expansion, the non-uniform distribution of sampling points can be effectively avoided, thereby improving the sampling efficiency and the exploration ability of the robot's travel path. This method is based on the regional exploration model of elliptical and circular areas, and adaptively improves the extension step size and target probability according to different local environments, which improves the guidance ability and robustness of the robot processor for path planning based on the RRT algorithm, and further improves the efficiency of path planning.
[0081] In one implementation, if the tree expansion evaluation parameter of the n+1th round meets the ellipse expansion condition threshold, the robot processor expands the ellipse area of the nth round according to the sampling area expansion area to obtain the ellipse area of the n+1th round.
[0082] Specifically, the sampling area expansion formula includes:
[0083]
[0084] in, is the expansion increment of the minor semi-axis, is the expansion increment of the major semi-axis, is the maximum expansion factor of the minor semi-axis of the elliptical region of the n+1th round, is the maximum expansion factor of the major semi-axis of the elliptical region of the n+1th round, is the expansion factor of the major semi-axis of the elliptical area of the nth round, is the expansion factor of the minor semi-axis of the n-th round ellipse area, To preset the expansion threshold, Evaluate the parameters for the tree expansion of round n+1, is the major semi-axis expansion factor of the elliptical area of the n+1th round, is the minor semi-axis expansion factor of the elliptical area of the n+1th round.
[0085] The impact of the expansion of the above ellipse area is determined by the expansion length of the short semi-axis of the ellipse area and the expansion length of the long semi-axis of the ellipse area. The expansion length of the long semi-axis of the ellipse area affects the horizontal expansion of the ellipse, and the expansion length of the short semi-axis of the ellipse area affects the vertical expansion of the ellipse. When the ellipse expansion condition threshold is met, the ellipse area first expands vertically and then expands horizontally.
[0086] The following is an example to introduce the expansion process of the ellipse area. Figure 7 As shown, Figure 7 Schematic diagram of elliptical area expansion provided in the embodiment of the present application. The current sampling area 701 is the elliptical area of the nth round, and the sampling area to be expanded 702 is the elliptical area of the n+1th round. When expanding (moving), sampling is required in the current sampling area 701. The robot can start from the first adjacent position point To the first extension point To move, you can also start from the second adjacent position To the second extension point or the third extension point to move forward, but since the first neighboring position To the first extension point The path and the second neighboring location point To the second extension point or the third extension point are blocked by obstacle 703, causing the robot to move toward the target position. The expansion fails. Therefore, in the sampling area to be expanded 702, the fourth expansion point is selected As a new extension point, select the fourth extension point Take the nearest position point as an example, as the adjacent position point of the n+1th round, that is, the second adjacent position point , at this point, the robot can start from the second adjacent position To the fourth extension point By moving forward, the obstacle 703 can be effectively bypassed. By performing path planning in this way, the robot can escape from the local predicament and move toward the target position. Extensions.
[0087] This method is expanded based on the elliptical area, which improves the guidance ability and robustness of the robot processor for path planning based on the Hamersley sequence algorithm and improves the efficiency of path planning.
[0088] In one embodiment, if the detection result indicates that the robot will not intersect with obstacles when traveling according to the extended step size of the n+1th round and the number of iterations of the extension point has not reached a threshold, the robot processor obtains the distance between the traveling point of the n+1th round and the target position point; wherein the traveling point of the n+1th round is the position point reached by the robot along the vector from the adjacent position point of the n+1th round to the extension point of the n+1th round; if the distance between the traveling point of the n+1th round and the target position point is less than or equal to the second preset distance, the robot is controlled to stop traveling; if the distance between the traveling point of the n+1th round and the target position point is greater than the second preset distance, the robot processor determines the coordinates of the extension point of the n+1th round according to the target probability of the n+1th round.
[0089] Specifically, when the robot moves to a second preset distance from the target location, it is considered that there is no obstacle between the robot and the target location, and the robot processor will control the robot to stop moving. If the distance between the moving point and the target location is greater than the second preset distance, it means that there may still be an obstacle between the robot and the target location, so the robot processor will continue to iterate the extension points to plan the robot's path, and control the robot to continue moving toward the target location according to the path planning.
[0090] In this method, the robot processor determines the robot's next action through the second preset distance, controls the robot to gradually approach the target position, improves the accuracy of the robot's path planning, and accurately guides each step of the robot.
[0091] In one embodiment, if the detection result indicates that the robot intersects the obstacle when traveling according to the extended step length of the n+1th round, the robot processor determines the coordinates of the extended point of the n+1th round according to the target probability of the n+1th round.
[0092] Specifically, the robot's movement according to the extended step length of the n+1th round and its intersection with the obstacle can be understood as the direction of the vector from the adjacent position point of the n+1th round to the extended point of the n+1th round, the line segment with a length equal to the extended step length of the n+1th round, intersecting with any boundary of the obstacle. At this time, the robot processor will determine the coordinates of the extended point of the n+1th round according to the target probability of the n+1th round to plan the next path of the robot.
[0093] In this way, the robot processor can control the robot to dynamically adjust its travel strategy, i.e., the coordinates of the (extension point), in real time when facing a complex and changing environment. This flexible mechanism enables the robot to make more intelligent and reasonable decisions when facing obstacles, improving the accuracy and efficiency of the robot's travel path planning.
[0094] On the basis of the above method embodiment, the present application embodiment also provides a robot path planning device based on the Hammersley sequence algorithm, such as Figure 8 As shown, Figure 8 A schematic diagram of the structure of a robot path planning device based on the Hammersley sequence algorithm provided in an embodiment of the present application. The device includes: an acquisition module 81 and a data processing module 82. The functions of each module are as follows: An acquisition module 81 is used to acquire the coordinates of each position point in the rectangular area where the robot is located; The data processing module 82 is used to map the position point of the rectangular area where the robot is located to the elliptical area of the nth round to obtain the coordinates of each position point of the elliptical area of the nth round; The data processing module 82 is also used to determine the vector from the coordinates of the adjacent position point of the nth round to the coordinates of the target position point of the nth round as the target vector of the nth round; determine the vector from the coordinates of the adjacent position point of the nth round to the coordinates of the position point of the nth round that coincides with the obstacle as the obstacle vector of the nth round; calculate the angle between the target vector of the nth round and the obstacle vector of the nth round; determine the number of effective obstacle vectors of the nth round according to the angle between the target vector of the nth round and the obstacle vector of the nth round; wherein the effective obstacle vector is an obstacle vector corresponding to the angle between the target vector of the nth round and the obstacle vector of the nth round that is within a preset angle range; calculate the target probability of the nth round according to the number of effective obstacle vectors of the nth round; wherein the target probability is the probability of selecting an extension point in the direction of the target vector, and the extension point is a position point in the direction of the robot's movement; determine the coordinates of the extension point of the nth round according to the target probability of the nth round; determine the position point closest to the coordinates of the extension point of the nth round as the adjacent position point of the n+1th round; according to the adjacent position point of the n+1th round The position point is the center of the circle and the first preset distance is the radius to create a circular area of the n+1th round; according to the radius of the circular area of the n+1th round and the number of position points in the circular area of the n+1th round, the resolution of the extended step length of the n+1th round is calculated; according to the resolution of the extended step length of the n+1th round, the extended step length of the n+1th round is calculated; wherein the extended step length of the n+1th round is the distance traveled by the robot along the vector from the adjacent position point of the n+1th round to the extended point of the n+1th round; according to the n+1th round in the extended point The number of invalid sampling points is used to calculate the tree expansion evaluation parameters of the n+1th round; wherein the invalid sampling points of the n+1th round are the expansion points corresponding to the vectors from the adjacent position points of the n+1th round passing through the obstacle to the expansion points of the n+1th round; if the tree expansion evaluation parameters of the n+1th round do not meet the ellipse expansion condition threshold, a collision test is performed to obtain a test result; if the test result indicates that the robot will not intersect with the obstacle when moving according to the expansion step of the n+1th round and the number of iterations of the expansion point reaches the iteration number threshold, the robot is controlled to stop moving.
[0095] Preferably, the data processing module 82 is further configured to expand the elliptical area of the nth round according to the sampling area expansion formula to obtain the elliptical area of the n+1th round if the tree expansion evaluation parameter of the n+1th round meets the elliptical expansion condition threshold.
[0096] Preferably, the acquisition module 81 is further used for acquiring the distance between the traveling point of the n+1th round and the target position point if the detection result indicates that the robot will not intersect with the obstacle when traveling according to the extended step length of the n+1th round and the number of iterations of the extension point does not reach the threshold; wherein the traveling point of the n+1th round is the position point reached by the robot traveling along the vector from the adjacent position point of the n+1th round to the extension point of the n+1th round; The data processing module 82 is further used to control the robot to stop moving if the distance between the moving point of the (n+1)th round and the target position point is less than or equal to the second preset distance.
[0097] Preferably, the data processing module 82 is further used to determine the coordinates of the extension point of the n+1th round according to the target probability of the n+1th round if the distance between the travel point of the n+1th round and the target position point is greater than the second preset distance.
[0098] Preferably, the data processing module 82 is further configured to determine the coordinates of the extension point of the n+1th round according to the target probability of the n+1th round if the detection result indicates that the robot intersects the obstacle while traveling according to the extension step of the n+1th round. Preferably, the expansion step size of the n+1th round is calculated according to the following formula:
[0099] in, is the expansion step length of the n+1th round, is the number of collision points in the circular area in the n+1th round, is the number of position points in the circular area of the n+1th round, is the radius of the circular area of the n+1th round.
[0100] Preferably, the sampling area expansion formula includes:
[0101]
[0102] in, is the expansion increment of the minor semi-axis, is the expansion increment of the major semi-axis, is the longest extended length of the minor semi-axis of the elliptical area of the n+1th round, is the longest extended length of the major semi-axis of the elliptical area of the n+1th round, is the extended length of the major semi-axis of the elliptical area of the nth round, is the extended length of the minor semi-axis of the nth round ellipse area, To preset the expansion threshold, Evaluate the parameters for the tree expansion of round n+1, is the length of the major semi-axis of the elliptical area of the n+1th round, is the length of the minor semi-axis of the elliptical area of the n+1th round.
[0103] The robot path planning device based on the Hammersley sequence algorithm provided in the embodiment of the present application has the same technical features as the robot path planning method based on the Hammersley sequence algorithm provided in the above-mentioned embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0104] The present application also provides a computing device. Fig. 9 As shown, this figure is a schematic diagram of a computing device provided in an embodiment of the present application, and the computing device 400 includes a bus 401, a processor 402, a communication interface 403 and a memory 404. The processor 402, the memory 404 and the communication interface 403 communicate with each other through the bus 401.
[0105] The bus 401 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0106] The processor 402 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0107] The communication interface 403 is used for communicating with the outside. The memory 404 may include a volatile memory, such as a random access memory (RAM). The memory 404 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid state drive (SSD).
[0108] The memory 404 stores executable codes, and the processor 402 executes the executable codes to perform the aforementioned robot path planning method based on the Hammersley sequence algorithm.
[0109] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above method.
[0110] The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
[0111] The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0112] When the computer program product is executed by a computer, the computer executes any of the aforementioned robot path planning methods based on the Hamersley sequence algorithm. The computer program product may be a software installation package, and when any of the aforementioned robot path planning methods based on the Hamersley sequence algorithm is needed, the computer program product may be downloaded and executed on a computer.
[0113] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0114] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.
Claims
1. A robot path planning method based on the Hammersley sequence algorithm, characterized in that: Applied to a robot processor, the method comprises: The robot processor obtains the coordinates of each position point in the rectangular area where the robot is located; The robot processor maps the position point of the rectangular area where the robot is located to the elliptical area of the nth round to obtain the coordinates of each position point of the elliptical area of the nth round; The robot processor determines the vector from the coordinates of the neighboring position point of the nth round to the coordinates of the target position point of the nth round as the target vector of the nth round; The robot processor determines a vector from the coordinates of the adjacent position point of the nth wheel to the coordinates of the position point of the nth wheel that coincides with the obstacle as the obstacle vector of the nth wheel; The robot processor calculates the angle between the target vector of the nth round and the obstacle vector of the nth round; The robot processor determines the number of effective obstacle vectors of the nth round according to the angle between the target vector of the nth round and the obstacle vector of the nth round; wherein the effective obstacle vector is an obstacle vector corresponding to the angle between the target vector of the nth round and the obstacle vector of the nth round within a preset angle range; The robot processor calculates the target probability of the nth round according to the number of valid obstacle vectors of the nth round; wherein the target probability is the probability of selecting an extension point in the direction of the target vector, and the extension point is a position point in the direction of movement of the robot; The robot processor determines the coordinates of the expansion point of the nth round according to the target probability of the nth round; The robot processor determines the position point closest to the coordinates of the extension point of the nth round as the adjacent position point of the (n+1)th round; The robot processor creates a circular area of the n+1th round based on the adjacent position point of the n+1th round as the center of the circle and the first preset distance as the radius; The robot processor calculates the resolution of the extended step length of the n+1th round according to the radius of the circular area of the n+1th round and the number of position points in the circular area of the n+1th round; The robot processor calculates the extended step length of the n+1th round according to the resolution of the extended step length of the n+1th round; wherein the extended step length of the n+1th round is the distance traveled by the robot along the vector from the adjacent position point of the n+1th round to the extended point of the n+1th round; The robot processor calculates the tree expansion evaluation parameter of the n+1th round according to the number of invalid sampling points of the n+1th round in the expansion points of the n+1th round; wherein the invalid sampling point of the n+1th round is the expansion point corresponding to the vector from the adjacent position point of the n+1th round passing through the obstacle to the expansion point of the n+1th round; If the tree expansion evaluation parameter of the (n+1)th round does not meet the ellipse expansion condition threshold, the robot processor performs a collision test to obtain a test result; If the test result indicates that the robot will not intersect with an obstacle when moving according to the expansion step length of the (n+1)th round and the iteration number of the expansion point reaches the iteration number threshold, the robot processor controls the robot to stop moving.
2. The robot path planning method based on the Hammersley sequence algorithm according to claim 1, characterized in that: The method further comprises: If the tree expansion evaluation parameter of the n+1th round meets the ellipse expansion condition threshold, the robot processor expands the ellipse area of the nth round according to the sampling area expansion formula to obtain the ellipse area of the n+1th round.
3. The robot path planning method based on the Hammersley sequence algorithm according to claim 1, characterized in that: The method further comprises: If the detection result indicates that the robot will not intersect with obstacles when traveling according to the extended step length of the n+1th round and the number of iterations of the extension point does not reach the threshold, the robot processor obtains the distance between the travel point of the n+1th round and the target position point; wherein the travel point of the n+1th round is the position point reached by the robot traveling along the vector from the adjacent position point of the n+1th round to the extension point of the n+1th round; If the distance between the traveling point of the (n+1)th wheel and the target position point is less than or equal to the second preset distance, the robot processor controls the robot to stop traveling.
4. The robot path planning method based on the Hammersley sequence algorithm according to claim 3, characterized in that: The method further comprises: If the distance between the traveling point of the n+1th round and the target position point is greater than the second preset distance, the robot processor determines the coordinates of the extension point of the n+1th round according to the target probability of the n+1th round.
5. The robot path planning method based on the Hammersley sequence algorithm according to claim 1, characterized in that: The method further comprises: If the detection result indicates that the robot intersects the obstacle when traveling according to the extended step length of the n+1th round, the robot processor determines the coordinates of the extended point of the n+1th round according to the target probability of the n+1th round.
6. The robot path planning method based on the Hammersley sequence algorithm according to claim 1, characterized in that: The expansion step size of the n+1th round is calculated according to the following formula: in, is the expansion step length of the n+1th round, is the number of collision points in the circular area in the n+1th round, is the number of position points in the circular area of the n+1th round, is the radius of the circular area of the n+1th round, is the resolution of the expansion step in the n+1th round.
7. The robot path planning method based on the Hammersley sequence algorithm according to claim 1, characterized in that: The sampling area expansion formula includes: in, is the expansion increment of the minor semi-axis, is the expansion increment of the major semi-axis, is the maximum expansion factor of the minor semi-axis of the elliptical region of the n+1th round, is the maximum expansion factor of the major semi-axis of the elliptical region of the n+1th round, is the expansion factor of the major semi-axis of the elliptical area of the nth round, is the expansion factor of the minor semi-axis of the n-th round ellipse area, To preset the expansion threshold, Evaluate the parameters for the tree expansion of round n+1, is the major semi-axis expansion factor of the elliptical area of the n+1th round, is the minor semi-axis expansion factor of the elliptical area of the n+1th round.
8. A robot path planning device based on the Hammersley sequence algorithm, characterized in that: The device comprises: An acquisition module is used to obtain the coordinates of each position point in the rectangular area where the robot is located; A data processing module, used for mapping the position points of the rectangular area where the robot is located into the elliptical area of the nth round to obtain the coordinates of each position point of the elliptical area of the nth round; The data processing module is further used to determine the vector from the coordinates of the adjacent position point of the nth round to the coordinates of the target position point of the nth round as the target vector of the nth round; determine the vector from the coordinates of the adjacent position point of the nth round to the coordinates of the position point of the nth round that coincides with the obstacle as the obstacle vector of the nth round; calculate the angle between the target vector of the nth round and the obstacle vector of the nth round; determine the number of effective obstacle vectors of the nth round according to the angle between the target vector of the nth round and the obstacle vector of the nth round; wherein the effective obstacle vector is an obstacle vector corresponding to the angle between the target vector of the nth round and the obstacle vector of the nth round that is within a preset angle range; calculate the target probability of the nth round according to the number of effective obstacle vectors of the nth round; wherein the target probability is the probability of selecting an extension point in the direction of the target vector, and the extension point is a position point in the direction of travel of the robot; determine the coordinates of the extension point of the nth round according to the target probability of the nth round; determine the position point closest to the coordinates of the extension point of the nth round as the adjacent position point of the n+1th round; according to the adjacent position point of the n+1th round The n+1th round circular area is created with the first preset distance as the center and the first preset distance as the radius; the resolution of the extended step length of the n+1th round is calculated according to the radius of the circular area of the n+1th round and the number of position points in the circular area of the n+1th round; the extended step length of the n+1th round is calculated according to the resolution of the extended step length of the n+1th round; wherein the extended step length of the n+1th round is the distance traveled by the robot along the vector from the adjacent position point of the n+1th round to the extended point of the n+1th round; according to the invalid sampling of the n+1th round in the extended point of the n+1th round The number of points is calculated to obtain the tree expansion evaluation parameters of the n+1th round; wherein the invalid sampling point of the n+1th round is the expansion point corresponding to the vector from the adjacent position point of the n+1th round passing through the obstacle to the expansion point of the n+1th round; if the tree expansion evaluation parameter of the n+1th round does not meet the ellipse expansion condition threshold, a collision test is performed to obtain a test result; if the test result indicates that the robot will not intersect with the obstacle when moving according to the expansion step of the n+1th round and the number of iterations of the expansion point reaches the iteration number threshold, the robot is controlled to stop moving.
9. A computing device, characterized in that including memory and processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Efficient path planning method based on fast random extension tree
CN112947459A
Mobile robot path planning method based on space limitation sampling
CN117848372A
Robot path planning method based on parallel sampling point optimization RRT algorithm
CN119146994A
Method and apparatus to plan motion path of robot
US20110035087A1