A robot mobile obstacle avoidance method, device, equipment and medium
By constructing a constraint space and adjusting obstacle vertices to determine obstacle avoidance path points, the problem of poor flexibility of existing obstacle avoidance algorithms due to spatial limitations is solved, and the flexibility and controllability of the robot's obstacle avoidance are improved.
Patent Information
- Application Number
- CN202310675275.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-06-07
AI Technical Summary
Existing obstacle avoidance algorithms are easily limited by the size of the external space, resulting in poor flexibility in the robot's obstacle avoidance, and are prone to visual blind spots and obstacles being ignored.
By constructing a constraint space, screening multiple radar points, clustering and expansion are used to determine and sort obstacles that block the road. The obstacle vertices are adjusted based on the obstacle avoidance parameters, and the starting, passing, and ending points of the obstacle avoidance are determined. The planned path is then updated to bypass the obstacles.
The robot's obstacle avoidance flexibility is improved, ensuring path controllability and avoiding the problem of the robot being unable to bypass obstacles due to space limitations in traditional solutions.
Smart Images

Figure CN116499467B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of route planning, and in particular to a method, device, equipment and medium for avoiding obstacles in robot movement. 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] Therefore, the current mainstream obstacle avoidance algorithms are usually based on path planning to avoid obstacles, randomly updating path information when encountering obstacles, or constraining path generation through a certain range of space. Figure 1 However, the above solution is easily limited by the size of the external space. Since the path is close to the right wall, the maximum radius of the obstacle avoidance space can only be Figure 1 As shown in the circles in cases a and b, due to the limited size of the obstacle avoidance space, a path cannot be generated in many cases, resulting in the robot being unable to bypass obstacles. In addition, visual blind spots are prone to occur, and obstacles are ignored, such as in case c, resulting in poor flexibility in the robot's obstacle avoidance. Summary of the Invention
[0005] The present invention provides a method, device, equipment and medium for mobile obstacle avoidance of a robot, which solves the technical problem that the current mainstream obstacle avoidance algorithms are usually based on path planning for obstacle avoidance, randomly updating path information when encountering obstacles, or constraining path generation within a certain range of space. However, the above schemes are easily limited by the size of the external space, resulting in poor flexibility in robot obstacle avoidance.
[0006] A first aspect of the present invention provides a method for avoiding obstacles in robot movement, which is applied to a controller within the robot. The method comprises:
[0007] Responding to obstacle avoidance parameters and planning paths, constructing constraint spaces and screening multiple radar points;
[0008] After clustering and expanding the radar points, determining obstacles and sorting the obstacles according to their obstacle indexes on the planned path;
[0009] If there is a non-blocking obstacle before the first blocking obstacle, perform an obstacle merging operation, and determine an obstacle avoidance start point and an obstacle avoidance end point on the planned path in combination with the constraint space;
[0010] Determining a plurality of obstacle avoidance passing points according to the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the road;
[0011] The planned path is updated using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point, and the robot is moved according to the new planned path.
[0012] Optionally, the step of responding to the obstacle avoidance parameters and planning the path, constructing the constraint space, and screening the plurality of radar points includes:
[0013] In response to the obstacle avoidance parameters and the planned path, at least four position points are selected in the current space and connected to create at least one obstacle avoidance space; each obstacle avoidance space is composed of at least four position points connected;
[0014] extracting the reduced length from the obstacle avoidance parameters;
[0015] isometrically reducing the obstacle avoidance space according to the reduced length to generate a constraint space;
[0016] When the laser radar data is received, the laser radar data is filtered and converted into a map coordinate system to obtain a radar scanning point;
[0017] Determining whether each of the radar scanning points is within the obstacle avoidance space;
[0018] If not, deleting the radar scan point;
[0019] If so, the radar scanning point is determined as a radar point.
[0020] Optionally, the step of isometrically reducing the obstacle avoidance space according to the reduced length to generate a constraint space includes:
[0021] Each position point is used as a target point, and two position points adjacent to the target point are combined to construct a first vector and a second vector;
[0022] Calculating the sine of the angle between the first vector and the second vector;
[0023] Calculating a ratio between the reduced length and the sine value of the angle to obtain the same third vector length and fourth vector length;
[0024] Determine a third vector using the third vector length and the first vector;
[0025] Determine a fourth vector using the fourth vector length and the second vector;
[0026] Superimposing the third vector and the fourth vector, and combining the position information of the target point to determine the position of the equidistant scaling point;
[0027] The positions of the equidistant scaling points are connected to generate a constraint space.
[0028] Optionally, the step of superimposing the third vector and the fourth vector and determining the position of the equidistant scaling point in combination with the position information of the target point includes:
[0029] Superimposing the third vector and the fourth vector, and combining the position information of the target point to determine the initial scaling point position;
[0030] Using a ray method to determine whether the initial zoom point position is within the obstacle avoidance space;
[0031] If not, determining the position of the equidistant scaling point according to the negative vector obtained by superimposing the third vector and the fourth vector in combination with the position information of the target point;
[0032] If so, the initial zoom point position is determined as the equidistant zoom point position.
[0033] Optionally, after clustering and expanding the radar points, the step of determining obstacles blocking the road and sorting the obstacles according to obstacle indexes on the planned path includes:
[0034] Clustering the radar points to obtain multiple clusters;
[0035] Using a rectangle to select each of the clusters to obtain an initial obstacle;
[0036] Calculating a multiplication value between the width of the robot and a first preset proportional parameter to obtain an expanded size;
[0037] Expanding each of the initial obstacles according to the expansion size to generate a plurality of expanded obstacles;
[0038] Selecting an expansion obstacle that intersects the planned path as a road-blocking obstacle, and locating the obstacle center point corresponding to the road-blocking obstacle;
[0039] Selecting an index point on the planned path that is closest to the center point of the obstacle, and determining the index to which the index point belongs as the obstacle index corresponding to the road-blocking obstacle;
[0040] The obstacles blocking the road are sorted from small to large according to the obstacle index.
[0041] Optionally, if there is a non-blocking obstacle before the first blocking obstacle, performing an obstacle merging operation and determining an obstacle avoidance start point and an obstacle avoidance end point on the planned path in combination with the constraint space includes:
[0042] If 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;
[0043] 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;
[0044] Selecting an index point on the planned path that is closest to the center point of the updated road-blocking obstacle, and using the index to which the index point belongs as the updated obstacle index;
[0045] Determining an obstacle avoidance end point and a second temporary start point based on a positional relationship between the first path point corresponding to the updated obstacle index and the constraint space;
[0046] If there is no updated non-blocking obstacle before the updated blocking obstacle, determining the second temporary starting point as the obstacle avoidance starting point;
[0047] If the updated non-road-blocking obstacle does not overlap with the updated road-blocking obstacle, an obstacle avoidance starting point is determined based on the updated non-road-blocking obstacle and the updated road-blocking obstacle in combination with the second temporary starting point.
[0048] Optionally, the step of determining an obstacle avoidance end point and a second temporary start point based on a positional relationship between the updated obstacle index and the constraint space includes:
[0049] Calculating a multiplication value between the updated perimeter of the road-blocking obstacle and a second preset ratio to obtain an updated perimeter;
[0050] Superimposing a first preset step length on the updated obstacle index to obtain a first current index;
[0051] Determining an obstacle avoidance end point based on a positional relationship between an end point of the planned path and the constraint space and the first current index;
[0052] Superimposing a second preset step length on the updated obstacle index to obtain a second current index;
[0053] Determining a first temporary starting point based on a positional relationship between a starting point of the planned path and the constraint space and in combination with the second current index;
[0054] comparing a first path index corresponding to the first temporary starting point with a robot path index of the robot on the planned path at a current moment;
[0055] A point having a maximum value between the first path index and the robot path index is selected as a second temporary starting point.
[0056] Optionally, the step of determining the obstacle avoidance end point based on the positional relationship between the path endpoint of the planned path and the constraint space in combination with the first current index includes:
[0057] Determining whether an end point of the planned path is outside the constraint space;
[0058] If it is not outside the constraint space, determining whether the first current index is greater than the endpoint index corresponding to the path endpoint;
[0059] If it is greater than, the end point of the path is determined to be the obstacle avoidance end point;
[0060] If not, determining whether the index distance between the first current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0061] If yes, then determining the path point to which the first current index belongs as the obstacle avoidance end point;
[0062] If not, the first preset index value is added to the first current index to obtain a new first current index, and the process jumps to the step of determining whether the first current index is greater than the endpoint index corresponding to the path endpoint;
[0063] If it is outside the constraint space, determining whether the path point to which the first current index belongs exceeds the constraint space;
[0064] If it exceeds, the path point to which the difference index between the first current index and the first preset value belongs is determined as the obstacle avoidance end point;
[0065] If not, determining whether the index distance between the first current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0066] If yes, then determining the path point to which the first current index belongs as the obstacle avoidance end point;
[0067] If not, the first preset index value is added to the first current index to obtain a new first current index, and the process jumps to the step of determining whether the path point to which the first current index belongs exceeds the constraint space.
[0068] Optionally, the step of determining the first temporary starting point based on the positional relationship between the starting point of the planned path and the constraint space in combination with the second current index includes:
[0069] Determining whether a starting point of the planned path is outside the constraint space;
[0070] If it is not outside the constraint space, determining whether the second current index is greater than the starting point index corresponding to the starting point of the path;
[0071] If it is greater than, the starting point of the path is determined to be the first temporary starting point;
[0072] If not, determining whether the index distance between the second current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0073] If yes, determining the path point to which the second current index belongs as the first temporary starting point;
[0074] If not, the second preset index value is added to the second current index to obtain a new second current index, and the process jumps to the step of determining whether the second current index is greater than the starting point index corresponding to the starting point of the path;
[0075] If it is outside the constraint space, determining whether the path point to which the second current index belongs exceeds the constraint space;
[0076] If it exceeds, determining the path point to which the difference index between the second current index and the second preset value belongs as the first temporary starting point;
[0077] If not, determining whether the index distance between the second current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0078] If yes, determining the path point to which the second current index belongs as the first temporary starting point;
[0079] If not, the second preset index value is added to the second current index to obtain a new second current index, and the process jumps to the step of determining whether the path point to which the second current index belongs exceeds the constraint space.
[0080] Optionally, the method further includes:
[0081] If there is a new updated non-road-blocking obstacle that 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;
[0082] 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.
[0083] Optionally, if the updated non-road-blocking obstacle does not overlap with the updated road-blocking obstacle, the step of determining the obstacle avoidance starting point based on the updated non-road-blocking obstacle and the updated road-blocking obstacle in combination with the second temporary starting point includes:
[0084] If the updated non-road-blocking obstacle does not overlap with the updated road-blocking obstacle, determining whether the path index corresponding to the updated non-road-blocking obstacle is greater than the path index corresponding to the second temporary starting point;
[0085] If not, determining the second temporary starting point as the obstacle avoidance starting point;
[0086] If so, respectively obtain the minimum path index of the four vertices of the updated road-blocking obstacle on the planned path and the maximum path index of the four vertices corresponding to the updated non-road-blocking obstacle on the planned path;
[0087] Determining whether the minimum path index is greater than the maximum path index;
[0088] If yes, then determining the corresponding point of the maximum path index on the planned path as the obstacle avoidance starting point;
[0089] If not, the corresponding point of the path index corresponding to the updated non-blocking obstacle on the planned path is determined as the obstacle avoidance starting point.
[0090] Optionally, the method further includes:
[0091] 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;
[0092] Jump to the step of selecting an index point on the planned path that is closest to the center point of the updated road-blocking obstacle, and using the index to which the index point belongs as the step of updating the obstacle index.
[0093] Optionally, the method further includes:
[0094] If there is no non-blocking obstacle before the first blocking obstacle, determining an obstacle avoidance end point and a third temporary start point according to a positional relationship between the obstacle index and the constraint space;
[0095] comparing a second path index corresponding to the third temporary starting point with a robot path index of the robot on the planned path at a current moment;
[0096] The point with the maximum value between the second path index and the robot path index is selected as the obstacle avoidance starting point.
[0097] Optionally, the step of determining a plurality of obstacle avoidance passing points based on the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the road includes:
[0098] Extracting the avoidance distance from the obstacle avoidance parameters;
[0099] The avoidance distance is used to adjust the coordinates of the obstacle vertex on the first obstacle blocking the road to generate multiple obstacle avoidance passing points.
[0100] Optionally, the step of updating the planned path by using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point, and moving the robot according to the new planned path includes:
[0101] 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;
[0102] Determining whether the obstacle avoidance path is passable;
[0103] If any of the obstacle avoidance paths does not intersect with the first obstacle blocking the path and does not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than a preset curvature threshold, then the obstacle avoidance path is determined to be passable and is determined as the target obstacle avoidance path;
[0104] If there are multiple obstacle avoidance paths that do not intersect with the blocking obstacle and do not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold, 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;
[0105] If all the obstacle avoidance paths intersect with the road-blocking obstacle, 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 the obstacle avoidance paths are passable, until all the obstacle avoidance paths intersect with the road-blocking obstacle again, in which case the obstacle avoidance paths are determined to be impassable.
[0106] If it is determined 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.
[0107] Optionally, the method further includes:
[0108] If it is determined that the obstacle avoidance path is impassable, moving the robot according to the planned path;
[0109] When an obstacle is detected within a preset distance in front of the robot, the movement of the robot is stopped.
[0110] Optionally, after executing the step of moving the robot according to the new planned path, the method further includes:
[0111] Jump to the step of screening multiple radar points until the robot moves to the end point of the planned path.
[0112] A second aspect of the present invention provides a mobile obstacle avoidance device for a robot, which is applied to a controller within the robot, and the device comprises:
[0113] Response building module, which is used to respond to obstacle avoidance parameters and plan paths, build constraint spaces, and filter multiple radar points;
[0114] a cluster expansion module, configured to determine obstacles blocking the path after clustering and expanding the radar points, and sort the obstacles according to their obstacle indexes on the planned path;
[0115] an obstacle avoidance start and end point selection module, configured to perform an obstacle merging operation if there is a non-blocking obstacle before the first blocking obstacle, and determine an obstacle avoidance start point and an obstacle avoidance end point on the planned path in combination with the constraint space;
[0116] A passing point selection module is used to determine multiple obstacle avoidance passing points based on the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the road;
[0117] A path updating module is used to update the planned path using the obstacle avoidance starting point, one or two obstacle avoidance passing points and the obstacle avoidance ending point, and to move the robot according to the new planned path.
[0118] 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's movement and obstacle avoidance as described in any one of the first aspects of the present invention.
[0119] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the robot movement obstacle avoidance method as described in any one of the first aspects of the present invention.
[0120] It can be seen from the above technical solutions that the present invention has the following advantages:
[0121] The present invention uses a controller within the robot to respond to received obstacle avoidance parameters and a planned path, construct a constraint space for the wall space within which the robot resides, and screen multiple radar points. After clustering and expanding the radar points, the robot determines obstructing obstacles and sorts them according to their obstacle indexes on the planned path. If a non-obstructing obstacle is determined to exist before the first obstructing obstacle, an obstacle merging operation is performed. The robot then determines an obstacle avoidance start point and an obstacle avoidance end point on the planned path based on the constraint space. The obstacle vertex on the first obstructing obstacle is adjusted based on the obstacle avoidance size within the obstacle avoidance parameters to determine multiple obstacle avoidance passage points. The planned path is then updated using the obstacle avoidance start point, one or two obstacle avoidance passage points, and the obstacle avoidance end point, and the robot is moved along the new planned path. This flexible construction of the constraint space allows for more flexible selection of points for constructing the obstacle avoidance path, resolving the technical issue of conventional obstacle avoidance schemes being susceptible to external space size limitations, resulting in poor robot avoidance flexibility. This effectively improves the robot's obstacle avoidance flexibility while ensuring controllable obstacle avoidance paths. BRIEF DESCRIPTION OF THE DRAWINGS
[0122] 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.
[0123] Figure 1 Schematic diagram of the defects of the obstacle avoidance algorithm in the prior art;
[0124] Figure 2 A flowchart of the steps of a robot movement obstacle avoidance method provided in Example 1 of the present invention;
[0125] Figure 3 A flowchart of the steps of a robot movement obstacle avoidance method provided in the second embodiment of the present invention;
[0126] Figure 4 Schematic diagram of two obstacle avoidance spaces in an embodiment of the present invention;
[0127] Figure 5 Schematic diagram of vector superposition in an embodiment of the present invention;
[0128] Figure 6 A schematic diagram of a constraint space constructed by a single obstacle avoidance space in an embodiment of the present invention;
[0129] Figure 7 Schematic diagram of initial obstacle expansion in an embodiment of the present invention;
[0130] Figure 8 This is a flow chart of a process for updating a road-blocking obstacle in an embodiment of the present invention;
[0131] Figure 9 A flowchart of the steps for selecting the obstacle avoidance end point according to an embodiment of the present invention;
[0132] Figure 10 A flowchart of the steps for selecting a first temporary starting point in an embodiment of the present invention;
[0133] Figure 11 Schematic diagram of coordinate adjustment of obstacle vertices in an embodiment of the present invention;
[0134] Figure 12 A schematic diagram of selecting a single obstacle avoidance point as an intermediate point to construct an obstacle avoidance path in an embodiment of the present invention;
[0135] Figure 13 is an overall flow chart of a robot path planning method in an optional embodiment of the present invention;
[0136] Figure 14 A flowchart of the obstacle avoidance starting point selection steps in an embodiment of the present invention;
[0137] Figure 15 This is a structural block diagram of a mobile obstacle avoidance device for a robot provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0138] Embodiments of the present invention provide a method, apparatus, device, and medium for mobile obstacle avoidance of a robot, which are used to solve the technical problem that the current mainstream obstacle avoidance algorithms are generally based on path planning for obstacle avoidance, randomly updating path information when encountering obstacles, or constraining path generation within a certain range of space. However, the above-mentioned solutions are easily limited by the size of the external space, resulting in poor flexibility in robot obstacle avoidance.
[0139] 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.
[0140] See also Figure 2 , Figure 2 This is a flowchart of the steps of a robot movement obstacle avoidance method provided in Example 1 of the present invention.
[0141] The present invention provides a robot movement obstacle avoidance method, which is applied to a controller within the robot and includes:
[0142] Step 101, in response to obstacle avoidance parameters and planned path, construct a constraint space and select multiple radar points;
[0143] 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 path starting point and path end point. The path planning algorithm may include but is not limited to the Dijkstra algorithm, the A* algorithm, or the D* algorithm.
[0144] Obstacle avoidance 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, the robot's width, expansion size, and avoidance distance.
[0145] Among them, the global prior path can be set through user input. It refers to the path generated on the map based on the starting point, end point, and static obstacles. This path is feasible by default and is also a reference; the expansion size can be set based on the robot's body width. For example, the avoidance distance can be set according to the size of the current space. The expansion size ≥ 1 / 2 * the robot's body width, and the avoidance distance can be set to 0.1m.
[0146] Radar points refer to the scanning points generated in the map coordinate system after the robot is located in the wall space by scanning the various obstacles using the lidar.
[0147] In an embodiment of the present invention, the robot may be equipped with a corresponding controller. After receiving the obstacle avoidance parameters and planned path input from the outside, it arbitrarily selects at least four points not against the wall inside the wall space of the scene where the robot is located, connects the points in sequence to form a polygonal space, and constructs an obstacle avoidance space with one or more groups of polygons. The obstacle avoidance space is equidistantly reduced according to the reduction length within the obstacle avoidance parameters to generate a constraint space.
[0148] When generating the constraint space, the lidar on the robot can be called to obtain the lidar data within the wall space and convert its points into the map coordinate system, and the points in the obstacle avoidance space can be determined as radar points.
[0149] Step 102: After clustering and expanding the radar points, obstacles are determined and sorted according to their obstacle indexes on the planned path.
[0150] The obstacle index refers to the index corresponding to the path point on the planned path that is closest to the center point of the obstacle.
[0151] After acquiring multiple radar points, the radar points can be clustered using a clustering algorithm and selected as obstacles. After expansion, obstacles that intersect with the planned path after expansion are determined as road-blocking obstacles.
[0152] At the same time, the obstacles are sorted from small to large according to their corresponding obstacle indexes on the planned path to determine the relationship between the obstacles.
[0153] Step 103: If there is a non-blocking obstacle before the first blocking obstacle, perform an obstacle merging operation and determine the obstacle avoidance start point and obstacle avoidance end point on the planned path in combination with the constraint space;
[0154] The obstacle merging operation refers to the process of determining whether there is area overlap between blocking obstacles and non-blocking obstacles, and merging them into a large obstacle when area overlap occurs.
[0155] If there is a non-blocking obstacle before the first blocking obstacle, an obstacle merging operation can be performed on the two to construct an updated blocking obstacle, and its obstacle avoidance start point and obstacle avoidance end point on the planned path can be analyzed in combination with the constraint space.
[0156] It should be noted that the obstacle avoidance start point and the obstacle avoidance end point refer to one of the path points on the planned path, which can be determined by the positional relationship between the constraint space and the path end point and the path starting point, combined with the path index of the path point.
[0157] Step 104, determining a plurality of obstacle avoidance passing points based on the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the path;
[0158] After determining the obstacle avoidance start point and obstacle avoidance end point, in order to determine the specific movement route of the robot between the two, it is necessary to first determine the obstacle avoidance passing point. The obstacle vertex on the first blocking obstacle can be adjusted according to the avoidance distance in the obstacle avoidance parameters to generate multiple obstacle avoidance passing points.
[0159] The roadblock may be a merged updated roadblock or an unmerged roadblock.
[0160] Step 105 , using the obstacle avoidance starting point, a single or two obstacle avoidance passing points, and an obstacle avoidance ending point to update the planned path, and moving the robot according to the new planned path.
[0161] After determining the obstacle avoidance starting point, obstacle avoidance end point and obstacle avoidance passing point, since there are four obstacle vertices, there are also four obstacle avoidance passing points when selecting. At this time, in order to construct a specific obstacle avoidance path, you can start from the obstacle avoidance starting point and connect to the obstacle avoidance end point one by one through a single or two obstacle avoidance passing points. Combined with the path planning algorithm, four target obstacle avoidance paths are constructed. After determining that the target obstacle avoidance path can bypass the obstacle, the target obstacle avoidance path is used to replace the planned path from the obstacle avoidance starting point to the obstacle avoidance end point to generate a new planned path and move the robot according to the new planned path.
[0162] In an embodiment of the present invention, a controller within the robot, in response to received obstacle avoidance parameters and a planned path, constructs a constraint space for the wall space within which the robot resides and filters to obtain multiple radar points. After clustering and expanding the radar points, the robot determines obstructing obstacles and sorts them according to their obstacle indexes on the planned path. If a non-obstructing obstacle is determined to exist before the first obstructing obstacle, an obstacle merging operation is performed. The robot then determines an obstacle avoidance start and end point on the planned path based on the constraint space. The obstacle vertex on the first obstructing obstacle is adjusted based on the obstacle size within the obstacle avoidance parameters to determine multiple obstacle avoidance points. The planned path is then updated using the obstacle avoidance start point, one or two obstacle avoidance points, and the obstacle avoidance end point, and the robot is moved along the new planned path. This flexible construction of the constraint space allows for more flexible selection of points for constructing the obstacle avoidance path, resolving the technical issue of conventional obstacle avoidance schemes being susceptible to external space size limitations, resulting in poor robot avoidance flexibility. This effectively improves the robot's obstacle avoidance flexibility while ensuring controllable obstacle avoidance paths.
[0163] See also Figure 3 , Figure 3 This is a flowchart of the steps of a robot movement obstacle avoidance method provided in Example 2 of the present invention.
[0164] The present invention provides a robot movement obstacle avoidance method, which is applied to a controller within the robot and includes:
[0165] Step 201, in response to obstacle avoidance parameters and planned path, construct a constraint space and select multiple radar points;
[0166] Optionally, step 201 may include the following sub-steps S11-S17:
[0167] S11. In response to the obstacle avoidance parameters and the planned path, select at least four position points in the current space and connect them to create at least one obstacle avoidance space; each obstacle avoidance space is composed of at least four position points connected together;
[0168] The planned path can be composed of a series of index points, which can be understood as a set of index points, including the moving starting point, moving end point and intermediate points. The index of the moving starting point is 0, and the index of the end point is the set length minus 1. For example, under normal circumstances, a distance of one meter is marked by 100 points. Assuming that the moving starting point is (0,0) and the moving 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)]. That is, 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 index of the obstacle projection point.
[0169] 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:
[0170]
[0171] 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).
[0172] Among them, the third-order Bezier curve equation is as follows:
[0173] P(t)=A·(1-t) 3 +B·3(1-t) 2 t+C·3(1-t)t 2 +D·t 3
[0174] 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 time, t∈(0,1).
[0175] See also Figure 4 , Figure 4Schematic diagrams of two obstacle avoidance spaces in embodiments of the present invention are shown.
[0176] In the embodiment of the present invention, the obstacle avoidance space is composed of at least four position points connected together. Multiple obstacle avoidance spaces such as the dotted line area can exist simultaneously in the same space. The embodiment of the present invention does not limit the specific number of obstacle avoidance spaces.
[0177] S12, extracting the reduced length from the obstacle avoidance parameters;
[0178] In the embodiment of the present invention, the reduction length may be extracted from the obstacle avoidance parameters to obtain a data basis for constrained space generation.
[0179] The reduced length may be set to be greater than half the width of the robot, and its specific value may be set according to the width of the robot or the vehicle, which is not limited in this embodiment of the present invention.
[0180] S13, isometrically reducing the obstacle avoidance space according to the reduced length to generate a constraint space;
[0181] Furthermore, S13 may include the following sub-steps S131-S137:
[0182] S131, using each position point as a target point, combining two position points adjacent to the target point, and constructing a first vector and a second vector;
[0183] S132. Calculate the sine value of the angle between the first vector and the second vector;
[0184] In the specific implementation, Figure 3 For any polygon formed by the dotted line, each position point is used as the target point P i , towards the two adjacent position points P i+1 and P i-1 They form the first vector P i P i+1 and the second vector P i P i-1 .
[0185] The angle θ between the first vector and the second vector is calculated by combining the preset formula, and the sine value of the angle is determined. The preset formula is: and
[0186] S133. Calculate the ratio between the reduced length and the sine value of the angle to obtain the same length of the third vector and the fourth vector.
[0187] The third vector length |V1| and the fourth vector length |V2| are further calculated based on the following formula:
[0188] |V1|=|V2|=d / sinθ
[0189] Where d is the reduced length.
[0190] S134. Determine a third vector using the length of the third vector and the first vector;
[0191] S135. Determine a fourth vector using the length of the fourth vector and the second vector;
[0192] In the embodiment of the present invention, the third vector V1 and the fourth vector V2 are determined based on the following formula:
[0193] V1=|V1| / |P i P i+1 |·P i P i+1
[0194] V2=|V2| / |P i P i-1 |·P i P i-1
[0195] S136, superimposing the third vector and the fourth vector, and combining the position information of the target point to determine the position of the equidistant scaling point;
[0196] In an optional embodiment of the present invention, S136 may include the following sub-steps:
[0197] The third vector and the fourth vector are superimposed, and the position of the initial scaling point is determined by combining the position information of the target point;
[0198] The ray method is used to determine whether the initial scaling point is within the obstacle avoidance space;
[0199] If not, the position of the equidistant scaling point is determined according to the negative vector obtained by superimposing the third vector and the fourth vector and the position information of the target point;
[0200] If so, the initial scaling point position is determined as the equidistant scaling point position.
[0201] See also Figure 5 By superimposing the third vector and the fourth vector, and combining the position information of the target point such as the coordinate position, the initial scaling point position is located. The superposition of the third vector and the fourth vector is as follows:
[0202] P i Q i =V1+V2
[0203] The ray method is used to determine whether the initial scaling point position is within the obstacle avoidance space. If not, the position of the equidistant scaling point is determined according to the negative vector of the superposition of the third and fourth vectors, combined with the position information of the target point. The negative vector of the superposition of the third and fourth vectors is as follows:
[0204] P i Q i =-V1-V2
[0205] If so, the initial scaling point position is determined as the equidistant scaling point position.
[0206] It should be noted that the ray method refers to drawing a ray through the obstacle avoidance space from the initial zoom point position. If the number of intersection points between the ray and the obstacle avoidance space is odd, it indicates that the initial zoom point position is within the obstacle avoidance space. If it is even, it indicates that the initial zoom point position is not within the obstacle avoidance space.
[0207] S137. Connect the positions of the equidistant scaling points to generate a constraint space.
[0208] After determining the positions of each isometric scaling point, connect the positions of each isometric scaling point to generate a constraint space, such as Figure 6 The area constructed by the thick solid line in is shown as the constraint space constructed with a single obstacle avoidance space, and the number of constraint spaces constructed with multiple obstacle avoidance spaces is the same as the number of obstacle avoidance spaces.
[0209] S14. When the laser radar data is received, the laser radar data is filtered and converted into a map coordinate system to obtain a radar scanning point;
[0210] S15, determining whether each radar scanning point is within the obstacle avoidance space;
[0211] S16. If not, delete the radar scan point;
[0212] S17: If yes, determine the radar scanning point as a radar point.
[0213] In this embodiment, the robot can use the LiDAR to obtain LiDAR data, such as a point cloud, within the current space. The robot then selects LiDAR data that matches obstacle characteristics and converts these points into a two-dimensional map to obtain radar scan points in the map coordinate system. The system then determines whether each radar scan point is within the obstacle avoidance space. If so, it is designated as a radar point; otherwise, it is deleted.
[0214] Among them, the method for determining whether each radar scanning point is within the obstacle avoidance space can also adopt the ray method. The specific process can be referred to the content of step S136 and will not be repeated here.
[0215] Step 202: After clustering and expanding the radar points, obstacles are determined and sorted according to their obstacle indexes on the planned path.
[0216] Optionally, step 202 may include the following sub-steps:
[0217] Cluster the radar points to obtain multiple clusters;
[0218] Use rectangles to select each cluster to obtain the initial obstacles;
[0219] Calculate the multiplication value between the width of the robot and the first preset ratio parameter to obtain the expansion size;
[0220] Expand each initial obstacle according to the expansion size to generate multiple expanded obstacles;
[0221] Select the expansion obstacle that intersects the planned path as the road-blocking obstacle, and locate the obstacle center point corresponding to the road-blocking obstacle;
[0222] Select the index point closest to the obstacle center on the planned path, and determine the index to which the index point belongs as the obstacle index corresponding to the road-blocking obstacle;
[0223] Sort the obstacles in the way from smallest to largest according to the obstacle index.
[0224] In the embodiment of the present invention, DBSCAN clustering can be further performed on the radar points to obtain multiple clusters, and then a rectangle is used to select each cluster to obtain an initial obstacle.
[0225] At the same time, the multiplication value between the width of the robot and the first preset ratio parameter is calculated to obtain an expansion size. Each initial obstacle in the initial obstacle sequence is expanded according to the expansion size to generate multiple expanded obstacles. The specific expansion process can be as follows:
[0226] like Figure 7 As shown, the initial obstacle is (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).
[0227] Select the index point closest to the obstacle center point on the planned path, determine the index to which the index point belongs as the obstacle index corresponding to the road-blocking obstacle, and sort the road-blocking obstacles from small to large according to the obstacle index to obtain a road-blocking obstacle sequence sorted by obstacle index.
[0228] It should be noted that the first preset ratio parameter can be set according to actual conditions, and the expansion size is at least greater than or equal to half of the width of the robot.
[0229] In specific implementation, the obstacle index can be obtained by:
[0230] The index point is the path point (x2, y2) closest to the obstacle center point (x1, y1) on the planned path. The calculation formula is:
[0231]
[0232] l is the distance between the center point of the obstacle and the nearest path point on the planned path.
[0233] Furthermore, the method further includes the following steps S31-S33:
[0234] S31. If there is no non-blocking obstacle before the first blocking obstacle, determine the obstacle avoidance end point and the third temporary start point based on the positional relationship between the obstacle index and the constraint space;
[0235] S32, comparing the second path index corresponding to the third temporary starting point with the robot path index of the robot on the planned path at the current moment;
[0236] S33. Select the point with the maximum value between the second path index and the robot path index as the obstacle avoidance starting point.
[0237] In an embodiment of the present invention, if there is no non-blocking obstacle in front of the first blocking obstacle, the obstacle avoidance end point and the third temporary starting point can be determined based on the positional relationship between the obstacle index and the constraint space. The specific process can be referred to step S23, which will not be described in detail here.
[0238] After determining the third temporary starting point and the obstacle avoidance end point, we can further compare the second path index of the third temporary starting point on the planned path with the robot path index of the robot on the planned path at the current moment, and select the point with the maximum value between the two as the obstacle avoidance starting point.
[0239] Step 203: If there is a non-blocking obstacle before the first road-blocking obstacle, determine whether the first road-blocking obstacle and the non-blocking obstacle overlap;
[0240] 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;
[0241] 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.
[0242] See also Figure 8 , the process of updating the generation of obstacles can be as follows:
[0243] If the obstacle 1(x max1 ,x min1 ,y max1 ,y max1 ), non-blocking obstacles 2(x max2 ,x min2 ,y max2 ,y max2 ).
[0244] 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 )).
[0245] 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.
[0246] Step 205: Select an index point on the planned path that is closest to the center point of the updated obstacle, and use the index of the index point as the updated obstacle index;
[0247] In another example of the present invention, the method further includes:
[0248] 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;
[0249] Jump to the step of selecting the index point on the planned path that is closest to the center point of the updated obstacle, and using the index of the index point as the step of updating the obstacle index.
[0250] 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. The process jumps to step 205 and determines the updated obstacle index again to directly select the obstacle avoidance end point and the first temporary starting point.
[0251] Step 206: Determine the obstacle avoidance end point and the second temporary start point based on the positional relationship between the first path point corresponding to the updated obstacle index and the constraint space;
[0252] Optionally, step 206 may include the following sub-steps S21-S27:
[0253] S21. Calculate the product of the updated perimeter of the road-blocking obstacle and the second preset ratio to obtain an updated perimeter;
[0254] In an embodiment of the present invention, the updated circumference can be obtained by calculating the multiplication value between the circumference of the updated obstacle and the second preset ratio, where the second preset ratio can be set to 0.4. If the distance is too short, the curvature of the subsequently generated target obstacle avoidance path will be too large, resulting in difficulty in turning. The embodiment of the present invention does not limit the specific ratio value.
[0255] S22. Superimposing a first preset step size on the updated obstacle index to obtain a first current index;
[0256] The updated obstacle index is superimposed with a first preset step length. Since the obstacle avoidance end point is determined, a superimposed search can be performed along the path end point according to the updated obstacle index. That is, the first preset step length is a positive value. Specifically, the minimum unit of the obstacle index can be updated for superposition, which is not limited in this embodiment of the present invention.
[0257] S23, determining an obstacle avoidance end point based on a positional relationship between the end point of the planned path and the constraint space and the first current index;
[0258] See also Figure 9 , further, S23 may include the following sub-steps:
[0259] Determine whether the end point of the planned path is outside the constraint space;
[0260] If it is not outside the constraint space, determine whether the first current index is greater than the endpoint index corresponding to the path endpoint;
[0261] If it is greater than, the end point of the path is determined to be the end point of obstacle avoidance;
[0262] If not, determining whether the index distance between the first current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0263] If yes, the path point to which the first current index belongs is determined as the obstacle avoidance end point;
[0264] If not, the first preset index value is added to the first current index to obtain a new first current index, and the process jumps to the step of determining whether the first current index is greater than the endpoint index corresponding to the path endpoint;
[0265] If it is outside the constraint space, determine whether the path point to which the first current index belongs exceeds the constraint space;
[0266] If it exceeds, the path point to which the difference index between the first current index and the first preset value belongs is determined as the obstacle avoidance end point;
[0267] If not, determining whether the index distance between the first current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0268] If yes, the path point to which the first current index belongs is determined as the obstacle avoidance end point;
[0269] If not, the first preset index value is added to the first current index to obtain a new first current index, and the process jumps to the step of determining whether the path point to which the first current index belongs exceeds the constraint space.
[0270] S24. Adding a second preset step size to the updated obstacle index to obtain a second current index;
[0271] The updated obstacle index is superimposed with a second preset step size. Since the first temporary starting point is determined, the path index of the planned path increases from the path starting point to the path ending point. In this case, a superimposed search can be performed along the path starting point according to the updated obstacle index. In other words, the first preset step size is a negative value. Specifically, the minimum unit of the updated obstacle index can be superimposed, and this embodiment of the present invention does not impose any limitation on this.
[0272] S25. Determine a first temporary starting point based on the positional relationship between the starting point of the planned path and the constraint space and the second current index;
[0273] See also Figure 10 , further, S25 may include the following sub-steps:
[0274] Determine whether the starting point of the planned path is outside the constraint space;
[0275] If it is not outside the constraint space, determine whether the second current index is greater than the starting point index corresponding to the starting point of the path;
[0276] If it is greater than, the path starting point is determined to be the first temporary starting point;
[0277] If not, determine whether the index distance between the second current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0278] If yes, the path point to which the second current index belongs is determined as the first temporary starting point;
[0279] If not, the second preset index value is added to the second current index to obtain a new second current index, and the process jumps to the step of determining whether the second current index is greater than the starting point index corresponding to the starting point of the path;
[0280] If it is outside the constraint space, determine whether the path point to which the second current index belongs exceeds the constraint space;
[0281] If it exceeds, the path point to which the difference index between the second current index and the second preset value belongs is determined as the first temporary starting point;
[0282] If not, determining whether the index distance between the second current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0283] If yes, the path point to which the second current index belongs is determined as the first temporary starting point;
[0284] If not, the second preset index value is added to the second current index to obtain a new second current index, and the process jumps to the step of determining whether the path point to which the second current index belongs exceeds the constraint space.
[0285] In the specific implementation, taking the selection of the first temporary starting point as an example, if the starting point of the planned path is within the constraint space, the current index point is to find a point on the planned path that is ≥0.4 times the obstacle perimeter. That is, the range is from a point equal to 0.4 times the obstacle perimeter to the starting point of the path. If the starting point of the planned path is outside the constraint space, the current index point is to find a point on the planned path that is ≥0.4 times the obstacle perimeter. If the current index point is outside the constraint space, the current index point is increased by 1 to keep it within the constraint space. That is, the obstacle avoidance end point is found on the planned path that is ≥0.4 times the obstacle perimeter and within the constraint space. The same method is used for the obstacle avoidance end point.
[0286] S26. Compare the first path index corresponding to the first temporary starting point with the robot path index of the robot on the planned path at the current moment;
[0287] S27. Select the point with the maximum value between the first path index and the robot path index as the second temporary starting point.
[0288] In an embodiment of the present invention, after determining the first temporary starting point, the first path index corresponding to the first temporary starting point is compared with the robot path index of the robot on the planned path at the current moment, and the point with the maximum value between the first path index and the robot path index is selected as the second temporary starting point.
[0289] Step 207: If there is no updated non-blocking obstacle before the updated blocking obstacle, the second temporary starting point is determined as the obstacle avoidance starting point;
[0290] Step 208: If the updated non-blocking obstacle 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 second temporary start point.
[0291] Optionally, step 208 may include the following sub-steps:
[0292] If the updated non-blocking obstacle does not overlap with the updated blocking obstacle, determining whether the path index corresponding to the updated non-blocking obstacle is greater than the path index corresponding to the second temporary starting point;
[0293] If not, the second temporary starting point is determined as the obstacle avoidance starting point;
[0294] If so, obtain the minimum path index of the four vertices of the updated obstacle on the planned path and the maximum path index of the four vertices corresponding to the non-blocking obstacle on the planned path respectively;
[0295] Determine whether the minimum path index is greater than the maximum path index;
[0296] If so, the corresponding point of the maximum path index on the planned path is determined as the obstacle avoidance starting point;
[0297] If not, the corresponding point of the path index corresponding to the updated non-blocking obstacle on the planned path is determined as the obstacle avoidance starting point.
[0298] Optionally, the method further comprises:
[0299] If there is a new updated non-blocking obstacle that 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;
[0300] 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.
[0301] 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.
[0302] Step 209, determining a plurality of obstacle avoidance passing points based on the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the road;
[0303] Optionally, step 209 may include the following sub-steps:
[0304] Extract the avoidance distance from the obstacle avoidance parameters;
[0305] The coordinates of the obstacle vertex on the first obstacle blocking the road are adjusted using the avoidance distance to generate multiple obstacle avoidance passing points.
[0306] In an embodiment of the present invention, the obstacle avoidance 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 obstacle avoidance 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.
[0307] See also Figure 11 , the process of adjusting the coordinates of the obstacle vertices can be as follows:
[0308] 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).
[0309] Step 210 , using the obstacle avoidance starting point, a single or two obstacle avoidance passing points, and an obstacle avoidance ending point to update the planned path, and moving the robot according to the new planned path.
[0310] In one example of the present invention, step 210 may include the following sub-steps:
[0311] 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;
[0312] Determine whether the obstacle avoidance path is passable;
[0313] If there is any obstacle avoidance path that does not intersect with the first obstacle in the way and does not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold, then the obstacle avoidance path is determined to be passable and is determined as the target obstacle avoidance path;
[0314] If there are multiple obstacle avoidance paths that do not intersect with the obstacles and do not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold, 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;
[0315] If all obstacle avoidance paths intersect with obstacles, two adjacent obstacle avoidance points are selected as intermediate points to construct multiple new obstacle avoidance paths. The process then jumps to the step of determining whether the obstacle avoidance paths are passable. This process continues until all obstacle avoidance paths intersect with obstacles again, at which point the obstacle avoidance paths are determined to be impassable.
[0316] If the obstacle avoidance path is determined to be 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.
[0317] In an embodiment of the present invention, the obstacle avoidance start point can be used as the starting point, the obstacle avoidance end point as the end point, and a single obstacle avoidance passing point can be selected as the intermediate point. A preset path planning algorithm can be used to construct multiple obstacle avoidance paths. Specifically, the obstacle avoidance start point is selected as the starting point of the obstacle avoidance path, and the obstacle avoidance end point is used as the midpoint of the obstacle avoidance path. The intermediate point is constructed by exhaustively enumerating a single obstacle avoidance passing point and using a preset path planning algorithm, such as a cubic spline curve. Determine whether the obstacle avoidance path is passable; if there is only one obstacle avoidance path that does not intersect with the first blocking obstacle and does not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold, then the obstacle avoidance path is determined to be passable, and the obstacle avoidance path is determined as the target obstacle avoidance path; if there are multiple obstacle avoidance paths that do not intersect with the blocking obstacle and do not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold, 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, and 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.
[0318] See also Figure 12 , Figure 12 A schematic diagram of constructing an obstacle avoidance path by selecting a single obstacle avoidance point as the intermediate point.
[0319] In this embodiment, it is assumed that the obstacle avoidance starting point E is the starting point and the obstacle avoidance ending point F is 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 (not shown in the figure). There is an obstacle avoidance path C that does not intersect with the obstacle blocking the road, does not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold. At this time, it can be used as the target obstacle avoidance path, that is, the dotted line part. The target obstacle avoidance path is used to replace the planned path from the obstacle avoidance starting point to the obstacle avoidance end point to generate a new planned path.
[0320] In one example of the present invention, if all obstacle avoidance paths intersect with obstacles, it indicates 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 exhaustively enumerating combinations of two adjacent obstacle avoidance points as intermediate points. If none of these paths intersect with obstacles, do not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than a preset curvature threshold, then any obstacle avoidance path is traversable. In this case, the obstacle avoidance path with the shortest path length can be selected as the target obstacle avoidance path. 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.
[0321] Then jump to the step of judging whether the obstacle avoidance path is passable, and judge whether the new obstacle avoidance path is passable again. If it is again determined that each obstacle avoidance path intersects with the obstacle, or exceeds the obstacle avoidance space, or the curvature of the obstacle avoidance path is less than or equal to the preset curvature threshold, it is determined that the robot cannot avoid the obstacle and the obstacle avoidance path is not passable.
[0322] Furthermore, the method further comprises:
[0323] If the obstacle avoidance path is determined to be impassable, the robot will be moved according to the planned path;
[0324] When an obstacle is detected within a preset distance in front of the robot, the robot stops moving.
[0325] Optionally, after executing the step of moving the robot according to the new planned path, the method further includes:
[0326] Jump to the step of filtering multiple radar points until the robot moves to the end point of the planned path.
[0327] In this embodiment, after executing step 210 to move the robot, it is also possible to jump to step 201 to obtain the obstacle point cloud in the current space again, filter multiple radar points, and update the position of the first obstacle blocking the road until the robot moves to the end of the path, thereby completing the movement of the robot.
[0328] 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.
[0329] Receive obstacle avoidance parameters and obstacle avoidance space parameters; use isometric scaling to reduce the obstacle avoidance space by 1 / 2 of the vehicle width and length to define it as the constraint space for generating the obstacle avoidance path; receive lidar data, perform data screening, and convert the radar scan arrival point information to the coordinate system on the map; use the ray method to determine whether the radar point is in the obstacle avoidance space; if not, delete the point information and ignore it; if so, collect the radar point information; use the DBSCAN clustering algorithm to cluster the collected radar points; use a rectangle to select each cluster as an obstacle; analyze the obstacle information, expand the obstacle and determine whether it is blocking the way; find the point closest to the obstacle on the path, and sort the obstacles from small to large according to the index of their nearest point; traverse the obstacle information and find the first obstacle that blocks the way; determine whether there is an obstacle that does not block the way in front of the first obstacle that blocks the way; if so, determine whether the two obstacle areas overlap; if they overlap, merge the two obstacles to form a large obstacle; if there is no overlap or there is no obstacle that does not block the way, calculate the obstacle information based on the obstacle information, path information, vehicle position information and Obstacle avoidance is calculated from the information of the previous obstacle that is not in the way; 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 parameter; a path is generated using a cubic spline curve from the obstacle avoidance starting point, obstacle avoidance passing point, and obstacle avoidance end point; it is determined whether the four generated paths are all valid; if so, the path with the shortest distance is selected from the valid paths as the optimal obstacle avoidance path; the original path is truncated from the obstacle avoidance starting point to the obstacle avoidance end point and replaced with the generated optimal obstacle avoidance path; obstacle avoidance is enabled according to the updated path; if Otherwise, exhaustively select every two vertices of the obstacle (a total of four groups, diagonal ones are not selected), and determine the obstacle avoidance path passing points and order based on the obstacle avoidance distance parameter and the distance from the starting point; exhaustively select every two vertices of the obstacle (a total of four groups, diagonal ones are not selected), and determine the obstacle avoidance path passing points and order based on the obstacle avoidance distance parameter and the distance from the starting point; determine whether the four generated paths are all valid; if valid, select the path with the shortest distance from the valid paths as the optimal obstacle avoidance path; if invalid, the obstacle cannot be bypassed, the path does not change, and the vehicle stops before the obstacle.
[0330] 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.
[0331] 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.
[0332] In an embodiment of the present invention, a controller within the robot, in response to received obstacle avoidance parameters and a planned path, constructs a constraint space for the wall space within which the robot resides and filters to obtain multiple radar points. After clustering and expanding the radar points, the robot determines obstructing obstacles and sorts them according to their obstacle indexes on the planned path. If a non-obstructing obstacle is determined to exist before the first obstructing obstacle, an obstacle merging operation is performed. The robot then determines an obstacle avoidance start and end point on the planned path based on the constraint space. The obstacle vertex on the first obstructing obstacle is adjusted based on the obstacle size within the obstacle avoidance parameters to determine multiple obstacle avoidance points. The planned path is then updated using the obstacle avoidance start point, one or two obstacle avoidance points, and the obstacle avoidance end point, and the robot is moved along the new planned path. This flexible construction of the constraint space allows for more flexible selection of points for constructing the obstacle avoidance path, resolving the technical issue of conventional obstacle avoidance schemes being susceptible to external space size limitations, resulting in poor robot avoidance flexibility. This effectively improves the robot's obstacle avoidance flexibility while ensuring controllable obstacle avoidance paths.
[0333] See also Figure 15 , Figure 15 A structural block diagram of a mobile obstacle avoidance device for a robot according to a third embodiment of the present invention is shown.
[0334] An embodiment of the present invention provides a mobile obstacle avoidance device for a robot, which is applied to a controller within the robot. The device includes:
[0335] A response construction module 301 is used to respond to obstacle avoidance parameters and plan paths, construct a constraint space and screen multiple radar points;
[0336] The cluster expansion module 302 is configured to perform cluster expansion on the radar points, determine the obstacles blocking the path, and sort the obstacles according to their obstacle indexes on the planned path;
[0337] The obstacle avoidance start and end point selection module 303 is used to perform an obstacle merging operation if there is a non-blocking obstacle before the first blocking obstacle, and determine the obstacle avoidance start and end points on the planned path based on the constraint space;
[0338] A passing point selection module 304 is used to determine multiple obstacle avoidance passing points based on the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the path;
[0339] The path updating module 305 is used to update the planned path using the obstacle avoidance starting point, a single or two obstacle avoidance passing points and an obstacle avoidance ending point, and move the robot according to the new planned path.
[0340] Optionally, the response building module 301 includes:
[0341] The obstacle avoidance space construction submodule is used to respond to the obstacle avoidance parameters and the planned path, select at least four position points in the current space and connect them to create at least one obstacle avoidance space; each obstacle avoidance space is composed of at least four position points connected;
[0342] The reduced length extraction submodule is used to extract the reduced length from the obstacle avoidance parameters;
[0343] The isometric reduction submodule is used to isometrically reduce the obstacle avoidance space according to the reduction length to generate a constraint space;
[0344] The data conversion submodule is used to filter the laser radar data and convert it into the map coordinate system to obtain the radar scanning points when the laser radar data is received;
[0345] The scanning point position judgment submodule is used to determine whether each radar scanning point is within the obstacle avoidance space;
[0346] Scan point deletion submodule is used to delete the radar scan point if no;
[0347] The scanning point determination submodule is used to determine the radar scanning point as a radar point if yes.
[0348] Optionally, the isometric reduction submodule includes:
[0349] A vector construction unit, configured to use each position point as a target point and combine two position points adjacent to the target point to construct a first vector and a second vector;
[0350] An angle sine value calculation unit, used to calculate the sine value of the angle between the first vector and the second vector;
[0351] a vector length determining unit, configured to calculate a ratio between the reduced length and the sine value of the angle, to obtain the same third vector length and fourth vector length;
[0352] a third vector determining unit, configured to determine a third vector using the third vector length and the first vector;
[0353] a fourth vector determining unit, configured to determine the fourth vector using the fourth vector length and the second vector;
[0354] an equidistant scaling point position determining unit, configured to superimpose the third vector and the fourth vector and determine the position of the equidistant scaling point in combination with the position information of the target point;
[0355] The position connection unit is used to connect the positions of each equidistant scaling point to generate a constraint space.
[0356] Optionally, the equidistant scaling point position determining unit is specifically configured to:
[0357] The third vector and the fourth vector are superimposed, and the position of the initial scaling point is determined by combining the position information of the target point;
[0358] The ray method is used to determine whether the initial scaling point is within the obstacle avoidance space;
[0359] If not, the position of the equidistant scaling point is determined according to the negative vector obtained by superimposing the third vector and the fourth vector and the position information of the target point;
[0360] If so, the initial scaling point position is determined as the equidistant scaling point position.
[0361] Optionally, the cluster expansion module 302 is specifically configured to:
[0362] Cluster the radar points to obtain multiple clusters;
[0363] Use rectangles to select each cluster to obtain the initial obstacles;
[0364] Calculate the multiplication value between the width of the robot and the first preset ratio parameter to obtain the expansion size;
[0365] Expand each initial obstacle according to the expansion size to generate multiple expanded obstacles;
[0366] Select the expansion obstacle that intersects the planned path as the road-blocking obstacle, and locate the obstacle center point corresponding to the road-blocking obstacle;
[0367] Select the index point closest to the obstacle center on the planned path, and determine the index to which the index point belongs as the obstacle index corresponding to the road-blocking obstacle;
[0368] Sort the obstacles in the way from smallest to largest according to the obstacle index.
[0369] Optionally, the obstacle avoidance start and end point selection module 303 includes:
[0370] An overlap determination submodule is used to determine whether the first road-blocking obstacle overlaps with the non-road-blocking obstacle if there is a non-road-blocking obstacle in front of the first road-blocking obstacle;
[0371] A merging submodule is used to adopt the frame size extreme value of the first road-blocking obstacle and the non-road-blocking obstacle to construct and update the road-blocking obstacle if there is overlap;
[0372] The index generation submodule is used to select the index point closest to the center point of the updated obstacle on the planned path, and use the index of the index point as the updated obstacle index;
[0373] A start and end point determination submodule, configured to determine an obstacle avoidance end point and a second temporary start point based on a positional relationship between the first path point corresponding to the updated obstacle index and the constraint space;
[0374] a first obstacle avoidance starting point determination submodule, configured to determine the second temporary starting point as the obstacle avoidance starting point if no non-blocking obstacle is updated before the blocking obstacle is updated;
[0375] The second obstacle avoidance starting point determination submodule is configured to determine the obstacle avoidance starting point based on the updated non-blocking obstacle and the updated blocking obstacle in combination with the second temporary starting point if the updated non-blocking obstacle does not overlap with the updated blocking obstacle.
[0376] Optionally, the starting and ending point determination submodule includes:
[0377] an updated perimeter calculation unit, configured to calculate a multiplication value between the updated perimeter of the road-blocking obstacle and a second preset ratio to obtain an updated perimeter;
[0378] A first superimposing unit is configured to superimpose a first preset step size on the updated obstacle index to obtain a first current index;
[0379] an obstacle avoidance end point determination unit, configured to determine an obstacle avoidance end point based on a positional relationship between an end point of the planned path and the constraint space and in combination with the first current index;
[0380] A second superimposing unit is configured to superimpose a second preset step length on the updated obstacle index to obtain a second current index;
[0381] a first temporary starting point determining unit, configured to determine a first temporary starting point according to a positional relationship between a starting point of the planned path and the constraint space and in combination with a second current index;
[0382] a first comparing unit, configured to compare a first path index corresponding to the first temporary starting point with a robot path index of the robot on the planned path at a current moment;
[0383] The second temporary starting point determining unit is configured to select a point with a maximum value between the first path index and the robot path index as the second temporary starting point.
[0384] Optionally, the obstacle avoidance end point determination unit is specifically configured to:
[0385] Determine whether the end point of the planned path is outside the constraint space;
[0386] If it is not outside the constraint space, determine whether the first current index is greater than the end point index corresponding to the end point of the path;
[0387] If it is greater than, the end point of the path is determined to be the end point of obstacle avoidance;
[0388] If not, determining whether the index distance between the first current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0389] If yes, the path point to which the first current index belongs is determined as the obstacle avoidance end point;
[0390] If not, the first preset index value is added to the first current index to obtain a new first current index, and the process jumps to the step of determining whether the first current index is greater than the endpoint index corresponding to the path endpoint;
[0391] If it is outside the constraint space, determine whether the path point to which the first current index belongs exceeds the constraint space;
[0392] If it exceeds, the path point to which the difference index between the first current index and the first preset value belongs is determined as the obstacle avoidance end point;
[0393] If not, determining whether the index distance between the first current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0394] If yes, the path point to which the first current index belongs is determined as the obstacle avoidance end point;
[0395] If not, the first preset index value is added to the first current index to obtain a new first current index, and the process jumps to the step of determining whether the path point to which the first current index belongs exceeds the constraint space.
[0396] Optionally, the first temporary starting point determining unit is specifically configured to:
[0397] Determine whether the starting point of the planned path is outside the constraint space;
[0398] If it is not outside the constraint space, determine whether the second current index is greater than the starting point index corresponding to the starting point of the path;
[0399] If it is greater than, the path starting point is determined to be the first temporary starting point;
[0400] If not, determine whether the index distance between the second current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0401] If yes, the path point to which the second current index belongs is determined as the first temporary starting point;
[0402] If not, the second preset index value is added to the second current index to obtain a new second current index, and the process jumps to the step of determining whether the second current index is greater than the starting point index corresponding to the starting point of the path;
[0403] If it is outside the constraint space, determine whether the path point to which the second current index belongs exceeds the constraint space;
[0404] If it exceeds, the path point to which the difference index between the second current index and the second preset value belongs is determined as the first temporary starting point;
[0405] If not, determining whether the index distance between the second current index and the updated obstacle index is greater than or equal to the updated perimeter;
[0406] If yes, the path point to which the second current index belongs is determined as the first temporary starting point;
[0407] If not, the second preset index value is added to the second current index to obtain a new second current index, and the process jumps to the step of determining whether the path point to which the second current index belongs exceeds the constraint space.
[0408] Optionally, the device further comprises:
[0409] A first resetting module is configured to, if a new updated non-road-blocking obstacle overlaps with the updated road-blocking obstacle, use the updated non-road-blocking obstacle as a new non-road-blocking obstacle and use the updated road-blocking obstacle as a new road-blocking obstacle;
[0410] The first jump module is used to jump to execute the step of using the frame size extreme value of the first road-blocking obstacle and the non-road-blocking obstacle to construct and update the road-blocking obstacle.
[0411] Optionally, the second obstacle avoidance starting point determination submodule is specifically configured to:
[0412] If the updated non-blocking obstacle does not overlap with the updated blocking obstacle, determining whether the path index corresponding to the updated non-blocking obstacle is greater than the path index corresponding to the second temporary starting point;
[0413] If not, the second temporary starting point is determined as the obstacle avoidance starting point;
[0414] If so, obtain the minimum path index of the four vertices of the updated obstacle on the planned path and the maximum path index of the four vertices corresponding to the non-blocking obstacle on the planned path respectively;
[0415] Determine whether the minimum path index is greater than the maximum path index;
[0416] If so, the corresponding point of the maximum path index on the planned path is determined as the obstacle avoidance starting point;
[0417] If not, the corresponding point of the path index corresponding to the updated non-blocking obstacle on the planned path is determined as the obstacle avoidance starting point.
[0418] Optionally, the device further comprises:
[0419] A second resetting module is configured to use the first road-blocking obstacle as an updated road-blocking obstacle and the non-road-blocking obstacle as an updated non-road-blocking obstacle if there is no overlap between the first road-blocking obstacle and the non-road-blocking obstacle;
[0420] The second jump module is used to jump to the step of selecting an index point on the planned path that is closest to the center point of the updated obstacle, and using the index to which the index point belongs as the step of updating the obstacle index.
[0421] Optionally, the device further comprises:
[0422] A start and end point determination module is used to determine the obstacle avoidance end point and the third temporary start point based on the positional relationship between the obstacle index and the constraint space if there is no non-blocking obstacle before the first blocking obstacle;
[0423] a second comparison module, configured to compare a second path index corresponding to the third temporary starting point with a robot path index of the robot on the planned path at a current moment;
[0424] The second obstacle avoidance starting point determination module is used to select the point with the maximum value between the second path index and the robot path index as the obstacle avoidance starting point.
[0425] Optionally, the point selection module 304 is specifically configured to:
[0426] Extract the avoidance distance from the obstacle avoidance parameters;
[0427] The coordinates of the obstacle vertex on the first obstacle blocking the road are adjusted using the avoidance distance to generate multiple obstacle avoidance passing points.
[0428] Optionally, the path updating module 305 is specifically configured to:
[0429] 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;
[0430] Determine whether the obstacle avoidance path is passable;
[0431] If there is any obstacle avoidance path that does not intersect with the first obstacle in the way and does not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold, then the obstacle avoidance path is determined to be passable and is determined as the target obstacle avoidance path;
[0432] If there are multiple obstacle avoidance paths that do not intersect with the obstacles and do not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold, 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;
[0433] If all obstacle avoidance paths intersect with obstacles, two adjacent obstacle avoidance points are selected as intermediate points to construct multiple new obstacle avoidance paths. The process then jumps to the step of determining whether the obstacle avoidance paths are passable. This process continues until all obstacle avoidance paths intersect with obstacles again, at which point the obstacle avoidance paths are determined to be impassable.
[0434] If the obstacle avoidance path is determined to be 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.
[0435] Optionally, the device also includes: an impassable movement module, which is used to move the robot according to the planned path if it is determined that the obstacle avoidance path is impassable; and a robot stopping module, which is used to stop the movement of the robot when an obstacle is detected within a preset distance in front of the robot.
[0436] Optionally, the device further includes: a third jump module, configured to jump to the step of screening multiple radar points until the robot moves to the end point of the planned path.
[0437] 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 performs the steps of the robot's movement and obstacle avoidance as described in any embodiment of the present invention.
[0438] 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 movement obstacle avoidance method as described in any embodiment of the present invention is implemented.
[0439] 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, sub-modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0440] 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.
[0441] 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.
[0442] 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.
[0443] 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.
[0444] 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 movement obstacle avoidance method, characterized in that: Applied to a controller in a robot, the method comprises: Responding to obstacle avoidance parameters and planning paths, constructing constraint spaces and screening multiple radar points; After clustering and expanding the radar points, determining obstacles and sorting the obstacles according to their obstacle indexes on the planned path; If there is a non-blocking obstacle before the first blocking obstacle, perform an obstacle merging operation, and determine an obstacle avoidance start point and an obstacle avoidance end point on the planned path in combination with the constraint space; Determining a plurality of obstacle avoidance passing points according to the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the road; The planned path is updated using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point, and the robot is moved according to the new planned path.
2. The method according to claim 1, characterized in that The steps of responding to obstacle avoidance parameters and planning paths, constructing a constraint space, and screening multiple radar points include: In response to the obstacle avoidance parameters and the planned path, at least four position points are selected in the current space and connected to create at least one obstacle avoidance space; each obstacle avoidance space is composed of at least four position points connected; extracting the reduced length from the obstacle avoidance parameters; isometrically reducing the obstacle avoidance space according to the reduced length to generate a constraint space; When the laser radar data is received, the laser radar data is filtered and converted into a map coordinate system to obtain a radar scanning point; Determining whether each of the radar scanning points is within the obstacle avoidance space; If not, deleting the radar scan point; If so, the radar scanning point is determined as a radar point.
3. The method according to claim 2, characterized in that The step of isometrically reducing the obstacle avoidance space according to the reduced length to generate a constraint space includes: Each position point is used as a target point, and two position points adjacent to the target point are combined to construct a first vector and a second vector; Calculating the sine of the angle between the first vector and the second vector; Calculating a ratio between the reduced length and the sine value of the angle to obtain the same third vector length and fourth vector length; Determine a third vector using the third vector length and the first vector; Determine a fourth vector using the fourth vector length and the second vector; Superimposing the third vector and the fourth vector, and combining the position information of the target point to determine the position of the equidistant scaling point; The positions of the equidistant scaling points are connected to generate a constraint space.
4. The method according to claim 3, characterized in that The step of superimposing the third vector and the fourth vector and determining the position of the equidistant scaling point in combination with the position information of the target point includes: Superimposing the third vector and the fourth vector, and combining the position information of the target point to determine the initial scaling point position; Using a ray method to determine whether the initial zoom point position is within the obstacle avoidance space; If not, determining the position of the equidistant scaling point according to the negative vector obtained by superimposing the third vector and the fourth vector in combination with the position information of the target point; If so, the initial zoom point position is determined as the equidistant zoom point position.
5. The method according to claim 1, wherein After clustering and expanding the radar points, the step of determining obstacles blocking the road and sorting the obstacles according to the obstacle indexes on the planned path includes: Clustering the radar points to obtain multiple clusters; Using a rectangle to select each of the clusters to obtain an initial obstacle; Calculating a multiplication value between the width of the robot and a first preset proportional parameter to obtain an expanded size; Expanding each of the initial obstacles according to the expansion size to generate a plurality of expanded obstacles; Selecting an expansion obstacle that intersects the planned path as a road-blocking obstacle, and locating the obstacle center point corresponding to the road-blocking obstacle; Selecting an index point on the planned path that is closest to the center point of the obstacle, and determining the index to which the index point belongs as the obstacle index corresponding to the road-blocking obstacle; The obstacles blocking the road are sorted from small to large according to the obstacle index.
6. The method according to claim 1, wherein If there is a non-blocking obstacle before the first blocking obstacle, performing an obstacle merging operation and determining an obstacle avoidance start point and an obstacle avoidance end point on the planned path in combination with the constraint space include: If 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; Selecting an index point on the planned path that is closest to the center point of the updated road-blocking obstacle, and using the index to which the index point belongs as the updated obstacle index; Determining an obstacle avoidance end point and a second temporary start point based on a positional relationship between the first path point corresponding to the updated obstacle index and the constraint space; If there is no updated non-blocking obstacle before the updated blocking obstacle, determining the second temporary starting point as the obstacle avoidance starting point; If the updated non-road-blocking obstacle does not overlap with the updated road-blocking obstacle, an obstacle avoidance starting point is determined based on the updated non-road-blocking obstacle and the updated road-blocking obstacle in combination with the second temporary starting point.
7. The method according to claim 6, characterized in that The step of determining the obstacle avoidance end point and the second temporary start point according to the positional relationship between the updated obstacle index and the constraint space comprises: Calculating a multiplication value between the updated perimeter of the road-blocking obstacle and a second preset ratio to obtain an updated perimeter; Superimposing a first preset step length on the updated obstacle index to obtain a first current index; Determining an obstacle avoidance end point based on a positional relationship between an end point of the planned path and the constraint space and the first current index; Superimposing a second preset step length on the updated obstacle index to obtain a second current index; Determining a first temporary starting point based on a positional relationship between a starting point of the planned path and the constraint space and in combination with the second current index; comparing a first path index corresponding to the first temporary starting point with a robot path index of the robot on the planned path at a current moment; A point having a maximum value between the first path index and the robot path index is selected as a second temporary starting point.
8. The method according to claim 7, characterized in that The step of determining the obstacle avoidance end point based on the positional relationship between the path end point of the planned path and the constraint space in combination with the first current index includes: Determining whether an end point of the planned path is outside the constraint space; If it is not outside the constraint space, determining whether the first current index is greater than the endpoint index corresponding to the path endpoint; If it is greater than, the end point of the path is determined to be the obstacle avoidance end point; If not, determining whether the index distance between the first current index and the updated obstacle index is greater than or equal to the updated perimeter; If yes, then determining the path point to which the first current index belongs as the obstacle avoidance end point; If not, the first preset index value is added to the first current index to obtain a new first current index, and the process jumps to the step of determining whether the first current index is greater than the endpoint index corresponding to the path endpoint; If it is outside the constraint space, determining whether the path point to which the first current index belongs exceeds the constraint space; If it exceeds, the path point to which the difference index between the first current index and the first preset value belongs is determined as the obstacle avoidance end point; If not, determining whether the index distance between the first current index and the updated obstacle index is greater than or equal to the updated perimeter; If yes, then determining the path point to which the first current index belongs as the obstacle avoidance end point; If not, the first preset index value is added to the first current index to obtain a new first current index, and the process jumps to the step of determining whether the path point to which the first current index belongs exceeds the constraint space.
9. The method according to claim 7, characterized in that The step of determining the first temporary starting point based on the positional relationship between the starting point of the planned path and the constraint space and in combination with the second current index includes: Determining whether a starting point of the planned path is outside the constraint space; If it is not outside the constraint space, determining whether the second current index is greater than the starting point index corresponding to the starting point of the path; If it is greater than, the starting point of the path is determined to be the first temporary starting point; If not, determining whether the index distance between the second current index and the updated obstacle index is greater than or equal to the updated perimeter; If yes, determining the path point to which the second current index belongs as the first temporary starting point; If not, the second preset index value is added to the second current index to obtain a new second current index, and the process jumps to the step of determining whether the second current index is greater than the starting point index corresponding to the starting point of the path; If it is outside the constraint space, determining whether the path point to which the second current index belongs exceeds the constraint space; If it exceeds, determining the path point to which the difference index between the second current index and the second preset value belongs as the first temporary starting point; If not, determining whether the index distance between the second current index and the updated obstacle index is greater than or equal to the updated perimeter; If yes, determining the path point to which the second current index belongs as the first temporary starting point; If not, the second preset index value is added to the second current index to obtain a new second current index, and the process jumps to the step of determining whether the path point to which the second current index belongs exceeds the constraint space.
10. The method according to claim 6, characterized in that The method further comprises: If there is a new updated non-road-blocking obstacle that 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.
11. The method according to claim 6, characterized in that If the updated non-road-blocking obstacle does not overlap with the updated road-blocking obstacle, the step of determining the obstacle avoidance starting point based on the updated non-road-blocking obstacle and the updated road-blocking obstacle in combination with the second temporary starting point includes: If the updated non-road-blocking obstacle does not overlap with the updated road-blocking obstacle, determining whether the path index corresponding to the updated non-road-blocking obstacle is greater than the path index corresponding to the second temporary starting point; If not, determining the second temporary starting point as the obstacle avoidance starting point; If so, respectively obtain the minimum path index of the four vertices of the updated road-blocking obstacle on the planned path and the maximum path index of the four vertices corresponding to the updated non-road-blocking obstacle on the planned path; Determining whether the minimum path index is greater than the maximum path index; If yes, then determining the corresponding point of the maximum path index on the planned path as the obstacle avoidance starting point; If not, the corresponding point of the path index corresponding to the updated non-blocking obstacle on the planned path is determined as the obstacle avoidance starting point.
12. The 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 selecting an index point on the planned path that is closest to the center point of the updated road-blocking obstacle, and using the index to which the index point belongs as the step of updating the obstacle index.
13. The method according to claim 1, wherein The method further comprises: If there is no non-blocking obstacle before the first blocking obstacle, determining an obstacle avoidance end point and a third temporary start point according to a positional relationship between the obstacle index and the constraint space; comparing a second path index corresponding to the third temporary starting point with a robot path index of the robot on the planned path at a current moment; The point with the maximum value between the second path index and the robot path index is selected as the obstacle avoidance starting point.
14. The method according to claim 1, wherein The step of determining a plurality of obstacle avoidance passing points based on the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the road comprises: Extracting the avoidance distance from the obstacle avoidance parameters; The avoidance distance is used to adjust the coordinates of the obstacle vertex on the first obstacle blocking the road to generate multiple obstacle avoidance passing points.
15. The method according to claim 2, characterized in that The step of updating the planned path by using the obstacle avoidance starting point, one or two obstacle avoidance passing points, and the obstacle avoidance ending point, and moving the robot according to the new planned path 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 the obstacle avoidance path is passable; If any of the obstacle avoidance paths does not intersect with the first obstacle blocking the path and does not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than a preset curvature threshold, then the obstacle avoidance path is determined to be passable and is determined as the target obstacle avoidance path; If there are multiple obstacle avoidance paths that do not intersect with the blocking obstacle and do not exceed the obstacle avoidance space, and the curvature of the obstacle avoidance path is greater than the preset curvature threshold, 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 all the obstacle avoidance paths intersect with the road-blocking obstacle, 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 the obstacle avoidance paths are passable, until all the obstacle avoidance paths intersect with the road-blocking obstacle again, in which case the obstacle avoidance paths are determined to be impassable. If it is determined 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.
16. The method according to claim 15, characterized in that The method further comprises: If it is determined 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.
17. The method according to any one of claims 1 to 16, characterized in that After executing the step of moving the robot according to the new planned path, the method further includes: Jump to the step of screening multiple radar points until the robot moves to the end point of the planned path.
18. A mobile obstacle avoidance device for a robot, characterized in that: A controller applied to a robot, the device comprising: Response building module, which is used to respond to obstacle avoidance parameters and plan paths, build constraint spaces, and filter multiple radar points; a cluster expansion module, configured to determine obstacles blocking the path after clustering and expanding the radar points, and sort the obstacles according to their obstacle indexes on the planned path; an obstacle avoidance start and end point selection module, configured to perform an obstacle merging operation if there is a non-blocking obstacle before the first blocking obstacle, and determine an obstacle avoidance start point and an obstacle avoidance end point on the planned path in combination with the constraint space; A passing point selection module is used to determine multiple obstacle avoidance passing points based on the obstacle avoidance parameters and the obstacle vertex on the first obstacle blocking the road; A path updating module is used to update the planned path using the obstacle avoidance starting point, one or two obstacle avoidance passing points and the obstacle avoidance ending point, and to move the robot according to the new planned path.
19. An electronic device, characterized in that: The robot 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 moving and avoiding obstacles as described in any one of claims 1 to 17.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the robot movement obstacle avoidance method according to any one of claims 1 to 17 is implemented.
Citation Information
Patent Citations
Robot path planning method, device and equipment and storage medium
CN116518978A