Path planning method and robot
Patent Information
- Application Number
- CN202210054261.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-01-18
AI Technical Summary
路径规划的目的是在已知的机器人环境地图中规划出一条从机器人当前位置到达目标地点的最优路径,由于扫地机器人上所用传感器精度较低,所构建的地图不精准,或者狭窄通道口临时被封闭,导致某些可达或可出区域封闭从而不能规划可行路径,最终影响扫地机器人的清扫效果
[0016] The path planning method and device provided in this application select target path points on the path skeleton and connect the target path points in sequence to form a polyline path for the robot. The vertical distance between the polyline path and the nearest obstacle is kept at a preset distance. In this way, the risk of obstacles on the path can be reduced while ensuring the shortest path, so as to build a more accurate and feasible path for the robot and improve the cleaning effect of the robot.
Smart Images

Figure CN116501028B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical control technology, and more specifically, to a path planning method and a robot. Background Technology
[0002] Mobile robot technology has developed rapidly in recent years, and it has been widely used in many fields such as logistics warehousing, intelligent inspection, smart homes, and shopping mall guidance. In particular, the popularity of household robotic vacuum cleaners is a major factor affecting their performance. Path planning technology is one of the most critical factors affecting the performance of robotic vacuum cleaners. The purpose of path planning is to plan an optimal path from the robot's current position to the target location within a known map of the robot's environment. Due to the low precision of the sensors used in robotic vacuum cleaners, the maps they construct are inaccurate, or narrow passages are temporarily closed, causing some reachable or exitable areas to be blocked, making it impossible to plan a feasible path, ultimately affecting the cleaning effect of the robotic vacuum cleaner. Summary of the Invention
[0003] The purpose of this application is to provide a path planning method and a robot that can build more accurate and feasible paths for the robot.
[0004] The first aspect of this application provides a path planning method, comprising: acquiring a path skeleton of an environmental map; selecting target path points from the path skeleton based on the robot's current starting point and target point, and sequentially connecting the target path points to form a polyline path of the robot; wherein the vertical distance between the polyline path and the nearest obstacle remains at a preset distance.
[0005] In one embodiment, the step of selecting target path points from the path skeleton based on the robot's current starting point and target point, and sequentially connecting the target path points to form the robot's polyline path, includes:
[0006] In the path skeleton, starting from the current starting point, the path points in the path skeleton are traversed sequentially, and each path point is connected to the current starting point to form a connecting line segment. This process continues until the connecting line segment between the path point and the current starting point maintains the preset distance from the obstacles in the skeleton map. At this point, the path point is retained as the target path point, and the target path point is used as the starting point for the next traversal. The above steps are repeated until the target point in the path skeleton is reached, thus obtaining the robot's polyline path.
[0007] In one embodiment, the method further includes: selecting a first point and a second point on both sides of the inflection point in the polyline path, and drawing an arc path from the first point to the second point along the polyline path to obtain a smooth path corresponding to the polyline path; wherein the distance from the first point to the inflection point is less than the distance between the first vertical point and the inflection point, and the first vertical point is the path point on the polyline path where the first point is located that is closest to the obstacle; the distance from the second point to the inflection point is less than the distance between the second vertical point and the inflection point, and the second vertical point is the path point on the polyline path where the second point is located that is closest to the obstacle.
[0008] In one embodiment, selecting a first point and a second point on both sides of the inflection point in the polyline path includes:
[0009] when When, the first point P1 and the second point P2 on the broken line path segment, which are at a distance S from the inflection point P0, are obtained respectively; when and When the distance between the first and second perpendicular points and the inflection point is greater than the distance between the inflection point and the first perpendicular point, the distance between the inflection point P0 and the polygonal path segment is obtained as follows: The first point P1 and the second point P2; where S is a set smoothing distance, which is less than the distance between the first vertical point, the second vertical point and the inflection point; D is the length of the shortest broken line path segment on both sides of the inflection point P0.
[0010] In one embodiment, drawing an arc path from the first point to the second point along the polyline path to obtain a smooth path corresponding to the polyline path includes: applying Bézier smoothing between the first point P1 and the second point P2; generating a Bézier curve based on the first point P1 and the second point P2; sequentially connecting multiple equidistant points on the Bézier curve to obtain a smooth path segment corresponding to the inflection point P0; and traversing all inflection points in the polyline path according to the smoothing method described above for the inflection point P0 to obtain the smooth path.
[0011] In one embodiment, the method further includes: when the robot encounters a restricted passage area that is completely or partially surrounded by obstacles, it enters a path exploration process; the exploration process is as follows: a path frame is drawn, the path frame covers the outlines of the two nearest obstacles on the periphery of the restricted passage area; a point is selected on the path frame as the exploration start point, and another point is selected on the path frame as the exploration end point; if the robot finds a passage entrance while traveling from the exploration start point to the exploration end point along the path frame, it enters the restricted passage area; otherwise, it is determined that the restricted passage area is unreachable.
[0012] In one embodiment, the path frame is a rectangle; the exploration process is as follows: when the robot encounters the restricted passage area, it creates a rectangle that covers the outlines of the two nearest obstacles on the outer perimeter of the restricted passage area. The robot first takes the nearest edge point on the boundary intersecting with the rectangle as the starting point of exploration and moves along the obstacle outlines until it reaches the farthest edge point on the rectangle. If the robot finds the passage entrance, it enters the restricted passage area; otherwise, it determines that the restricted passage area is unreachable.
[0013] In one embodiment, obtaining the skeleton map in the target environment includes: obtaining the grid map in the target environment, performing a first erosion process on the grid map to obtain a first eroded map; and extracting the skeleton map from the eroded map.
[0014] In one embodiment, the corrosion distance of the first corrosion treatment is greater than or equal to the robot diameter.
[0015] A second aspect of this application provides a robot, comprising: a cleaning component; a motor for driving the cleaning component to move in order to clean the ground; a memory for storing a computer program; and a processor for executing the computer program to implement the method of the first aspect of this application and any of its embodiments.
[0016] The path planning method and device provided in this application select target path points on the path skeleton and connect the target path points in sequence to form a polyline path for the robot. The vertical distance between the polyline path and the nearest obstacle is kept at a preset distance. In this way, the risk of obstacles on the path can be reduced while ensuring the shortest path, so as to build a more accurate and feasible path for the robot and improve the cleaning effect of the robot.
[0017] On the other hand, by using the inflection points in the polyline path as smoothing targets, and taking the first and second points as the starting and ending points of smoothing, the inflection points in the polyline path can be smoothed, which helps the robot to turn smoothly and further improves the stability of the robot's walking process. Smoothing is beneficial for turning, and by limiting the vertical distance between the first and second points and the obstacle, it can be ensured that the robot will not collide with the obstacle, thus ensuring the robot's safety.
[0018] Furthermore, when the robot encounters obstacles while walking, it can find the passageway through the exploration process, which solves the problem of passageway closure caused by inaccurate maps or the mapping process in current robot vacuum cleaners. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the structure of a robot according to an embodiment of this application;
[0021] Figure 2 This is a flowchart illustrating a path planning method according to an embodiment of this application;
[0022] Figures 3A-3F This is a schematic diagram illustrating the acquisition of a path skeleton map according to an embodiment of this application;
[0023] Figure 4 This is a flowchart illustrating a path planning method according to an embodiment of this application;
[0024] Figures 5A-5B This is a schematic diagram of global path search according to an embodiment of this application;
[0025] Figures 6A-6C This is a schematic diagram of the path stretching process in Case 1 of an embodiment of this application;
[0026] Figures 7A-7C This is a schematic diagram of the path stretching process in Case 2 of an embodiment of this application;
[0027] Figures 8A-8C This is a schematic diagram of a path smoothing process according to an embodiment of this application;
[0028] Figure 9 This is a schematic diagram of the path exploration process according to an embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. In the description of this application, the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0030] like Figure 1 As shown, this embodiment provides a robot 1, including: at least one processor 11, a memory 12, a cleaning component 13, and a motor 14. Figure 1Taking a processor as an example, the processor 11, memory 12, and motor 14 are connected via bus 10, and the cleaning component 13 is connected to the motor 14. The memory 12 stores instructions that can be executed by the processor 11. The instructions are executed by the processor 11 to enable the robot 1 to perform all or part of the process of the method in the following embodiments, so as to build a more accurate feasible path for the robot and improve the cleaning effect of the robot.
[0031] In one embodiment, robot 1 can be a sweeping robot, a mopping robot, a sweeping and mopping robot, a vacuum cleaner, or other equipment, and the cleaning components can be roller brushes, mopping parts, or other components.
[0032] Please refer to Figure 2 This is a path planning method according to an embodiment of this application. The method can be developed by... Figure 1 The method, using robot 1 as shown, can be applied to floor cleaning scenarios to construct more precise feasible paths for the robot and improve its cleaning performance. Taking robot 1 as an example of a robotic vacuum cleaner, the method includes the following steps:
[0033] Step 201: Obtain the path skeleton of the environment map.
[0034] In this step, the environment map can be the room to be cleaned, or a map of part or all of the areas in the room that need to be cleaned. The path skeleton can be a path formed by connecting the center lines of the passable areas in the environment map.
[0035] In one embodiment, step 201 may specifically include: acquiring a grid map of the target environment, and performing a first erosion process on the grid map to obtain a first eroded map. The path skeleton in the eroded map is then extracted. The erosion distance of the first erosion process is greater than or equal to the robot diameter.
[0036] The robotic vacuum cleaner first traverses the entire environment of the area to be cleaned. After traversing the entire environment, it can construct a grid map of the environment, also known as a three-color map (black, white, and gray), such as... Figure 3A As shown, white areas represent passable areas, and black areas represent obstacle areas. In real-world scenarios, there may be temporary obstacles or doors blocking the entrance, leading to... Figure 3A The passable areas in the medium-grid map are broken, forming restricted passable areas (i.e. Figure 3A (The small white square area in the image). First, binarize the raster map, setting a pixel threshold k. Set all pixels with values less than k to 0, and otherwise to 255, thus completing the raster map process. Figure 2 Value-based, the result is as follows Figure 3BAs shown. Next, erosion processing is performed. Assuming the binary map is A, and the structuring element is set to B (its size can be set to the diameter of the robot vacuum), image A is eroded using convolution template B. Erosion processing dilates the obstacle region of image A. If the obstacle region is a single grid cell, the eroded obstacle region can be a 3*3 grid region. If the obstacle region is an N*M region, the eroded obstacle region can be a (N+2)*(M+2) grid region. The erosion distance is the dilation distance, ultimately resulting in... Figure 3C The erosion map shown illustrates how scattered obstacle areas are eroded and merged into a unified whole, preventing the robot from walking through the middle of obstacles. This allows the mobile robot to stay away from these obstacles, ensuring the accessibility of the robot's planned path and the safety of its movement.
[0037] Based on the obtained erosion map, the skeleton of the erosion map (or Voronoi diagram, which is the path formed by connecting the midlines of passable areas) is extracted. In real-world scenarios, the robot vacuum's sensors may not be accurate enough, or after erosion and dilation of obstacles, the map may contain locally closed areas (i.e., restricted passable areas), for example... Figures 3A-3C The closed white areas appearing on the map indicate that the generated skeleton is not connected. To reduce the interference of these local paths on subsequent path searches and improve path planning efficiency, the skeleton with the most paths can be retained, while other paths are removed. For example... Figure 3D As shown, the specific steps are as follows: traverse the pixels of the original skeleton image, search and mark the connected components of the skeleton based on the eight-neighbor search, record the number of pixels in each connected component, keep the connected component with the most pixels and set it to 255 (white), and set the pixel values of other connected components to 0 (black), resulting in the optimized skeleton as shown. Figure 3E As shown, the optimized skeleton is then attached to the map to form a path skeleton map, as shown. Figure 3F As shown.
[0038] Step 202: Based on the robot's current starting point and target point, select target path points from the path skeleton, and connect the target path points in sequence to form the robot's polyline path.
[0039] In this step, the path skeleton includes many waypoints. Because the global path generated using the skeleton map is inherently winding and long, it leads to unstable robot movement and is time-consuming and energy-intensive. The planned skeleton path can be optimized and straightened to ensure the path is far from obstacles and short. First, the robot's current starting point and the target point to be reached are determined. Then, target waypoints are selected from the path skeleton to optimize it. These target waypoints are then connected sequentially to form a zigzag path for the robot. The vertical distance between the zigzag path and the nearest obstacle remains at a preset distance. Therefore, the zigzag path reduces the risk of the robot colliding with obstacles, increases the robot's stability during movement, and improves cleaning efficiency.
[0040] The path planning method described above selects target path points on a skeleton map and connects them sequentially to form a polyline path for the robot. The vertical distance between the polyline path and the nearest obstacle remains at a preset distance. This reduces the risk of obstacles appearing on the path, constructs a more accurate and feasible path for the robot, and improves its cleaning performance. The preset distance can be greater than or equal to the robot's diameter, and can also be the corrosion distance after etching.
[0041] Please refer to Figure 4 This is a path planning method according to an embodiment of this application. The method can be developed by... Figure 1 The method, using robot 1 as shown, can be applied to floor cleaning scenarios to construct more precise feasible paths for the robot and improve its cleaning performance. Taking robot 1 as an example of a robotic vacuum cleaner, the method includes the following steps:
[0042] Step 401: Obtain the path skeleton map of the target environment. See the description of step 201 in the above embodiments for details.
[0043] Step 402: Search the path skeleton map to find the global path from the current starting point to the target point.
[0044] In this step, after obtaining the path skeleton map, to address the issue of not being able to plan paths for certain specific target points, a global path can be searched based on the robot's current starting point and the target point to be reached. Depending on the actual scenario, this can be divided into two cases:
[0045] Scenario 1: Both the target point (point B) and the starting point (point A) are in an empty area and are not surrounded by obstacles, such as... Figure 5AAs shown, starting from point A, the search proceeds outwards using an eight-neighborhood approach. When an obstacle is encountered, the search direction is changed, ensuring that the path from the current search point to the center point is the shortest. The search continues until a point on the skeleton (denoted as point a) is found, at which point a stops. This path is then used as the first part of the global path. Similarly, the target point B can be used as the center point to search for the third part of the global path, with the point on the skeleton denoted as point b. Then, starting from point a and ending at point b, the search continues along the skeleton to find the second part of the path. Finally, the three parts of the path are combined to form the global path.
[0046] Scenario 2: Both the target point (point B) and the starting point (point A) are in the empty area, but at least one is surrounded by obstacles, such as... Figure 5B As shown, target point B is located within a closed, passable area. In this scenario, if the search is performed as in Case 1, the entire path cannot be found. To allow the robot to attempt to approach target point B, when the third part of the global path cannot be found, we can use target point B as the center point and find the nearest point on the skeleton, connecting them directly. Alternatively, we can find a point from the path frame, then find a point on the skeleton, connecting them directly. The path frame covers the outlines of the two nearest obstacles surrounding the target point. Then, we search for the second part of the global path on the skeleton in the same way as in Case 1. Finally, we combine the three parts of the path to form the global path.
[0047] Step 403: Based on the robot's current starting point and target point, select target path points from the path skeleton and connect the target path points in sequence to form the robot's polyline path.
[0048] In this step, due to the tortuous nature of the skeleton, the resulting global path is also curved, which is not conducive to the robot vacuum's movement. The global path can be optimized to obtain a polygonal path.
[0049] Therefore, step 403 may specifically include: in the path skeleton, starting from the current starting point, sequentially traversing the path points in the path skeleton (i.e., the obtained global path), connecting the path points to the current starting point in sequence to form connecting line segments, until the connecting line segment between the path point and the current starting point maintains a preset distance from the obstacles in the skeleton map, retaining the path point as the target path point, and using the target path point as the starting point for the next traversal, and performing the above steps in a loop until the target point in the path skeleton is reached, thus obtaining the robot's polyline path.
[0050] In real-world scenarios, to ensure the optimized path stays as far away from obstacles as possible, the erosion map obtained in step 401 can be subjected to secondary erosion, and the map after secondary erosion can be saved. The preset distance can be the erosion distance after secondary erosion.
[0051] Then, in the obtained global path, starting from the current starting point, traverse all path points in sequence, connecting each path point to the starting point in turn, until the connecting line segment maintains a preset distance from the obstacle in the skeleton map. The preset distance can be the erosion distance after the second erosion, that is, until the connecting line segment just does not pass through the obstacle in the second erosion map (i.e., ensuring that the path is tangent to the eroded obstacle), retain this target path point and set it as the starting point for the next traversal. Repeat the above steps until the target point is reached, and the polyline path can be obtained.
[0052] In one embodiment, the global path optimization process for case 1 in step 402 above is as follows:
[0053] like Figure 6A As shown, at this point, both the target point (point B) and the starting point (point A) are in empty areas and not surrounded by obstacles. By traversing all path points in the global path and connecting them sequentially, all target path points are obtained, resulting in a polyline path. For example... Figure 6B As shown, this illustrates the global path stretching process in case 1. Figure 6C This is the obtained polyline path.
[0054] In one embodiment, the global path optimization process for case 2 in step 402 above is as follows:
[0055] like Figure 7A As shown, both the target point (point B) and the starting point (point A) are in the blank area, but at least one is surrounded by obstacles. Only the normally searched path portion is optimized; the shortest path portion with direct connections is not processed. Figure 7B As shown, this illustrates the global path stretching process in case 2. Figure 7C This is the obtained polyline path.
[0056] Step 404: For the inflection points in the polyline path, select the first point and the second point on both sides of the inflection point, and draw an arc path from the first point to the second point along the polyline path to obtain the smooth path corresponding to the polyline path.
[0057] In this step, directly optimizing the straightened path will result in sharp points, causing uneven robot movement and affecting efficiency. Therefore, the inflection points in the polyline path can be used as smoothing targets. Using the first and second points as the start and end points of smoothing, the inflection points in the polyline path are smoothed to obtain an arc-shaped path from the first point to the second point, further improving the stability of the robot's movement. Specifically, the distance from the first point to the inflection point is less than the distance between the first perpendicular point and the inflection point, where the first perpendicular point is the path point on the polyline path containing the first point that is closest to the obstacle. Alternatively, the distance from the second point to the inflection point is less than the distance between the second perpendicular point and the inflection point, where the second perpendicular point is the path point on the polyline path containing the second point that is closest to the obstacle.
[0058] In one embodiment, selecting a first point and a second point on both sides of the inflection point includes:
[0059] when At that time, the first point P1 and the second point P2 on the broken line path segment with a distance S from the inflection point P0 are obtained respectively;
[0060] when and When the distance between the first and second perpendicular points and the inflection point is greater than the distance between the inflection point and the first perpendicular point, the distance between the inflection point P0 and the polygonal path segment is obtained as follows: The first point P1 and the second point P2; where S is a set smoothing distance, which is less than the distance between the first vertical point, the second vertical point and the inflection point; D is the length of the shortest broken line path segment from the inflection point P0 to both sides.
[0061] In this step, Bezier smoothing can be used to handle the inflection points of the polyline path. The inflection points in the polyline path are used as smoothing targets, and the Bezier smoothing distance is set to S (to ensure the smoothed path does not interfere with obstacles, distance S is generally less than the distance between the first perpendicular point and the inflection point, and the distance between the second perpendicular point and the inflection point). Assuming the shortest polyline length on both sides of the inflection point P0 is D, points P1 and P2 are found on both sides respectively. Specific method: If S >= D, skip the smoothing process. If... P1 and P2 are points on the broken lines that are far from point S on P0. If If the distance between the first perpendicular point and the inflection point is less than the distance between the second perpendicular point and the inflection point, then P1 and P2 are the distances from point P0 on the broken lines on both sides. If P0 is a point, then P1 and P2 are points on the broken lines on both sides that are S away from P0.
[0062] This ensures that the robot will not collide with obstacles while moving along the smooth path, and that the smooth distance is neither too small nor too large, allowing the robot to move smoothly along the smooth path.
[0063] In one embodiment, an arc path is drawn from the first point to the second point along the polyline path to obtain a smooth path corresponding to the polyline path, including: applying Bézier smoothing between the first point P1 and the second point P2; generating a Bézier curve based on the first point P1 and the second point P2; sequentially connecting multiple equidistant points on the Bézier curve to obtain a smooth path segment corresponding to the inflection point P0; and traversing all inflection points in the polyline path according to the smoothing method described above for the inflection point P0 to obtain a smooth path.
[0064] In this step, we find the second-order Bézier curve formed by the three points P0, P1, and P2: P(t) = (1-t) 2 P0+2t(1-t)P1+t2 P2, t∈[0,1], take N equally spaced points and connect them sequentially to form a smooth path, such as Figure 8A As shown, the arc is a second-order Bézier curve formed by points P0, P1, and P2. By traversing all inflection points and smoothing the polyline path in this manner, a smooth path is obtained, ensuring smooth robot operation. After smoothing, the robot's path will be tangent to the secondary erosion map, resulting in smooth robot movement during turns, with the path satisfying the Bézier curve, and the turning points also located on the skeleton.
[0065] like Figure 8B As shown, for the global path case 1 above, after smoothing the inflection points of the polyline path, a comparison diagram of the polyline path and the smooth path is obtained.
[0066] like Figure 8C As shown, for the global path case 2 above, after smoothing the inflection points of the polyline path, a comparison diagram of the polyline path and the smooth path is obtained.
[0067] In one embodiment, the planned local path area may be unreachable, so the robot can explore according to the actual environment. For example, in scenario 2 above, the robot will walk along the planned path, and eventually move directly from a point closer to the target point to the target point until it collides with an obstacle, and then explore outside the outline.
[0068] The method may also include:
[0069] Step 405: When the robot encounters a restricted area that is completely or partially surrounded by obstacles, it enters the path exploration process.
[0070] In this step, the exploration process is as follows: A pathframe is constructed, covering the outlines of the two nearest obstacles surrounding the restricted access area. A point on the pathframe is selected as the exploration start point, and another point is selected as the exploration end point. If the robot finds a passageway while traveling from the exploration start point to the exploration end point along the pathframe, it enters the restricted access area; otherwise, the restricted access area is determined to be unreachable.
[0071] In other words, when a robot encounters an obstacle while moving, it can define a bounding box around the obstacle and the target point it needs to reach. Then, it searches within this box for a path leading to the target point. If a path exists, it enters it; otherwise, it determines that the target point is unreachable. This provides a robot exploration solution that ensures the robot can enter the target area to perform its work as much as possible.
[0072] In one embodiment, the path box is a rectangle. The exploration process is as follows: when the robot encounters a restricted passage area, it creates a rectangle that covers the outlines of the two nearest obstacles on the outer perimeter of the restricted passage area. The robot first uses the nearest edge point on the boundary intersecting with the rectangle as the starting point for exploration and moves along the obstacle outlines until it reaches the farthest edge point on the rectangle. If the robot finds a passage entrance, it enters the restricted passage area; otherwise, it determines that the restricted passage area is unreachable.
[0073] For example, in scenario 2 above, where both the target point (point B) and the starting point (point A) are in a passable, empty area, but at least one is surrounded by obstacles in an isolated empty area, the robot moves along a smooth path. After entering the third part of the path (the directly connected path), if it collides with a wall, the robot will explore. The specific exploration method is as follows: draw a minimum rectangle that covers the current isolated empty area and the outlines of the two nearest surrounding obstacles, such as... Figure 9 As shown, the robot first moves to the edge point that is closer to the boundary of the rectangle, and then moves along the outline of the obstacle until it reaches the edge point that is farther away. If the robot still cannot find the passage to reach the target point B, then the target point B is determined to be unreachable.
[0074] The aforementioned path planning method solves the problem of current robotic vacuum cleaners being unable to plan a global path due to inaccurate maps or temporary obstacles blocking the passageway during mapping, leading to closed passageways. It also addresses the issue of curved and uneven paths planned by some existing path planning algorithms, enabling the construction of more accurate and feasible paths for the robot and improving its cleaning performance.
[0075] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A path planning method, characterized in that, include: Obtain the path skeleton of the environment map; Based on the robot's current starting point and target point, target path points are selected from the path skeleton, and the target path points are connected sequentially to form the robot's polyline path; The vertical distance between the polygonal path and the nearest obstacle remains at a preset distance; When the robot encounters a restricted passage area that is completely or partially surrounded by obstacles, it enters a path exploration process. The exploration process is as follows: a path frame is drawn, which covers the restricted passage area and the outlines of the two nearest obstacles on its periphery. Select one point on the path frame as the exploration start point and another point on the path frame as the exploration end point. If the robot finds a passage entrance while traveling from the exploration start point to the exploration end point along the path frame, it enters the restricted passage area; otherwise, it is determined that the restricted passage area is unreachable.
2. The method according to claim 1, characterized in that, The step of selecting target path points from the path skeleton based on the robot's current starting point and target point, and sequentially connecting the target path points to form the robot's polyline path, includes: In the path skeleton, starting from the current starting point, the path points in the path skeleton are traversed sequentially, and each path point is connected to the current starting point to form a connecting line segment. This process continues until the connecting line segment between the path point and the current starting point maintains the preset distance from the obstacles in the skeleton map. At this point, the path point is retained as the target path point, and the target path point is used as the starting point for the next traversal. The above steps are repeated until the target point in the path skeleton is reached, thus obtaining the robot's polyline path.
3. The method according to claim 1, characterized in that, Also includes: For the inflection point in the polyline path, select a first point and a second point on both sides of the inflection point, and draw an arc path from the first point to the second point along the polyline path to obtain the smooth path corresponding to the polyline path; Wherein, the distance from the first point to the inflection point is less than the distance from the first vertical point to the inflection point, and the first vertical point is the path point on the broken line path where the first point is located that is closest to the obstacle; The distance from the second point to the inflection point is less than the distance between the second perpendicular point and the inflection point. The second perpendicular point is the path point on the broken line path where the second point is located that is closest to the obstacle.
4. The method according to claim 3, characterized in that, The step of selecting a first point and a second point on both sides of the inflection point in the polyline path includes: When D>S> When D, the first point P1 and the second point P2 on the broken line path segment with a distance S from the inflection point P0 are obtained respectively; when When D>= S, and When D is greater than the distance between the first vertical point, the second vertical point, and the inflection point, the distances between the inflection point P0 and the line segment on the broken line path are respectively obtained as follows: D represents the first point P1 and the second point P2; where S is a set smoothing distance, which is less than the distance between the first and second vertical points and the inflection point; and D is the length of the shortest broken line path segment on both sides of the inflection point P0.
5. The method according to claim 4, characterized in that, Drawing an arc path from the first point to the second point along the polyline path yields a smooth path corresponding to the polyline path, including: Bezier smoothing is applied between the first point P1 and the second point P2. A Bezier curve is generated based on the first point P1 and the second point P2. Multiple points at equal intervals on the Bezier curve are connected sequentially to obtain the smooth path segment corresponding to the inflection point P0. Following the smoothing method described above for the inflection point P0, all inflection points in the polyline path are traversed to obtain the smooth path.
6. The method according to claim 1, characterized in that, The path frame is a rectangle; the exploration process is as follows: When the robot encounters the restricted passage area, it creates a rectangle that covers the restricted passage area and the outlines of the two nearest obstacles on its periphery. The robot first uses the nearest edge point on the boundary intersecting with the rectangle as the starting point for exploration and moves along the obstacle outlines until it reaches the farthest edge point on the rectangle. If the robot finds a passage entrance, it enters the restricted passage area; otherwise, it determines that the restricted passage area is unreachable.
7. The method according to claim 1, characterized in that, The path skeleton for obtaining the environmental map includes: A raster map of the target environment is obtained, and the raster map is subjected to a first erosion process to obtain a first eroded map; Extract the path skeleton from the erosion map.
8. The method according to claim 7, characterized in that, The corrosion distance of the first corrosion treatment is greater than or equal to the robot diameter.
9. A robot, characterized in that, include: Cleaning components; An electric motor is used to drive the cleaning components to clean the floor; Memory, used to store computer programs; A processor for executing the computer program to implement the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Machine path planning method and mobile robot
CN110850871A
Cleaning path planning method and device
CN111521189A