A robot path planning method, device, equipment and storage medium
By clustering and expanding the obstacle point cloud and combining it with obstacle avoidance space and path planning, the problem of uncontrollable robot obstacle avoidance behavior is solved, and controlled obstacle avoidance is achieved in different environments.
Patent Information
- Application Number
- CN202310675079.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2043-06-07
AI Technical Summary
The existing robot obstacle avoidance algorithm updates the path randomly when encountering an obstacle, resulting in uncontrollable obstacle avoidance behavior. Especially when the obstacle is large, the path is searched along the edge of the obstacle, resulting in poor obstacle avoidance effect.
The processor inside the robot converts the obstacle point cloud into a two-dimensional map for clustering, selects the center point of the obstacle avoidance space, expands to generate an expanded obstacle, and merges the determined center point of the obstacle avoidance space on the planned path. The obstacle avoidance start and end points are constructed, the obstacle avoidance passing point is determined, the target obstacle avoidance path is constructed and a pass check is performed, and the planned path is replaced to generate a new planned path.
The controllability of the robot's obstacle avoidance behavior is improved, making it controllable in free scenes, narrow spaces or around high-precision equipment, and optimizing the obstacle avoidance effect.
Smart Images

Figure CN116518978B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path planning, and in particular to a robot path planning method, device, equipment and storage medium. Background Art
[0002] With the continuous development of robotics technology, the trend of factories turning to intelligence is becoming more and more obvious, and AGV (Automated Guided Vehicle) has gradually become one of the hot areas of robotics research.
[0003] As a core component of AGV intelligence, robot obstacle avoidance has a variety of existing solutions, including perception-based obstacle avoidance algorithms. These algorithms use sensors like lidar to acquire information about the robot's surroundings, detect obstacles, calculate distances, set stop and deceleration zones around the robot, and adjust the robot's speed parameters based on the location of obstacles to ensure it stops before them. However, this method can easily cause the robot to stop multiple times, disrupting its normal movement.
[0004] To this end, the current mainstream obstacle avoidance algorithms are usually based on path planning for obstacle avoidance, and can update path information when encountering obstacles. However, the path generated by the algorithm is random. When the obstacle is large, it will continue to search for a path along the edge of the obstacle, resulting in uncontrollable obstacle avoidance behavior of the robot and poor obstacle avoidance effect. Summary of the Invention
[0005] The present invention provides a robot path planning method, device, equipment and storage medium, which solves the technical problem that the current mainstream obstacle avoidance algorithm is usually based on path planning for obstacle avoidance and can update path information when encountering an obstacle. However, the path generated by the algorithm is random. When the obstacle is large, the algorithm will continue to search for a path along the edge of the obstacle, resulting in uncontrollable obstacle avoidance behavior of the robot and poor obstacle avoidance effect.
[0006] A first aspect of the present invention provides a robot path planning method, which is applied to a processor within the robot, and the method includes:
[0007] In response to the planned path and mission parameters, the obstacle point cloud obtained from the current space is converted into a two-dimensional map for clustering, multiple clustered obstacles are obtained, and the center point of the obstacle avoidance space is selected;
[0008] After sorting the clustered obstacles according to the projection point index of the center point of each obstacle avoidance space on the planned path, expanding the clustered obstacles to generate a plurality of expanded obstacles;
[0009] When there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, a merge judgment is performed and the center point of the obstacle avoidance space is updated to construct an obstacle avoidance space, and an obstacle avoidance start point and obstacle avoidance end point are selected on the planned path;
[0010] Determining a plurality of obstacle avoidance passing points according to the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road;
[0011] Constructing a target obstacle avoidance path using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point and performing a pass check;
[0012] If the verification result shows that the obstacle avoidance path is passable, the target obstacle avoidance path is used to replace the planned path from the obstacle avoidance starting point to the obstacle avoidance ending point, a new planned path is generated, and the robot is moved according to the new planned path.
[0013] Optionally, the mission parameters include an obstacle avoidance mode flag and an obstacle avoidance space radius; if the obstacle avoidance mode flag is an obstacle avoidance on flag, the steps of converting the obstacle point cloud obtained from the current space into a two-dimensional map for clustering based on the planned path and mission parameters to obtain multiple clustered obstacles and select the center point of the obstacle avoidance space include:
[0014] In response to the planned path and mission parameters, the laser radar is called to obtain the laser point cloud in the current space;
[0015] Filtering an initial obstacle point cloud and a plurality of index points included in the planned path from the laser point cloud, and converting them into a two-dimensional map;
[0016] Clustering the conversion information of the initial obstacle point cloud on the two-dimensional map to generate a plurality of clustered obstacles;
[0017] Calculating the center distance between the center point of each clustered obstacle and the nearest index point of the planned path;
[0018] The nearest index point whose center distance is less than or equal to the radius of the obstacle avoidance space is determined as the center point of the obstacle avoidance space corresponding to the clustered obstacle.
[0019] Optionally, the method further includes:
[0020] Deleting clustered obstacles whose center distance is greater than the radius of the obstacle avoidance space from the two-dimensional map;
[0021] If the obstacle avoidance mode flag is an obstacle avoidance not enabled flag, moving the robot according to the planned path;
[0022] When an obstacle is detected within a preset distance in front of the robot, the movement of the robot is stopped.
[0023] Optionally, the step of sorting the clustered obstacles according to their projection point indexes on the planned path and then expanding to generate a plurality of expanded obstacles comprises:
[0024] Sort the clustered obstacles according to their projection point indexes on the planned path from small to large to obtain a clustered obstacle sequence;
[0025] Calculating a multiplication value between the width of the robot and a preset proportional parameter to obtain an expanded size;
[0026] Each of the clustered obstacles in the clustered obstacle sequence is expanded according to the expansion size to generate a plurality of expanded obstacles.
[0027] Optionally, the method further includes:
[0028] When there is a blocking obstacle on the planned path and there is no non-blocking obstacle before the first blocking obstacle, an obstacle avoidance space is constructed with the center point of the obstacle avoidance space as the center of a circle and the radius of the obstacle avoidance space;
[0029] Selecting an intersection point of the obstacle avoidance space and the planned path as a first candidate point and obtaining a first initial index value corresponding to the first candidate point;
[0030] Determine the first candidate point to which the largest first initial index value belongs as the obstacle avoidance end point;
[0031] Determine the first candidate point to which the smallest first initial index value belongs as the first initial starting point;
[0032] Obtaining a first self-index value corresponding to the current position of the robot on the planned path;
[0033] Selecting a point corresponding to the maximum value between the first initial index value corresponding to the first initial starting point and the first self index value as the obstacle avoidance starting point;
[0034] Jump to execute the step of determining multiple obstacle avoidance passing points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road.
[0035] Optionally, when there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, performing a merge judgment and updating the obstacle avoidance space center point to construct the obstacle avoidance space, and selecting the obstacle avoidance start point and obstacle avoidance end point on the planned path includes:
[0036] When there is a road-blocking obstacle on the planned path, and there is a non-road-blocking obstacle before the first road-blocking obstacle, determining whether the first road-blocking obstacle overlaps with the non-road-blocking obstacle;
[0037] If there is overlap, the frame size extreme values of the first said road-blocking obstacle and the said non-road-blocking obstacle are used to construct an updated road-blocking obstacle;
[0038] The index point on the planned path closest to the center point of the updated obstacle is used as the new center point of the obstacle avoidance space;
[0039] Constructing an obstacle avoidance space with the new obstacle avoidance space center point as the circle center and combining the mission parameters, and selecting an obstacle avoidance end point and a temporary start point;
[0040] If there is no updated non-blocking obstacle before the updated blocking obstacle, the temporary starting point is determined as the obstacle avoidance starting point;
[0041] If the updated non-road-blocking obstacle exists and does not overlap with the updated road-blocking obstacle, the obstacle avoidance starting point is determined according to the updated non-road-blocking obstacle and the updated road-blocking obstacle in combination with the temporary starting point.
[0042] Optionally, the method further includes:
[0043] If the updated non-road-blocking obstacle exists and overlaps with the updated road-blocking obstacle, the updated non-road-blocking obstacle is used as a new non-road-blocking obstacle, and the updated road-blocking obstacle is used as a new road-blocking obstacle;
[0044] Jump to execute the step of using the frame size extreme values of the first said road-blocking obstacle and the said non-road-blocking obstacle to construct and update the road-blocking obstacle.
[0045] Optionally, the step of constructing an obstacle avoidance space with the new obstacle avoidance space center point as the center and combining the task parameters, and selecting an obstacle avoidance end point and a temporary start point includes:
[0046] Constructing an obstacle avoidance space with the new obstacle avoidance space center point as the center of the circle and combining the mission parameters;
[0047] Selecting an intersection point of the obstacle avoidance space and the planned path as a second candidate point and obtaining a second initial index value corresponding to the second candidate point;
[0048] Determine the candidate point to which the largest second initial index value belongs as the obstacle avoidance end point;
[0049] Determine the candidate point to which the smallest second initial index value belongs as the second initial starting point;
[0050] Obtaining a second self-index value corresponding to the current position of the robot on the planned path;
[0051] A point corresponding to the maximum value between the second initial index value corresponding to the second initial starting point and the second self index value is selected as a temporary starting point.
[0052] Optionally, if the updated non-blocking obstacle exists and does not overlap with the updated blocking obstacle, the step of determining the obstacle avoidance starting point based on the updated non-blocking obstacle and the updated blocking obstacle in combination with the temporary starting point includes:
[0053] If the updated non-blocking obstacle does not overlap with the updated blocking obstacle, determining whether the path index value corresponding to the updated non-blocking obstacle is greater than the path index value corresponding to the temporary starting point;
[0054] If not, determining the temporary starting point as the obstacle avoidance starting point;
[0055] If yes, then respectively obtain the minimum path index value of the four vertices of the updated road-blocking obstacle on the planned path and the maximum path index value of the four vertices corresponding to the updated non-road-blocking obstacle on the planned path;
[0056] Determining whether the minimum path index value is greater than the maximum path index value;
[0057] If yes, then determining the corresponding point of the maximum path index value on the planned path as the obstacle avoidance starting point;
[0058] If not, the corresponding point of the updated path index value corresponding to the non-blocking obstacle on the planned path is determined as the obstacle avoidance starting point.
[0059] Optionally, the method further includes:
[0060] If the first road-blocking obstacle and the non-road-blocking obstacle do not overlap, the first road-blocking obstacle is used as the updated road-blocking obstacle, and the non-road-blocking obstacle is used as the updated non-road-blocking obstacle;
[0061] Jump to the step of constructing the obstacle avoidance space with the new obstacle avoidance space center point as the center of the circle in combination with the task parameters, and selecting the obstacle avoidance end point and temporary start point.
[0062] Optionally, the step of determining a plurality of obstacle avoidance passing points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road includes:
[0063] extracting the avoidance distance from the task parameters;
[0064] The avoidance distance is used to adjust the coordinates of the obstacle vertex corresponding to the first obstacle blocking the road to generate multiple obstacle avoidance passing points.
[0065] Optionally, the step of constructing a target obstacle avoidance path using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point and performing a pass verification includes:
[0066] Taking the obstacle avoidance starting point as the starting point and the obstacle avoidance ending point as the end point, selecting a single obstacle avoidance passing point as the intermediate point, and calling a preset path planning algorithm to construct multiple obstacle avoidance paths;
[0067] Determining whether each of the obstacle avoidance paths intersects with the road-blocking obstacle;
[0068] If any of the obstacle avoidance paths does not intersect the road-blocking obstacle, the obstacle avoidance path is determined to be passable, and the obstacle avoidance path is determined as a target obstacle avoidance path;
[0069] If there are multiple obstacle avoidance paths that do not intersect with the road-blocking obstacle, the obstacle avoidance path is determined to be passable, and the obstacle avoidance path with the shortest path length is selected as the target obstacle avoidance path;
[0070] If each of the obstacle avoidance paths intersects with the blocking obstacle, two adjacent obstacle avoidance passing points are selected as intermediate points to construct multiple new obstacle avoidance paths, and the step of determining whether each of the obstacle avoidance paths intersects with the blocking obstacle is skipped to execute until each of the obstacle avoidance paths intersects with the blocking obstacle again, and then the obstacle avoidance path is determined to be impassable.
[0071] Optionally, the method further includes:
[0072] If the verification result shows that the obstacle avoidance path is impassable, moving the robot according to the planned path;
[0073] When an obstacle is detected within a preset distance in front of the robot, the movement of the robot is stopped.
[0074] Optionally, the method further includes:
[0075] Obtaining a two-dimensional map, a moving starting point and a moving end point, and connecting the moving starting point and the moving end point on the two-dimensional map to construct an initial straight line path;
[0076] Adding two control points on the initial straight path; wherein there are no obstacles at the positions of the control points;
[0077] The preset third-order Bezier curve equation is used to interpolate according to the preset number of interpolation points to generate a planned path.
[0078] Optionally, after the step of moving the robot according to the new planned path, the method further comprises:
[0079] Jump to the step of converting the obstacle point cloud obtained from the current space into a two-dimensional map for clustering, obtaining multiple clustered obstacles and selecting the center point of the obstacle avoidance space, until the robot moves to the moving end point.
[0080] A second aspect of the present invention provides a robot path planning device, which is applied to a processor in the robot, and the device includes:
[0081] The data clustering module is used to respond to the planned path and task parameters, convert the obstacle point cloud obtained from the current space into a two-dimensional map for clustering, obtain multiple clustered obstacles and select the center point of the obstacle avoidance space;
[0082] an obstacle expansion module, configured to sort the clustered obstacles according to the projection point index of the center point of each obstacle avoidance space on the planned path, and then expand the clustered obstacles to generate a plurality of expanded obstacles;
[0083] A first starting and ending point selection module is used to, when there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, perform a merge judgment and update the center point of the obstacle avoidance space to construct an obstacle avoidance space, and select the obstacle avoidance start point and obstacle avoidance end point on the planned path;
[0084] An obstacle avoidance passing point determination module is used to determine multiple obstacle avoidance passing points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road;
[0085] a pass verification module, configured to construct a target obstacle avoidance path using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point, and perform a pass verification;
[0086] The planned path update module is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point with the target obstacle avoidance path if the obstacle avoidance path verification result shows that the obstacle avoidance path is passable, generate a new planned path and move the robot according to the new planned path.
[0087] The third aspect of the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the robot path planning method as described in any one of the first aspects of the present invention.
[0088] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the robot path planning method as described in any one of the first aspects of the present invention.
[0089] It can be seen from the above technical solutions that the present invention has the following advantages:
[0090] The present invention converts the obstacle point cloud obtained from the current space into a two-dimensional map for clustering through the processor in the robot in response to the planned path and task parameters, obtains multiple clustered obstacles and selects the obstacle avoidance space center point corresponding to each clustered obstacle. After sorting each clustered obstacle according to the projection point index of each clustered obstacle on the planned path, each clustered obstacle is expanded to generate multiple expanded obstacles. When there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, a merging judgment is performed and the blocking obstacle to be merged is merged. After merging with non-blocking obstacles, the center point of the obstacle avoidance space is updated and the obstacle avoidance space is constructed. The obstacle avoidance start point and obstacle avoidance end point are selected in the planned path. Based on the task parameters and the obstacle vertex corresponding to the first blocking obstacle, multiple obstacle avoidance passing points are determined. The obstacle avoidance start point, single or two obstacle avoidance passing points, and obstacle avoidance end point are used to construct the target obstacle avoidance path and perform a pass verification. If the verification result shows that the obstacle avoidance path is passable, the target obstacle avoidance path is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point. A new planned path is generated and the robot is moved along the new planned path. By combining the obstacle avoidance space with path planning, the robot's obstacle avoidance behavior is limited to a certain range, so that it will not move uncontrollably regardless of whether it is in a free scene, a narrow space, or when there is high-precision equipment around the path, thereby improving the controllability of the robot's obstacle avoidance behavior and optimizing the obstacle avoidance effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0092] Figure 1 A flowchart of a robot path planning method according to the first embodiment of the present invention;
[0093] Figure 2 A flowchart of a robot path planning method according to a second embodiment of the present invention;
[0094] Figure 3 A schematic diagram of the expansion of clustered obstacles provided in an embodiment of the present invention;
[0095] Figure 4 A schematic diagram of constructing an obstacle avoidance space provided by an embodiment of the present invention;
[0096] Figure 5 A schematic diagram of merging updated road obstacles provided by an embodiment of the present invention;
[0097] Figure 6 A schematic diagram of selecting an obstacle avoidance starting point IN1 according to an embodiment of the present invention;
[0098] Figure 7 A schematic diagram of selecting an obstacle avoidance starting point IN2 according to an embodiment of the present invention;
[0099] Figure 8 A schematic diagram of selecting an obstacle avoidance starting point IN3 according to an embodiment of the present invention;
[0100] Figure 9 A schematic diagram of adjusting an obstacle avoidance passing point provided by an embodiment of the present invention;
[0101] Figure 10 A schematic diagram of a passable obstacle avoidance path constructed by selecting a single obstacle avoidance passing point as an intermediate point provided in an embodiment of the present invention;
[0102] Figure 11 An impassable schematic diagram of selecting a single obstacle avoidance point as an intermediate point to construct a traversable obstacle avoidance path provided by an embodiment of the present invention;
[0103] Figure 12 A schematic diagram of a passable obstacle avoidance path constructed by selecting two obstacle avoidance passing points as intermediate points provided in an embodiment of the present invention;
[0104] Figure 13 is an overall flow chart of a robot path planning method in an optional embodiment of the present invention;
[0105] Figure 14 A flowchart of the obstacle avoidance starting point selection steps in an embodiment of the present invention;
[0106] Figure 15 This is a structural block diagram of a robot path planning device provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0107] Embodiments of the present invention provide a robot path planning method, apparatus, device, and storage medium, which are used to solve the problem that the current mainstream obstacle avoidance algorithm is usually based on path planning for obstacle avoidance. The path information can be updated when encountering an obstacle. However, the path generated by the algorithm is random. When the obstacle is large, the algorithm will continue to search for a path along the edge of the obstacle, resulting in uncontrollable obstacle avoidance behavior of the robot and poor obstacle avoidance effect.
[0108] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only 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 ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0109] See also Figure 1 , Figure 1 This is a flowchart of the steps of a robot path planning method provided in Example 1 of the present invention.
[0110] The present invention provides a robot path planning method, which is applied to a processor within the robot and includes the following steps:
[0111] Step 101: In response to the planned path and mission parameters, the obstacle point cloud obtained from the current space is converted into a two-dimensional map for clustering, multiple clustered obstacles are obtained, and the center point of the obstacle avoidance space is selected;
[0112] The planned path refers to a path that is copied from a pre-planned global prior path in the current space or the entire two-dimensional map according to a path planning algorithm after determining the starting point and the end point of the movement. The path planning algorithm may include but is not limited to the Dijkstra algorithm, the A* algorithm, or the D* algorithm.
[0113] Mission parameters refer to the parameters used to adjust the robot's planned path, such as a global prior path that is completely consistent with the planned path, obstacle avoidance mode identifier, obstacle avoidance space radius, expansion size, and avoidance distance.
[0114] The global prior path and obstacle avoidance mode flag can be set in response to user input. The obstacle avoidance space radius and expansion size can be set based on the minimum distance between the global prior path and the surrounding environment and the robot's body width. For example, when using Euclidean distance: the obstacle avoidance space radius ≤ the minimum distance between the global prior path and the surrounding environment - 1 / 2 * body width. If using Manhattan distance: the obstacle avoidance space radius ≤ √2 * the obstacle avoidance space radius based on Euclidean distance. The avoidance distance can be set according to the size of the current space, with the expansion size ≥ 1 / 2 * body width of the robot. The avoidance distance can be set to 0.1m.
[0115] Clustered obstacles refer to the identification boxes formed by clustering the position points of each obstacle point cloud on the two-dimensional map using a clustering algorithm. They can be square or rectangular.
[0116] In an embodiment of the present invention, a processor within the robot responds to external input or the planned path and task parameters generated by its own path planning algorithm. It then uses a lidar to acquire lidar data from the current space and converts the planned path and obstacle point cloud data onto a two-dimensional map to determine the locations of the planned path and obstacle point cloud within the current space. After conversion to the two-dimensional map, a preset clustering algorithm is used to cluster the locations of the obstacle point cloud, resulting in multiple clustered obstacles. For each clustered obstacle, a corresponding obstacle avoidance space center point is selected.
[0117] It should be noted that the clustering algorithm can be the DBSCAN algorithm. Since the obstacle point cloud in the actual scene is usually irregular, its position scale converted to a two-dimensional map also presents an irregular shape. Therefore, in this embodiment of the present invention, the position scale of each obstacle point cloud can be restricted in the form of a square or rectangular frame.
[0118] Step 102: sorting each cluster obstacle according to the index of its projection point on the planned path, and then expanding the cluster obstacles to generate a plurality of expanded obstacles;
[0119] In this embodiment of the present invention, the planned path can be composed of multiple points. After all clustered obstacles are generated, the point closest to each cluster center (i.e., the cluster center) is found on the planned path as a projection point. The index of the projection point is the projection point index. After sorting the clustered obstacles from small to large according to the size of their projection point indexes, each clustered obstacle is expanded to generate multiple expanded obstacles.
[0120] It should be noted that the expanded obstacle refers to an identification frame generated by superimposing the coordinates of the clustered obstacles according to a certain expansion size.
[0121] Step 103: When there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, a merge judgment is performed and the center point of the obstacle avoidance space is updated to construct the obstacle avoidance space. The obstacle avoidance start point and obstacle avoidance end point are selected on the planned path.
[0122] In an embodiment of the present invention, after multiple expanded obstacles are generated, whether the expanded obstacles are blocking the road can be determined by the intersection of the expanded obstacles and the planned path; if the expanded obstacle intersects with the planned path, it is determined to be a blocking obstacle; if not, it is determined to be a non-blocking obstacle.
[0123] Therefore, when there is a blocking obstacle on the planned path, and there is another non-blocking obstacle before the first blocking obstacle, to save resources for subsequent path planning, an overlap check can be performed between the expansion boxes of the blocking obstacle and the non-blocking obstacle at the current moment to determine whether they overlap. If so, they are merged; if not, they are not merged. At the same time, after merging the blocking obstacle and the non-blocking obstacle, the center point of the obstacle avoidance space can be updated to construct the obstacle avoidance space corresponding to the current expanded obstacle. The obstacle avoidance start and end points can be selected based on the intersection of the obstacle avoidance space on the planned path.
[0124] It should be noted that the obstacle avoidance starting point refers to an index point on the planned path at the edge or inside of the obstacle avoidance space. This is the starting point for the robot to avoid obstacles. The obstacle avoidance ending point is the intersection point with the larger index value between the obstacle avoidance space and the planned path.
[0125] Step 104, determining multiple obstacle avoidance points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road;
[0126] After selecting the obstacle avoidance start and end points, the robot's specific movement path between them must be determined by first identifying the obstacle avoidance points. This can be done by adjusting the coordinates of the obstacle vertex corresponding to the first obstacle in the way and the avoidance distance within the mission parameters to determine the corresponding obstacle avoidance points.
[0127] Step 105, constructing a target obstacle avoidance path using the obstacle avoidance start point, a single or two obstacle avoidance passing points, and an obstacle avoidance end point and performing a pass check;
[0128] In an embodiment of the present invention, since there are four obstacle vertices, there are also four obstacle avoidance passing points when they are selected. At this time, in order to construct a specific obstacle avoidance path, we can start from the obstacle avoidance starting point and connect to the obstacle avoidance end point one by one through a single obstacle avoidance passing point. In combination with the path planning algorithm, four target obstacle avoidance paths are constructed, and a pass check is performed on each target obstacle avoidance path to determine whether the target obstacle avoidance path can bypass the blocking obstacle under the constraints of the obstacle avoidance space.
[0129] In step 106 , if the verification result shows that the obstacle avoidance path is passable, the target obstacle avoidance path is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point, a new planned path is generated, and the robot is moved according to the new planned path.
[0130] If the target obstacle avoidance path can avoid the obstacle within the constraints of the obstacle avoidance space, that is, if there is no intersection between the target obstacle avoidance path and the obstacle, the verification result is that the obstacle avoidance path is passable. The target obstacle avoidance path is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point to generate a new planned path, and the robot moves along the new planned path.
[0131] In an embodiment of the present invention, the processor in the robot responds to the planned path and task parameters, converts the obstacle point cloud obtained from the current space into a two-dimensional map for clustering, obtains multiple clustered obstacles, and selects the center point of the obstacle avoidance space corresponding to each clustered obstacle. After sorting each clustered obstacle according to the projection point index of each clustered obstacle on the planned path, each clustered obstacle is expanded to generate multiple expanded obstacles. When there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, a merging judgment is performed, and the blocking obstacle to be merged is merged. After merging obstacles and non-blocking obstacles, the center point of the obstacle avoidance space is updated and constructed. The obstacle avoidance start and end points are selected in the planned path. Multiple obstacle avoidance passage points are determined based on the mission parameters and the obstacle vertex corresponding to the first blocking obstacle. The target obstacle avoidance path is constructed using the obstacle avoidance start point, one or two obstacle avoidance passage points, and the obstacle avoidance end point. A pass check is performed. If the check result indicates that the obstacle avoidance path is passable, the target obstacle avoidance path is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point. A new planned path is generated, and the robot is moved along the new planned path. By combining the obstacle avoidance space with path planning, the robot's obstacle avoidance behavior is confined to a certain range, preventing uncontrolled movement in free scenes, confined spaces, or when high-precision equipment is present around the path. This improves the controllability of the robot's obstacle avoidance behavior and optimizes the obstacle avoidance effect.
[0132] See also Figure 2 , Figure 2 This is a flowchart of the steps of a robot path planning method provided in Example 2 of the present invention.
[0133] The present invention provides a robot path planning method, which is applied to a processor within the robot, and includes:
[0134] Step 201: In response to the planned path and mission parameters, the obstacle point cloud obtained from the current space is converted into a two-dimensional map for clustering, multiple clustered obstacles are obtained, and the center point of the obstacle avoidance space is selected;
[0135] Optionally, the task parameters include an obstacle avoidance mode flag; if the obstacle avoidance mode flag is an obstacle avoidance on flag, step 201 includes the following sub-steps:
[0136] In response to the planned path and mission parameters, the laser radar is called to obtain the laser point cloud in the current space;
[0137] Filter the initial obstacle point cloud and multiple index points contained in the planned path from the laser point cloud and convert them into a two-dimensional map;
[0138] Cluster the transformation information of the initial obstacle point cloud on the two-dimensional map to generate multiple clustered obstacles;
[0139] Calculate the center distance between the center point of each clustered obstacle and the nearest index point of the planned path;
[0140] The nearest index point whose center distance is less than or equal to the radius of the obstacle avoidance space is determined as the center point of the obstacle avoidance space corresponding to the clustered obstacle.
[0141] The planned path can be composed of a series of index points, which can be understood as a collection of index points, including the starting point, end point, and intermediate points. The index of the starting point is 0, and the index of the end point is the length of the collection minus 1. For example, under normal circumstances, a distance of one meter is marked by 100 points. Assuming that the starting point is (0,0) and the end point is (0,1), then the entire path of one meter is composed of path containers such as [(0,0), (0,0.01), (0,0.02), (0,0.03)...(0,0.99), (0,1)]. In other words, the subscript 0 is the starting point, >0 is the path passing point, and the last subscript is the end point. Loop through the entire path container to find the point closest to the obstacle center point. This point represents the projection point of the obstacle center point on the path. The index (subscript) of this point is the projection point index of the clustered obstacle.
[0142] In an embodiment of the present invention, when the processor in the robot receives the planned path and task parameters, it determines whether the robot is in obstacle avoidance mode by parsing the obstacle avoidance mode identifier in the task parameters.
[0143] If the obstacle avoidance mode is set to "on," the robot uses the lidar to obtain a laser point cloud of the robot's current space. The initial obstacle point cloud that matches the obstacle's characteristics, along with multiple index points included in the planned path, is then selected and converted to a two-dimensional map. DBSCAN clustering is performed on the converted information of each obstacle point cloud in the two-dimensional map to obtain multiple clustered obstacles. To reduce the number of obstacles considered by the subsequent obstacle avoidance algorithm, the center distance between the center point of each clustered obstacle and the nearest index point on the planned path is further calculated. The nearest index point whose center distance is less than or equal to the radius of the obstacle avoidance space is determined as the center point of the obstacle avoidance space corresponding to the clustered obstacle.
[0144] Furthermore, step 201 further includes the following sub-steps:
[0145] Remove clustered obstacles whose center distance is greater than the radius of the obstacle avoidance space from the two-dimensional map;
[0146] If the obstacle avoidance mode is marked as not enabled, the robot moves along the planned path.
[0147] When an obstacle is detected within a preset distance in front of the robot, the robot stops moving.
[0148] In this embodiment, after the nearest index point with a center distance less than or equal to the obstacle avoidance space radius is determined as the center point of the obstacle avoidance space corresponding to the clustered obstacle, in order to reduce the number of obstacles to be processed by the subsequent obstacle avoidance algorithm, since the center distance is greater than the obstacle avoidance space radius, it indicates that the robot will not interact with the obstacle on the original planned path. At this time, the clustered obstacles with a center distance greater than the obstacle avoidance space radius can be further deleted from the two-dimensional map.
[0149] In addition, if the obstacle avoidance mode is marked as obstacle avoidance not turned on, it means that the robot does not need to turn on the obstacle avoidance mode. At this time, it can move according to the original planned path. When the robot detects an obstacle within a preset distance in front of the robot, the robot stops moving.
[0150] In another example of the present invention, before executing step 201, the method further includes the following steps:
[0151] Obtain a two-dimensional map, a moving start point and a moving end point, and connect the moving start point and the moving end point on the two-dimensional map to construct an initial straight line path;
[0152] Add two control points on the initial straight path; where there are no obstacles at the locations of the control points;
[0153] The preset third-order Bezier curve equation is used to interpolate according to the preset number of interpolation points to generate a planned path.
[0154] In the specific implementation, the planned path can be pre-constructed by the robot after performing a lidar scan of the current space. By obtaining a two-dimensional map, the moving starting point (x1, y1) and the moving end point (x2, y2), and connecting the moving starting point and the moving end point on the two-dimensional map, the initial straight line path is constructed using the following equation:
[0155]
[0156] Then, two control points that are not located at obstacle locations are added to the initial execution path through interpolation. A preset number of interpolation points is used, for example, 100 points per meter for a straight line and 1,000 points per meter for a curve, to ensure path point density. Interpolation is performed using the third-order Bezier curve equation to generate the planned path P(t).
[0157] Among them, the third-order Bezier curve equation is as follows:
[0158] P(t)=A·(1-t) 3 +B·3(1-t) 2 t+C·3(1-t)t2 +D·t 3
[0159] Among them, A is the starting point of movement, B is the first control point, C is the second control point, D is the end point of movement, t is the time, t∈(0,1).
[0160] Step 202: sorting each cluster obstacle according to the index of its projection point on the planned path, and then expanding the cluster obstacles to generate a plurality of expanded obstacles;
[0161] In one example of the present invention, step 202 may include the following sub-steps:
[0162] Sort each cluster obstacle according to its projection point index on the planned path from small to large to obtain a cluster obstacle sequence;
[0163] Calculate the multiplication value between the width of the robot and the preset scale parameter to obtain the expansion size;
[0164] Each cluster obstacle in the cluster obstacle sequence is expanded according to the expansion size to generate multiple expanded obstacles.
[0165] In this embodiment, the point closest to the center of a clustered obstacle on the planned path is found as the projection point of the clustered obstacle, and its index is used as the projection point index. After clustering multiple clustered obstacles, they can be sorted from smallest to largest according to their projection point index on the planned path to obtain a clustered obstacle sequence.
[0166] At the same time, the width of the robot can be measured, and the multiplication value between the width and the preset scale parameter can be calculated to obtain the expansion size. Then, each clustered obstacle in the clustered obstacle sequence is expanded according to the expansion size to generate multiple expanded obstacles. The specific expansion process can be as follows:
[0167] like Figure 3 As shown, the cluster obstacles are represented by (x max ,x min ,y max ,y min ) indicates that the expansion size is k, and after expansion it becomes (x max +k,x min -k,y max +k,y min -k).
[0168] Optionally, the method further comprises the following steps S11-S17:
[0169] S11. When there is a blocking obstacle on the planned path and there is no non-blocking obstacle before the first blocking obstacle, an obstacle avoidance space is constructed with the center point of the obstacle avoidance space as the center of the circle and the radius of the obstacle avoidance space.
[0170] In another example of the present invention, after multiple expanded obstacles are generated, whether the expanded obstacles are blocking the road can be determined by the intersection of the expanded obstacles and the planned path; if the expanded obstacles intersect with the planned path, it is determined to be a blocking obstacle; if they do not intersect, it is determined to be a non-blocking obstacle.
[0171] When there are obstacles on the planned path and there are no non-blocking obstacles before the first obstacle, the obstacle avoidance space can be constructed with the obstacle avoidance space radius as the center point of the circle. Figure 4 As shown in the figure, Q is the center point of the clustered obstacles, O is the center point of the obstacle avoidance space, IN is the starting point of obstacle avoidance, and OUT is the ending point of obstacle avoidance.
[0172] S12: Selecting the intersection point of the obstacle avoidance space and the planned path as a first candidate point and obtaining a first initial index value corresponding to the first candidate point;
[0173] S13, determining the first candidate point to which the largest first initial index value belongs as the obstacle avoidance end point;
[0174] S14, determining the first candidate point to which the smallest first initial index value belongs as the first initial starting point;
[0175] Since the planned path is composed of multiple points, each point between the moving start point and the moving end point is set with a corresponding index value. Therefore, after constructing the obstacle avoidance space, the intersection point of the obstacle avoidance space and the planned path can be selected as the first candidate point, and the first initial index value of the first candidate point on the planned path can be obtained. Since the index values of the planned path are sorted from small to large, the first candidate point with the largest first initial index value can be determined as the obstacle avoidance end point.
[0176] However, since the obstacle avoidance space is a constraint on the robot's target obstacle avoidance path, the robot's movement will not stop due to the existence of the obstacle avoidance space. Therefore, its obstacle avoidance starting point is not necessarily the intersection of the obstacle avoidance space and the planned path. Therefore, the first candidate point with the smallest first initial index value can be determined as the first initial starting point, waiting for the subsequent update of the obstacle avoidance starting point.
[0177] S15. Obtain the first self-index value corresponding to the current position of the robot on the planned path;
[0178] S16, selecting a point corresponding to the maximum value between the first initial index value corresponding to the first initial starting point and the first self index value as the obstacle avoidance starting point;
[0179] S17: Jump to the step of determining multiple obstacle avoidance points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road.
[0180] In this embodiment, while determining the first initial starting point, the first self-index value of the robot's current position on the planned path can also be obtained, and the first initial index value and the first self-index value corresponding to the first initial starting point are compared to select the point corresponding to the maximum value between the two as the obstacle avoidance starting point, and then jump to execute step 209 to determine the obstacle avoidance passing point.
[0181] Step 203: When there are road-blocking obstacles on the planned path and there is a non-road-blocking obstacle before the first road-blocking obstacle, it is determined whether the first road-blocking obstacle and the non-road-blocking obstacle overlap;
[0182] Step 204: If there is overlap, the frame size extreme values of the first road-blocking obstacle and the non-road-blocking obstacle are used to construct an updated road-blocking obstacle;
[0183] In an embodiment of the present invention, when there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, it indicates that the non-blocking obstacle may affect the planning of the target obstacle avoidance path. It is further determined whether the first blocking obstacle and the non-blocking obstacle overlap. If overlap occurs, the frame size extreme value between the first blocking obstacle and the non-blocking obstacle is used to construct an updated blocking obstacle.
[0184] See also Figure 5 , the process of updating the generation of obstacles can be as follows:
[0185] If the obstacle 1(x max1 ,x min1 ,y max1 ,y max1 ), non-blocking obstacles 2(x max2 ,x min2 ,y max2 ,y max2 ).
[0186] When it is determined that there is overlap, for example, two expansion obstacles have common points / common edges / intersections, the updated obstacle can be (Max(x max1 ,x max2 ),Min(x min1 ,x min2 ),Max(y max1 ,y max2 ),Min(y min1 ,y min2 )).
[0187] In an optional embodiment of the present invention, the initially planned path is A. If no non-blocking obstacles are detected before blocking obstacle 1, obstacle avoidance path B is directly generated and the planned path is updated. During the path planning iteration, if non-blocking obstacle 1 is detected before the next blocking obstacle 2, and the two obstacles overlap, they are merged into a larger obstacle, and obstacle avoidance path C is generated based on the larger obstacle.
[0188] Step 205: The index point on the planned path closest to the center point of the updated obstacle is used as the new center point of the obstacle avoidance space;
[0189] After the updated obstacle is generated, the center point of the obstacle avoidance space is offset due to its merging action. At this time, the index point closest to the center point of the updated obstacle can be found on the planned path and used as the new center point of the obstacle avoidance space.
[0190] Step 206: construct an obstacle avoidance space with the new obstacle avoidance space center point as the circle center and in combination with the mission parameters, and select the obstacle avoidance end point and temporary start point;
[0191] Optionally, step 206 may include the following sub-steps:
[0192] Construct the obstacle avoidance space with the new obstacle avoidance space center point as the circle center and combine the mission parameters;
[0193] Selecting the intersection point of the obstacle avoidance space and the planned path as the second candidate point and obtaining a second initial index value corresponding to the second candidate point;
[0194] The candidate point to which the largest second initial index value belongs is determined as the obstacle avoidance end point;
[0195] Determine the selected point to which the smallest second initial index value belongs as the second initial starting point;
[0196] Get the second self-index value corresponding to the robot's current position on the planned path;
[0197] A point corresponding to the maximum value between the second initial index value corresponding to the second initial starting point and the second self index value is selected as the temporary starting point.
[0198] In this embodiment, the obstacle avoidance space is constructed with the center point of the new obstacle avoidance space as the center of the circle and in combination with the task parameters. The specific process can be seen in step S11 and will not be repeated here. After the obstacle avoidance space is constructed, the intersection point of the obstacle avoidance space and the planned path can be further selected as the second candidate point and the second initial index value corresponding to the second candidate point can be obtained. The candidate point with the largest second initial index value is determined as the obstacle avoidance end point, and the candidate point with the smallest second initial index value is determined as the second initial starting point. The second self-index value corresponding to the point where the robot is currently located on the planned path is obtained, and the point corresponding to the maximum value between the second initial index value and the second self-index value corresponding to the second initial starting point is selected as the temporary starting point.
[0199] It should be noted that the temporary starting point refers to a temporarily selected obstacle avoidance starting point that still needs to be updated later.
[0200] Step 207: If there is no updated non-blocking obstacle before the updated blocking obstacle, the temporary starting point is determined as the obstacle avoidance starting point;
[0201] Step 208: If an updated non-blocking obstacle exists and does not overlap with the updated blocking obstacle, determine the obstacle avoidance start point based on the updated non-blocking obstacle and the updated blocking obstacle in combination with the temporary start point.
[0202] Optionally, step 208 may include the following sub-steps S21-S26:
[0203] S21. If the updated non-blocking obstacle does not overlap with the updated blocking obstacle, determine whether the path index value corresponding to the updated non-blocking obstacle is greater than the path index value corresponding to the temporary starting point.
[0204] S22: If not, the temporary starting point is determined as the obstacle avoidance starting point;
[0205] See also Figure 6 If the updated non-blocking obstacle does not overlap with the updated blocking obstacle, and the path index value corresponding to the updated non-blocking obstacle is less than or equal to the path index value corresponding to the temporary starting point, the temporary starting point IN1 can be directly determined as the obstacle avoidance starting point.
[0206] S23: If yes, obtain and update the minimum path index values of the four vertices of the road-blocking obstacles on the planned path and the maximum path index values of the four vertices corresponding to the non-road-blocking obstacles on the planned path respectively;
[0207] S24, determining whether the minimum path index value is greater than the maximum path index value;
[0208] S25. If yes, then determine the corresponding point of the maximum path index value on the planned path as the obstacle avoidance starting point;
[0209] See also Figure 7 If the path index value corresponding to the updated non-blocking obstacle is greater than the path index value corresponding to the temporary starting point, the minimum path index value of the four vertices of the updated blocking obstacle on the planned path and the maximum path index value of the four vertices corresponding to the updated non-blocking obstacle on the planned path can be further obtained. If the minimum path index value is greater than the maximum path index value, the corresponding point IN2 of the maximum path index value on the planned path is determined as the obstacle avoidance starting point.
[0210] S26: If not, the corresponding point of the updated path index value corresponding to the non-blocking obstacle on the planned path is determined as the obstacle avoidance starting point.
[0211] See also Figure 8 If the minimum path index value is not greater than the maximum path index value, the path index value of the center point of the non-blocking obstacle on the planned path is updated, and its corresponding point IN3 on the planned path is determined as the starting point for obstacle avoidance.
[0212] Optionally, the method further comprises:
[0213] If there is an updated non-blocking obstacle and it overlaps with the updated blocking obstacle, the updated non-blocking obstacle will be used as the new non-blocking obstacle, and the updated blocking obstacle will be used as the new blocking obstacle;
[0214] Jump to the execution and use the frame size extremes of the first blocking obstacle and non-blocking obstacle to construct the steps of updating the blocking obstacle.
[0215] In one example of the present invention, after the updated non-road-blocking obstacle is merged with the updated road-blocking obstacle, there may still be a new non-road-blocking obstacle overlapping with it. In this case, the updated non-road-blocking obstacle can be used as a new non-road-blocking obstacle, and the updated road-blocking obstacle can be used as a new road-blocking obstacle, and step 204 can be skipped to execute until there are no overlapping non-road-blocking obstacles.
[0216] Furthermore, the method further comprises:
[0217] If the first road-blocking obstacle and the non-road-blocking obstacle do not overlap, the first road-blocking obstacle is used as the updated road-blocking obstacle, and the non-road-blocking obstacle is used as the updated non-road-blocking obstacle;
[0218] Jump to the steps to build the obstacle avoidance space with the new obstacle avoidance space center as the circle center and combine the task parameters, and select the obstacle avoidance end point and temporary start point.
[0219] In an embodiment of the present invention, if the first blocking obstacle and the non-blocking obstacle do not overlap, the blocking obstacle is used as the updated blocking obstacle, and the non-blocking obstacle is used as the updated non-blocking obstacle, and the process jumps to step 206 to directly construct an obstacle avoidance space for selecting the obstacle avoidance end point and the temporary starting point.
[0220] Step 209: determining a plurality of obstacle avoidance passing points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road;
[0221] In one example of the present invention, step 209 may include the following sub-steps:
[0222] Extract the avoidance distance from the task parameters;
[0223] The coordinates of the obstacle vertex corresponding to the first obstacle in the way are adjusted using the avoidance distance to generate multiple obstacle avoidance points.
[0224] In an embodiment of the present invention, the task parameters may carry an avoidance distance. After determining the obstacle avoidance start point and the obstacle avoidance end point, the avoidance distance may be extracted from the task parameters, and the coordinates of each obstacle vertex corresponding to the first obstacle blocking the road may be adjusted using the avoidance distance to obtain new coordinates as the obstacle avoidance passing point.
[0225] See also Figure 9 , the process of adjusting the coordinates of the obstacle vertices can be as follows:
[0226] For example, the coordinates of the obstacle vertex are (Max(x max1 ,x max2 ),Min(x min1 ,x min2 ),Max(y max1 ,y max2 ),Min(y min1 ,y min2 )), the avoidance distance is l. Taking the coordinates of the obstacle vertex in the lower right corner as an example, the adjusted obstacle avoidance passing point is ((Max(x max1 ,x max2 )+l,Min(y min1 ,y min2 )-l).
[0227] Step 210, constructing a target obstacle avoidance path using the obstacle avoidance start point, a single or two obstacle avoidance passing points, and an obstacle avoidance end point and performing a pass check;
[0228] Optionally, step 210 may include the following sub-steps:
[0229] Taking the obstacle avoidance start point as the starting point and the obstacle avoidance end point as the end point, a single obstacle avoidance passing point is selected as the intermediate point, and the preset path planning algorithm is called to construct multiple obstacle avoidance paths;
[0230] Determine whether each obstacle avoidance path intersects with the obstacles in the way;
[0231] If any obstacle avoidance path does not intersect with the obstacle, the obstacle avoidance path is determined to be passable and is determined as the target obstacle avoidance path;
[0232] If there are multiple obstacle avoidance paths that do not intersect with the obstacles, the obstacle avoidance path is determined to be passable, and the obstacle avoidance path with the shortest path length is selected as the target obstacle avoidance path;
[0233] If all obstacle avoidance paths intersect with the obstacles, two adjacent obstacle avoidance passing points are selected as intermediate points to construct multiple new obstacle avoidance paths, and the process jumps to the step of determining whether each obstacle avoidance path intersects with the obstacles. This process continues until all obstacle avoidance paths intersect with the obstacles again, and the obstacle avoidance path is determined to be impassable.
[0234] In an embodiment of the present invention, the obstacle avoidance starting point can be used as the starting point, the obstacle avoidance ending point can be used as the end point, a single obstacle avoidance passing point can be selected as the middle point, and a preset path planning algorithm can be called to construct multiple obstacle avoidance paths. That is, the obstacle avoidance starting point is selected as the starting point of the obstacle avoidance path, the obstacle avoidance ending point is used as the middle point of the obstacle avoidance path, and the middle point is constructed by exhaustively enumerating a single obstacle avoidance passing point, and a preset path planning algorithm is called to construct multiple obstacle avoidance paths. It is determined whether each obstacle avoidance path intersects with the obstacle in the way; if there is only one obstacle avoidance path that does not intersect with the obstacle in the way, then the obstacle avoidance path is determined to be passable, and the obstacle avoidance path is determined to be the target obstacle avoidance path; if there are multiple obstacle avoidance paths that do not intersect with the obstacle in the way, then the obstacle avoidance path is determined to be passable, and the obstacle avoidance path with the shortest path length is selected as the target obstacle avoidance path.
[0235] See also Figure 10 , Figure 10 A schematic diagram of constructing an obstacle avoidance path by selecting a single obstacle avoidance point as the intermediate point.
[0236] In this embodiment, the obstacle avoidance start point is taken as the starting point, the obstacle avoidance end point is taken as the end point, a single obstacle avoidance passing point is selected as the intermediate point, and the preset path planning algorithm is called to construct multiple obstacle avoidance paths ABCD, where the obstacle avoidance path C will not intersect with the obstacles blocking the road. At this time, it can be used as the target obstacle avoidance path.
[0237] In a specific implementation, there may also be a situation where the obstacle avoidance paths passing through a single obstacle avoidance point intersect with obstacles in the way, such as Figure 11 shown.
[0238] In one example of the present invention, if all obstacle avoidance paths intersect with obstacles, it means that the obstacle avoidance path constructed by a single obstacle avoidance point is impassable. In this case, multiple new obstacle avoidance paths ABCD can be constructed by further exhaustively enumerating the combination of two adjacent obstacle avoidance points as intermediate points, such as Figure 12 If none of them intersect with obstacles, it means that any obstacle avoidance path is passable. In this case, the obstacle avoidance path with the shortest path length can be selected as the target obstacle avoidance path.
[0239] Then jump to the step of determining whether each obstacle avoidance path intersects with the blocking obstacle, and again determine whether the new obstacle avoidance path is passable. If it is again determined that each obstacle avoidance path intersects with the blocking obstacle, it is determined that the robot cannot avoid the obstacle and the obstacle avoidance path is impassable.
[0240] Furthermore, the method further comprises the following steps:
[0241] If the verification result shows that the obstacle avoidance path is impassable, the robot will move according to the planned path;
[0242] When an obstacle is detected within a preset distance in front of the robot, the robot stops moving.
[0243] In step 211 , if the verification result shows that the obstacle avoidance path is passable, the target obstacle avoidance path is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point, a new planned path is generated, and the robot is moved according to the new planned path.
[0244] In this embodiment, if the verification result shows that the obstacle avoidance path is passable, the target obstacle avoidance path can be used to replace the part of the planned path from the obstacle avoidance start point to the obstacle avoidance end point, thereby generating a new planned path, and the robot moves according to the new planned path.
[0245] Optionally, after executing step 211, the method may further include the following steps:
[0246] The obstacle point cloud obtained from the current space is converted into a two-dimensional map for clustering, multiple clustered obstacles are obtained, and the center point of the obstacle avoidance space is selected until the robot moves to the end point.
[0247] In this embodiment, after executing step 211 to move the robot, you can also jump to execute step 201, obtain the obstacle point cloud in the current space again, and update the position of the first obstacle blocking the way until the robot moves to the end point of the movement, thereby completing the movement of the robot.
[0248] See also Figure 13 , Figure 13 The figure shows an overall flow chart of a robot path planning method in an optional embodiment of the present invention.
[0249] In this embodiment, the task parameters and planned path are received, and it is determined whether there is an obstacle avoidance on flag to determine whether obstacle avoidance is turned on. If not, obstacle avoidance is not used and the vehicle drives along the path. If an obstacle is encountered, the vehicle stops in front of the obstacle. If so, the lidar data is received, the data is filtered, and the point information scanned by the radar is converted to a map. DBSCAN is used for clustering and obstacles are divided. It is determined whether the distance between the center point of the obstacle and the planned path is greater than the radius of the obstacle avoidance space. If so, the obstacle is not considered. If not, the point closest to the center of the obstacle is found on the path. The projection point of the obstacle on the driving path is found, and the point closest to the center of the obstacle on the global path is found as the projection point of the obstacle on the global path and the center point of the obstacle avoidance space for avoiding the obstacle; the obstacles are sorted according to the size of the projection point index, and the obstacles are expanded and judged whether they are blocking the road. The first obstacle blocking the road is analyzed to determine whether there is an obstacle in front of it that is not blocking the road; if there is, determine whether the two obstacle areas overlap. If so, merge the two to form a large obstacle. If not or there is no obstacle that is not blocking the road, then according to the obstacle avoidance space of the blocking obstacle, The obstacle avoidance space is formed by the center point of the obstacle avoidance space, and the obstacle avoidance space entry point and obstacle avoidance end point are determined by the obstacle avoidance space generated by the projection point of the driving path; the obstacle avoidance start point is selected according to the obstacle avoidance space entry point, the robot's position point, and the information of the obstacle before the obstacle that is not blocking the road; each vertex of the obstacle is exhaustively selected (a total of four), and the obstacle avoidance path passing point is determined according to the obstacle avoidance distance, and the obstacle avoidance path is generated according to the obstacle avoidance start point, passing point, and end point; it is judged whether a valid path is generated. If so, the original path is truncated from the obstacle avoidance start point to the obstacle avoidance end point and replaced with the generated obstacle avoidance path; otherwise, exhaustively select each vertex of the obstacle (a total of four), and determine the obstacle avoidance path passing point according to the obstacle avoidance distance, and generate the obstacle avoidance path according to the obstacle avoidance start point, passing point, and end point. Select every two vertices of the obstacle (a total of four groups, diagonal ones are not selected), determine the points and order of the obstacle avoidance path based on the obstacle avoidance distance parameter and the distance from the starting point, and then determine again whether a valid path is generated; if so, truncate the original path from the obstacle avoidance start point to the obstacle avoidance end point and replace it with the generated obstacle avoidance path; otherwise, it is determined that the obstacle cannot be circumvented, the path does not change, and stops before the obstacle; after replacing it with the generated obstacle avoidance path, enable obstacle avoidance according to the updated path; continue to iterate and receive lidar data again, perform data screening, and convert the point information scanned by the radar to the map.
[0250] See also Figure 14 , Figure 14 A flow chart of the obstacle avoidance starting point selection steps in an embodiment of the present invention is shown.
[0251] In this embodiment, the obstacle avoidance starting point, the robot's own index point on the path and all obstacle information are determined, and the corresponding point of the larger value of the initial index of the obstacle avoidance starting point and the robot's own index is selected as the temporary starting point. It is determined whether there is a non-blocking obstacle before the first blocking obstacle. If not, the temporary starting point is determined as the obstacle avoidance starting point; if so, it is determined whether the path index of the non-blocking obstacle is greater than the path index of the temporary starting point; if not, the temporary starting point is determined as the obstacle avoidance starting point; if greater, the minimum path index value of the four corners of the blocking obstacle and the maximum path index value of the four corners of the non-blocking obstacle are calculated according to the obstacle information, and it is determined whether the minimum path index value is greater than the maximum path index value. If so, the point corresponding to the maximum path index value is determined as the obstacle avoidance starting point; if not, the point corresponding to the index of the non-blocking obstacle is determined as the obstacle avoidance starting point.
[0252] In an embodiment of the present invention, a processor within the robot responds to a planned path and task parameters, converts an obstacle point cloud obtained from the current space into a two-dimensional map for clustering, and obtains a plurality of clustered obstacles. After sorting each clustered obstacle according to its projection point index on the planned path, each clustered obstacle is expanded to generate a plurality of expanded obstacles. When a blocking obstacle exists on the planned path and a non-blocking obstacle exists before the first blocking obstacle, a merging judgment is performed. After merging the blocking obstacle and the non-blocking obstacle to be merged, a center point of an obstacle avoidance space is selected to construct the obstacle avoidance space. An obstacle avoidance start point and an obstacle avoidance end point are selected on the planned path, and a plurality of obstacle avoidance passing points are determined based on the task parameters and the obstacle vertex corresponding to the first blocking obstacle. The obstacle avoidance start point, a single or two obstacle avoidance passing points, and an obstacle avoidance end point are used to construct a target obstacle avoidance path, and a pass check is performed. If the check result shows that the obstacle avoidance path is passable, the target obstacle avoidance path is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point, and a new planned path is generated. The robot is moved along the new planned path. By combining obstacle avoidance space with path planning, the robot's obstacle avoidance behavior is limited to a certain range, so that it will not move uncontrollably regardless of whether it is in a free scene, a narrow space, or when there are high-precision equipment around the path, thereby improving the controllability of the robot's obstacle avoidance behavior and optimizing the obstacle avoidance effect.
[0253] See also Figure 15 , Figure 15 This is a structural block diagram of a robot path planning device provided in Example 3 of the present invention.
[0254] An embodiment of the present invention provides a robot path planning device, which is applied to a processor within the robot, and includes:
[0255] The data clustering module 301 is used to convert the obstacle point cloud obtained from the current space into a two-dimensional map in response to the planned path and task parameters, to cluster the obstacles, obtain multiple clustered obstacles, and select the center point of the obstacle avoidance space;
[0256] The obstacle expansion module 302 is configured to sort the clustered obstacles according to the projection point index of the center point of each obstacle avoidance space on the planned path, and then expand the clustered obstacles to generate a plurality of expanded obstacles;
[0257] The first starting and ending point selection module 303 is used to merge and determine the obstacle avoidance space when there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, and to update the obstacle avoidance space center point to construct the obstacle avoidance space, and select the obstacle avoidance start point and obstacle avoidance end point on the planned path;
[0258] The obstacle avoidance passing point determination module 304 is used to determine multiple obstacle avoidance passing points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road;
[0259] A pass verification module 305 is used to construct a target obstacle avoidance path using an obstacle avoidance start point, a single or two obstacle avoidance passing points, and an obstacle avoidance end point and perform a pass verification;
[0260] The planned path update module 306 is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point with the target obstacle avoidance path if the obstacle avoidance path verification result is passable, generate a new planned path and move the robot according to the new planned path.
[0261] Optionally, the task parameters include an obstacle avoidance mode flag and an obstacle avoidance space radius; if the obstacle avoidance mode flag is an obstacle avoidance on flag, the data clustering module 301 is configured to:
[0262] In response to the planned path and mission parameters, the laser radar is called to obtain the laser point cloud in the current space;
[0263] Filter the initial obstacle point cloud and multiple index points contained in the planned path from the laser point cloud and convert them into a two-dimensional map;
[0264] Cluster the transformation information of the initial obstacle point cloud on the two-dimensional map to generate multiple clustered obstacles;
[0265] Calculate the center distance between the center point of each clustered obstacle and the nearest index point of the planned path;
[0266] The nearest index point whose center distance is less than or equal to the radius of the obstacle avoidance space is determined as the center point of the obstacle avoidance space corresponding to the clustered obstacle.
[0267] Optionally, the data clustering module 301 is further configured to:
[0268] Remove clustered obstacles whose center distance is greater than the radius of the obstacle avoidance space from the two-dimensional map;
[0269] If the obstacle avoidance mode is marked as not enabled, the robot moves along the planned path.
[0270] When an obstacle is detected within a preset distance in front of the robot, the robot stops moving.
[0271] Optionally, the obstacle expansion module 302 is specifically configured to:
[0272] Sort each cluster obstacle according to its projection point index on the planned path from small to large to obtain a cluster obstacle sequence;
[0273] Calculate the multiplication value between the width of the robot and the preset scale parameter to obtain the expansion size;
[0274] Each cluster obstacle in the cluster obstacle sequence is expanded according to the expansion size to generate multiple expanded obstacles.
[0275] Optionally, the device further includes a second starting and ending point selection module, and the second starting and ending point selection module is specifically configured to:
[0276] When there are obstacles on the planned path and there are no non-blocking obstacles before the first obstacle, an obstacle avoidance space is constructed with the center point of the obstacle avoidance space as the center and the radius of the obstacle avoidance space as the radius.
[0277] Selecting the intersection point of the obstacle avoidance space and the planned path as the first candidate point and obtaining a first initial index value corresponding to the first candidate point;
[0278] Determine the first candidate point to which the largest first initial index value belongs as the obstacle avoidance end point;
[0279] Determine the first candidate point to which the smallest first initial index value belongs as the first initial starting point;
[0280] Get the first self-index value corresponding to the robot's current position on the planned path;
[0281] Selecting the point corresponding to the maximum value between the first initial index value corresponding to the first initial starting point and the first self-index value as the obstacle avoidance starting point;
[0282] Jump to the step of determining multiple obstacle avoidance points based on the task parameters and the obstacle vertex corresponding to the first obstacle in the way.
[0283] Optionally, the first starting and ending point selection module 303 includes:
[0284] The overlap judgment submodule is used to judge whether there is an obstacle on the planned path and a non-blocking obstacle exists before the first obstacle, and whether the first obstacle overlaps with the non-blocking obstacle;
[0285] The obstacle merging submodule is used to adopt the frame size extreme value of the first blocking obstacle and the non-blocking obstacle to construct and update the blocking obstacle if there is overlap;
[0286] The obstacle avoidance space center point update submodule is used to take the index point on the planned path closest to the center point of the updated obstacle as the new obstacle avoidance space center point;
[0287] The temporary start and end point selection submodule is used to construct the obstacle avoidance space with the new obstacle avoidance space center as the circle center and combine the mission parameters, and select the obstacle avoidance end point and temporary start point;
[0288] A first obstacle avoidance starting point determination submodule is configured to determine a temporary starting point as an obstacle avoidance starting point if no non-blocking obstacle is updated before the blocking obstacle is updated;
[0289] The second obstacle avoidance starting point determination submodule is used to determine the obstacle avoidance starting point according to the updated non-blocking obstacle and the updated blocking obstacle in combination with the temporary starting point if there is an updated non-blocking obstacle and does not overlap with the updated blocking obstacle.
[0290] Optionally, the first starting and ending point selection module 303 is further configured to
[0291] If there is an updated non-blocking obstacle and it overlaps with the updated blocking obstacle, the updated non-blocking obstacle will be used as the new non-blocking obstacle, and the updated blocking obstacle will be used as the new blocking obstacle;
[0292] Jump to the execution and use the frame size extremes of the first blocking obstacle and non-blocking obstacle to construct the steps of updating the blocking obstacle.
[0293] Optionally, the obstacle avoidance space center point update submodule is specifically used to:
[0294] Construct the obstacle avoidance space with the new obstacle avoidance space center point as the circle center and combine the mission parameters;
[0295] Selecting the intersection point of the obstacle avoidance space and the planned path as the second candidate point and obtaining a second initial index value corresponding to the second candidate point;
[0296] The candidate point to which the largest second initial index value belongs is determined as the obstacle avoidance end point;
[0297] Determine the selected point to which the smallest second initial index value belongs as the second initial starting point;
[0298] Get the second self-index value corresponding to the robot's current position on the planned path;
[0299] A point corresponding to the maximum value between the second initial index value corresponding to the second initial starting point and the second self index value is selected as the temporary starting point.
[0300] Optionally, the second obstacle avoidance starting point determination submodule is specifically used to: if the non-blocking obstacle is updated and does not overlap with the updated blocking obstacle, determine whether the path index value corresponding to the updated non-blocking obstacle is greater than the path index value corresponding to the temporary starting point; if not, determine the temporary starting point as the obstacle avoidance starting point; if so, respectively obtain the minimum path index value of the four vertices of the updated blocking obstacle on the planned path and the maximum path index value of the four vertices corresponding to the updated non-blocking obstacle on the planned path; determine whether the minimum path index value is greater than the maximum path index value; if so, determine the corresponding point of the maximum path index value on the planned path as the obstacle avoidance starting point; if not, determine the corresponding point of the path index value corresponding to the updated non-blocking obstacle on the planned path as the obstacle avoidance starting point.
[0301] Optionally, the first starting and ending point selection module 303 also includes: a first obstacle updating submodule, which is used to use the first blocking obstacle as the updated blocking obstacle and the non-blocking obstacle as the updated non-blocking obstacle if there is no overlap between the first blocking obstacle and the non-blocking obstacle; a jumping submodule, which is used to jump to the steps of constructing an obstacle avoidance space with the new obstacle avoidance space center point as the center of the circle combined with the task parameters, and selecting the obstacle avoidance end point and the temporary starting point.
[0302] Optionally, the obstacle avoidance point determination module 304 is specifically used to: extract the avoidance distance from the task parameters; use the avoidance distance to adjust the coordinates of the obstacle vertex corresponding to the first obstacle blocking the road to generate multiple obstacle avoidance points.
[0303] Optionally, the pass verification module 305 is specifically used to: take the obstacle avoidance starting point as the starting point and the obstacle avoidance ending point as the end point, select a single obstacle avoidance passing point as the intermediate point, and call the preset path planning algorithm to construct multiple obstacle avoidance paths; determine whether each obstacle avoidance path intersects with the blocking obstacle; if there is any obstacle avoidance path that does not intersect with the blocking obstacle, then the obstacle avoidance path is determined to be passable, and the obstacle avoidance path is determined to be the target obstacle avoidance path; if there are multiple obstacle avoidance paths that do not intersect with the blocking obstacle, then the obstacle avoidance path is determined to be passable, and the obstacle avoidance path with the shortest path length is selected as the target obstacle avoidance path; if each obstacle avoidance path intersects with the blocking obstacle, then two adjacent obstacle avoidance passing points are selected as intermediate points to construct multiple new obstacle avoidance paths, and jump to execute the step of determining whether each obstacle avoidance path intersects with the blocking obstacle, until each obstacle avoidance path intersects with the blocking obstacle again, then the obstacle avoidance path is determined to be impassable.
[0304] Optionally, the pass verification module 305 is further specifically used to: if the verification result shows that the obstacle avoidance path is impassable, move the robot according to the planned path; when an obstacle is detected within a preset distance in front of the robot, stop the movement of the robot.
[0305] Optionally, the device also includes: an initial quantity acquisition module, used to obtain a two-dimensional map, a moving starting point and a moving end point, and connect the moving starting point and the moving end point on the two-dimensional map to construct an initial straight line path; a control point addition module, used to add two control points to the initial straight line path; wherein there are no obstacles at the positions of the control points; a planned path generation module, used to interpolate according to a preset number of interpolation points using a preset third-order Bezier curve equation to generate a planned path.
[0306] Optionally, the device also includes: an iterative update module, which is used to jump to the step of converting the obstacle point cloud obtained from the current space into a two-dimensional map for clustering, obtaining multiple clustered obstacles and selecting the center point of the obstacle avoidance space until the robot moves to the moving end point.
[0307] An embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the robot path planning method as described in any embodiment of the present invention.
[0308] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed, the robot path planning method as described in any embodiment of the present invention is implemented.
[0309] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and sub-modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0310] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0311] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0312] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0313] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0314] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robot path planning method, characterized in that: Applied to a processor in a robot, the method includes: In response to the planned path and mission parameters, the obstacle point cloud obtained from the current space is converted into a two-dimensional map for clustering, multiple clustered obstacles are obtained, and the center point of the obstacle avoidance space is selected; After sorting the clustered obstacles according to the projection point index of the center point of each obstacle avoidance space on the planned path, expanding the clustered obstacles to generate a plurality of expanded obstacles; When there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, a merge judgment is performed and the center point of the obstacle avoidance space is updated to construct an obstacle avoidance space, and an obstacle avoidance start point and obstacle avoidance end point are selected on the planned path; Determining a plurality of obstacle avoidance passing points according to the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road; Constructing a target obstacle avoidance path using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point and performing a pass check; If the verification result shows that the obstacle avoidance path is passable, the target obstacle avoidance path is used to replace the planned path from the obstacle avoidance starting point to the obstacle avoidance ending point, a new planned path is generated, and the robot is moved according to the new planned path.
2. The robot path planning method according to claim 1, characterized in that: The task parameters include an obstacle avoidance mode identifier and an obstacle avoidance space radius; if the obstacle avoidance mode identifier is an obstacle avoidance on identifier, the steps of converting the obstacle point cloud obtained from the current space into a two-dimensional map for clustering, obtaining multiple clustered obstacles, and selecting the center point of the obstacle avoidance space include: In response to the planned path and mission parameters, the laser radar is called to obtain the laser point cloud in the current space; Filtering an initial obstacle point cloud and a plurality of index points included in the planned path from the laser point cloud, and converting them into a two-dimensional map; Clustering the conversion information of the initial obstacle point cloud on the two-dimensional map to generate a plurality of clustered obstacles; Calculating the center distance between the center point of each clustered obstacle and the nearest index point of the planned path; The nearest index point whose center distance is less than or equal to the radius of the obstacle avoidance space is determined as the center point of the obstacle avoidance space corresponding to the clustered obstacle.
3. The robot path planning method according to claim 2, characterized in that: The method further comprises: Deleting clustered obstacles whose center distance is greater than the radius of the obstacle avoidance space from the two-dimensional map; If the obstacle avoidance mode flag is an obstacle avoidance not enabled flag, moving the robot according to the planned path; When an obstacle is detected within a preset distance in front of the robot, the movement of the robot is stopped.
4. The robot path planning method according to claim 1, characterized in that: The step of sorting the clustered obstacles according to the projection point index of each clustered obstacle on the planned path and then expanding to generate a plurality of expanded obstacles comprises: Sort the clustered obstacles according to their projection point indexes on the planned path from small to large to obtain a clustered obstacle sequence; Calculating a multiplication value between the width of the robot and a preset proportional parameter to obtain an expanded size; Each of the clustered obstacles in the clustered obstacle sequence is expanded according to the expansion size to generate a plurality of expanded obstacles.
5. The robot path planning method according to claim 2, characterized in that: The method further comprises: When there is a blocking obstacle on the planned path and there is no non-blocking obstacle before the first blocking obstacle, an obstacle avoidance space is constructed with the center point of the obstacle avoidance space as the center of a circle and the radius of the obstacle avoidance space; Selecting an intersection point of the obstacle avoidance space and the planned path as a first candidate point and obtaining a first initial index value corresponding to the first candidate point; Determine the first candidate point to which the largest first initial index value belongs as the obstacle avoidance end point; Determine the first candidate point to which the smallest first initial index value belongs as the first initial starting point; Obtaining a first self-index value corresponding to the current position of the robot on the planned path; Selecting a point corresponding to the maximum value between the first initial index value corresponding to the first initial starting point and the first self index value as the obstacle avoidance starting point; Jump to execute the step of determining multiple obstacle avoidance passing points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road.
6. The robot path planning method according to claim 1, characterized in that: When there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, performing a merge judgment and updating the center point of the obstacle avoidance space to construct an obstacle avoidance space, and selecting an obstacle avoidance start point and an obstacle avoidance end point on the planned path, the steps include: When there is a road-blocking obstacle on the planned path, and there is a non-road-blocking obstacle before the first road-blocking obstacle, determining whether the first road-blocking obstacle overlaps with the non-road-blocking obstacle; If there is overlap, the frame size extreme values of the first said road-blocking obstacle and the said non-road-blocking obstacle are used to construct an updated road-blocking obstacle; The index point on the planned path closest to the center point of the updated obstacle is used as the new center point of the obstacle avoidance space; Constructing an obstacle avoidance space with the new obstacle avoidance space center point as the circle center and combining the mission parameters, and selecting an obstacle avoidance end point and a temporary start point; If there is no updated non-blocking obstacle before the updated blocking obstacle, the temporary starting point is determined as the obstacle avoidance starting point; If the updated non-road-blocking obstacle exists and does not overlap with the updated road-blocking obstacle, the obstacle avoidance starting point is determined according to the updated non-road-blocking obstacle and the updated road-blocking obstacle in combination with the temporary starting point.
7. The robot path planning method according to claim 6, characterized in that: The method further comprises: If the updated non-road-blocking obstacle exists and overlaps with the updated road-blocking obstacle, the updated non-road-blocking obstacle is used as a new non-road-blocking obstacle, and the updated road-blocking obstacle is used as a new road-blocking obstacle; Jump to execute the step of using the frame size extreme values of the first said road-blocking obstacle and the said non-road-blocking obstacle to construct and update the road-blocking obstacle.
8. The robot path planning method according to claim 6, characterized in that: The step of constructing the obstacle avoidance space with the new obstacle avoidance space center point as the circle center and combining the task parameters, and selecting the obstacle avoidance end point and temporary start point includes: Constructing an obstacle avoidance space with the new obstacle avoidance space center point as the center of the circle and combining the mission parameters; Selecting an intersection point of the obstacle avoidance space and the planned path as a second candidate point and obtaining a second initial index value corresponding to the second candidate point; Determine the candidate point to which the largest second initial index value belongs as the obstacle avoidance end point; Determine the candidate point to which the smallest second initial index value belongs as the second initial starting point; Obtaining a second self-index value corresponding to the current position of the robot on the planned path; A point corresponding to the maximum value between the second initial index value corresponding to the second initial starting point and the second self index value is selected as a temporary starting point.
9. The robot path planning method according to claim 6, characterized in that: If the updated non-blocking obstacle exists and does not overlap with the updated blocking obstacle, the step of determining the obstacle avoidance starting point based on the updated non-blocking obstacle and the updated blocking obstacle in combination with the temporary starting point includes: If the updated non-blocking obstacle does not overlap with the updated blocking obstacle, determining whether the path index value corresponding to the updated non-blocking obstacle is greater than the path index value corresponding to the temporary starting point; If not, determining the temporary starting point as the obstacle avoidance starting point; If yes, then respectively obtain the minimum path index value of the four vertices of the updated road-blocking obstacle on the planned path and the maximum path index value of the four vertices corresponding to the updated non-road-blocking obstacle on the planned path; Determining whether the minimum path index value is greater than the maximum path index value; If yes, then determining the corresponding point of the maximum path index value on the planned path as the obstacle avoidance starting point; If not, the corresponding point of the updated path index value corresponding to the non-blocking obstacle on the planned path is determined as the obstacle avoidance starting point.
10. The robot path planning method according to claim 6, characterized in that: The method further comprises: If the first road-blocking obstacle and the non-road-blocking obstacle do not overlap, the first road-blocking obstacle is used as the updated road-blocking obstacle, and the non-road-blocking obstacle is used as the updated non-road-blocking obstacle; Jump to the step of constructing the obstacle avoidance space with the new obstacle avoidance space center point as the center of the circle in combination with the task parameters, and selecting the obstacle avoidance end point and temporary start point.
11. The robot path planning method according to claim 1, characterized in that: The step of determining a plurality of obstacle avoidance passing points according to the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road comprises: extracting the avoidance distance from the task parameters; The avoidance distance is used to adjust the coordinates of the obstacle vertex corresponding to the first obstacle blocking the road to generate multiple obstacle avoidance passing points.
12. The robot path planning method according to claim 1, characterized in that: The step of constructing a target obstacle avoidance path using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point and performing a pass verification includes: Taking the obstacle avoidance starting point as the starting point and the obstacle avoidance ending point as the end point, selecting a single obstacle avoidance passing point as the intermediate point, and calling a preset path planning algorithm to construct multiple obstacle avoidance paths; Determining whether each of the obstacle avoidance paths intersects with the road-blocking obstacle; If any of the obstacle avoidance paths does not intersect the road-blocking obstacle, the obstacle avoidance path is determined to be passable, and the obstacle avoidance path is determined as a target obstacle avoidance path; If there are multiple obstacle avoidance paths that do not intersect with the road-blocking obstacle, the obstacle avoidance path is determined to be passable, and the obstacle avoidance path with the shortest path length is selected as the target obstacle avoidance path; If each of the obstacle avoidance paths intersects with the blocking obstacle, two adjacent obstacle avoidance passing points are selected as intermediate points to construct multiple new obstacle avoidance paths, and the step of determining whether each of the obstacle avoidance paths intersects with the blocking obstacle is skipped to execute until each of the obstacle avoidance paths intersects with the blocking obstacle again, and then the obstacle avoidance path is determined to be impassable.
13. The robot path planning method according to claim 1, characterized in that: The method further comprises: If the verification result shows that the obstacle avoidance path is impassable, moving the robot according to the planned path; When an obstacle is detected within a preset distance in front of the robot, the movement of the robot is stopped.
14. The robot path planning method according to claim 1, characterized in that: The method further comprises: Obtaining a two-dimensional map, a moving starting point and a moving end point, and connecting the moving starting point and the moving end point on the two-dimensional map to construct an initial straight line path; Adding two control points on the initial straight path; wherein there are no obstacles at the positions of the control points; The preset third-order Bezier curve equation is used to interpolate according to the preset number of interpolation points to generate a planned path.
15. The robot path planning method according to claim 14, characterized in that: After the step of moving the robot according to the new planned path, the method further includes: Jump to the step of converting the obstacle point cloud obtained from the current space into a two-dimensional map for clustering, obtaining multiple clustered obstacles and selecting the center point of the obstacle avoidance space, until the robot moves to the moving end point.
16. A robot path planning device, characterized in that: A processor applied to a robot, the device comprising: The data clustering module is used to respond to the planned path and task parameters, convert the obstacle point cloud obtained from the current space into a two-dimensional map for clustering, obtain multiple clustered obstacles and select the center point of the obstacle avoidance space; an obstacle expansion module, configured to sort the clustered obstacles according to the projection point index of the center point of each obstacle avoidance space on the planned path, and then expand the clustered obstacles to generate a plurality of expanded obstacles; A first starting and ending point selection module is used to, when there is a blocking obstacle on the planned path and there is a non-blocking obstacle before the first blocking obstacle, perform a merge judgment and update the center point of the obstacle avoidance space to construct an obstacle avoidance space, and select the obstacle avoidance start point and obstacle avoidance end point on the planned path; An obstacle avoidance passing point determination module is used to determine multiple obstacle avoidance passing points based on the task parameters and the obstacle vertex corresponding to the first obstacle blocking the road; a pass verification module, configured to construct a target obstacle avoidance path using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point, and perform a pass verification; The planned path update module is used to replace the planned path from the obstacle avoidance start point to the obstacle avoidance end point with the target obstacle avoidance path if the obstacle avoidance path verification result shows that the obstacle avoidance path is passable, generate a new planned path and move the robot according to the new planned path.
17. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the robot path planning method according to any one of claims 1 to 15.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the robot path planning method according to any one of claims 1 to 15 is implemented.
Citation Information
Patent Citations
Obstacle avoidance path planning method and device, electronic device, vehicle and storage medium
CN112595337A
Algorithm for obstacle avoidance path planning
CN114415665A